Skip to content

Commit

Permalink
Merge branch 'master' into spi-0.11-timestamp-0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikurube authored Jul 26, 2024
2 parents cf5b5cf + f90a962 commit 31b2140
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 38 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @embulk/elastic-maintainers
20 changes: 5 additions & 15 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,40 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up OpenJDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"
cache: "gradle"

- name: Run elastisearch container
run: docker-compose up -d

- name: List containers
run: docker-compose ps

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Testing
run: ./gradlew check --console rich --info

- name: Check building
run: ./gradlew gem --console rich --info

- name: JaCoCo test report
if: success()
run: ./gradlew jacocoTestReport

- name: Pack reports
if: always()
run: zip -9 -r -q reports.zip ./build/reports

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: success()
with:
name: reports
path: ./reports.zip

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: success()
with:
name: gem
path: ./pkg/*.gem

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: success()
with:
name: jar
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ jobs:
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up OpenJDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"
cache: "gradle"
- name: Publish
run: |
mkdir -p $HOME/.gem
Expand All @@ -26,7 +25,7 @@ jobs:
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
./gradlew --stacktrace publishMavenPublicationToMavenCentralRepository gemPush
env:
ORG_GRADLE_PROJECT_ossrhUsername: embulk
ORG_GRADLE_PROJECT_ossrhUsername: ${{ vars.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY_ARMOR }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.7.0 - 2024-03-01
* [update] Add jetty94 to support TLS1.3

## 0.6.0 - 2023-02-14
* [maintenance] Support typeless endpoint for ES version 8.x [#71](https://github.com/embulk/embulk-output-elasticsearch/pull/71)

Expand Down
2 changes: 1 addition & 1 deletion NOTICE_GEM
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ They are licensed under the Apache Software License, Version 2.0.
The gem distribution of this product includes JARs of the Jakarta Bean Validation API 1.1 (https://beanvalidation.org/1.1/), as-is.
It is licensed under the Apache Software License, Version 2.0.

The gem distribution of this product includes JARs of the Eclipse Jetty Project (https://www.eclipse.org/jetty/) 9.2, as-is.
The gem distribution of this product includes JARs of the Eclipse Jetty Project (https://www.eclipse.org/jetty/) 9.4, as-is.
They are licensed under dual licenses of the Apache Software License, Version 2.0, and the Eclipse Public License 2.0.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {
}

group = "org.embulk"
version = "0.6.0-SNAPSHOT"
version = "0.7.0-SNAPSHOT"
description = "Elasticsearch output plugin is an Embulk plugin that loads records to Elasticsearch read by any input plugins."

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -51,7 +51,7 @@ dependencies {
implementation "javax.validation:validation-api:1.1.0.Final"

implementation "org.embulk:embulk-base-restclient:0.10.1"
implementation "org.embulk:embulk-util-retryhelper-jetty92:0.8.2"
implementation "org.embulk:embulk-util-retryhelper-jetty94:0.9.0"

implementation "org.embulk:embulk-util-timestamp:0.2.2"

Expand Down
12 changes: 6 additions & 6 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.6.7.5=compileClasspath,runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7=compileClasspath,runtimeClasspath
javax.validation:validation-api:1.1.0.Final=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-client:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-http:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-io:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-util:9.2.14.v20151106=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-client:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-http:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-io:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.eclipse.jetty:jetty-util:9.4.51.v20230217=compileClasspath,runtimeClasspath
org.embulk:embulk-base-restclient:0.10.1=compileClasspath,runtimeClasspath
org.embulk:embulk-spi:0.11=compileClasspath
org.embulk:embulk-util-config:0.3.4=compileClasspath,runtimeClasspath
org.embulk:embulk-util-json:0.1.1=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper-jetty92:0.8.2=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper:0.8.2=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper-jetty94:0.9.0=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper:0.9.0=compileClasspath,runtimeClasspath
org.embulk:embulk-util-rubytime:0.3.3=compileClasspath,runtimeClasspath
org.embulk:embulk-util-timestamp:0.2.2=compileClasspath,runtimeClasspath
org.msgpack:msgpack-core:0.8.24=compileClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import org.embulk.spi.DataException;
import org.embulk.spi.Exec;
import org.embulk.spi.time.Timestamp;
import org.embulk.util.retryhelper.jetty92.Jetty92ClientCreator;
import org.embulk.util.retryhelper.jetty92.Jetty92RetryHelper;
import org.embulk.util.retryhelper.jetty92.Jetty92SingleRequester;
import org.embulk.util.retryhelper.jetty92.StringJetty92ResponseEntityReader;
import org.embulk.util.retryhelper.jetty94.Jetty94ClientCreator;
import org.embulk.util.retryhelper.jetty94.Jetty94RetryHelper;
import org.embulk.util.retryhelper.jetty94.Jetty94SingleRequester;
import org.embulk.util.retryhelper.jetty94.StringJetty94ResponseEntityReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -355,10 +355,10 @@ private JsonNode sendRequest(String path, final HttpMethod method, final PluginT
final String uri = createRequestUri(task, path);
final String authorizationHeader = getAuthorizationHeader(task);

try (Jetty92RetryHelper retryHelper = createRetryHelper(task)) {
try (Jetty94RetryHelper retryHelper = createRetryHelper(task)) {
String responseBody = retryHelper.requestWithRetry(
new StringJetty92ResponseEntityReader(task.getTimeoutMills()),
new Jetty92SingleRequester() {
new StringJetty94ResponseEntityReader(task.getTimeoutMills()),
new Jetty94SingleRequester() {
@Override
public void requestOnce(org.eclipse.jetty.client.HttpClient client, org.eclipse.jetty.client.api.Response.Listener responseListener)
{
Expand Down Expand Up @@ -430,13 +430,13 @@ private JsonNode parseJson(final String json) throws DataException
}
}

private Jetty92RetryHelper createRetryHelper(final PluginTask task)
private Jetty94RetryHelper createRetryHelper(final PluginTask task)
{
return new Jetty92RetryHelper(
return new Jetty94RetryHelper(
task.getMaximumRetries(),
task.getInitialRetryIntervalMillis(),
task.getMaximumRetryIntervalMillis(),
new Jetty92ClientCreator() {
new Jetty94ClientCreator() {
@Override
public org.eclipse.jetty.client.HttpClient createAndStart()
{
Expand Down

0 comments on commit 31b2140

Please sign in to comment.