Skip to content

Commit 83f517b

Browse files
authored
Beam SDK 2.55.0 (#772)
* Update Github maven workflow * Upgrade to codeql v3 * Upgrade e2e * Update README * Keep hamcrest * Beam 2.55.0 * Update Libraries BOM * Bump byte-buddy for Java 21 support
1 parent f8909c9 commit 83f517b

File tree

5 files changed

+62
-48
lines changed

5 files changed

+62
-48
lines changed

.github/workflows/codeql-analysis.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
analyze:
1919
name: Analyze
2020
runs-on: ubuntu-latest
21-
2221
strategy:
2322
fail-fast: false
2423
matrix:
@@ -27,14 +26,12 @@ jobs:
2726
language: ['java']
2827
# Learn more...
2928
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
30-
3129
steps:
3230
- name: Checkout repository
33-
uses: actions/checkout@v2
34-
31+
uses: actions/checkout@v4
3532
# Initializes the CodeQL tools for scanning.
3633
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@v1
34+
uses: github/codeql-action/init@v3
3835
with:
3936
languages: ${{ matrix.language }}
4037
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -45,7 +42,7 @@ jobs:
4542
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4643
# If this step fails, then you should remove it and run the build manually (see below)
4744
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v1
45+
uses: github/codeql-action/autobuild@v3
4946

5047
# ℹ️ Command-line programs to run using the OS shell.
5148
# 📚 https://git.io/JvXDl
@@ -59,4 +56,4 @@ jobs:
5956
# make release
6057

6158
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@v1
59+
uses: github/codeql-action/analyze@v3

.github/workflows/maven.yml

+15-19
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ on:
1717

1818
jobs:
1919
test:
20-
name: CI on JDK ${{ matrix.java_version }} and ${{ matrix.os }}
20+
name: mvn JDK ${{ matrix.java_version }} and ${{ matrix.os }}
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
24-
java_version: ['11', '17']
24+
java_version: ['11', '17', '21']
2525
os: [ubuntu-latest]
2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828
- name: Set up JDK ${{ matrix.java_version }}
29-
uses: actions/setup-java@v3
29+
uses: actions/setup-java@v4
3030
with:
3131
java-version: ${{ matrix.java_version }}
3232
distribution: 'adopt' # use Corretto once supported https://github.com/actions/setup-java/issues/68
3333
# https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
3434
- name: Cache Maven packages
35-
uses: actions/cache@v3
35+
uses: actions/cache@v4
3636
with:
3737
path: ~/.m2
3838
key: ${{ runner.os }}-java${{ matrix.java_version }}-m2-${{ hashFiles('**/pom.xml') }}
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
mvn clean verify --activate-profiles=coverage,pack
4343
- name: Codecov upload
44-
uses: codecov/codecov-action@v1
44+
uses: codecov/codecov-action@v4
4545
with:
4646
token: ${{ secrets.CODECOV_TOKEN }}
4747
files: ./dbeam-core/target/site/jacoco/jacoco.xml
@@ -50,20 +50,15 @@ jobs:
5050
fail_ci_if_error: false # optional (default = false)
5151
verbose: true # optional (default = false)
5252
- name: End to end tests
53+
if: matrix.java_version == '17'
5354
run: ./e2e/e2e.sh
5455
- run: mkdir staging && cp /tmp/debeam_e2e.log ./staging
55-
- uses: actions/upload-artifact@v3
56-
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && matrix.java_version == '11'
56+
if: matrix.java_version == '17'
57+
- uses: actions/upload-artifact@v4
58+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && matrix.java_version == '17'
5759
with:
5860
name: Package
5961
path: staging
60-
update_release_draft:
61-
runs-on: ubuntu-latest
62-
steps:
63-
# Drafts your next Release notes as Pull Requests are merged into "main"
64-
- uses: release-drafter/release-drafter@v5
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6762
deploy:
6863
# https://docs.github.com/en/actions/guides/publishing-java-packages-with-maven#publishing-packages-to-github-packages
6964
name: Deploy
@@ -73,18 +68,19 @@ jobs:
7368
permissions:
7469
contents: read
7570
packages: write
76-
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
71+
# Disable it, since it was failing on sonatype deploy. TODO: fix
72+
if: false && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
7773
steps:
78-
- uses: actions/checkout@v3
74+
- uses: actions/checkout@v4
7975
# https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
8076
- name: Cache Maven packages
81-
uses: actions/cache@v3
77+
uses: actions/cache@v4
8278
with:
8379
path: ~/.m2
8480
key: Linux-java11-m2-${{ hashFiles('**/pom.xml') }}
8581
restore-keys: Linux-java11-m2
8682
- name: Set up JDK 11
87-
uses: actions/setup-java@v3
83+
uses: actions/setup-java@v4
8884
with:
8985
java-version: '11'
9086
distribution: 'adopt' # use Corretto once supported https://github.com/actions/setup-java/issues/68

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,14 @@ You can check the deployment in the following links:
287287
- https://github.com/spotify/dbeam/actions
288288
- https://oss.sonatype.org/#nexus-search;quick~dbeam-core
289289

290+
## Future roadmap
291+
292+
DBeam is mature, maintained and used in production since August 2017. No major features or development planned.
293+
Like Redis/[Redict](https://andrewkelley.me/post/redis-renamed-to-redict.html), DBeam can be considered a finished product.
294+
295+
> It can be maintained for decades to come with minimal effort. It can continue to provide a high amount of value for a low amount of labor.
296+
297+
290298
---
291299

292300
## License

e2e/e2e.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ readonly PROJECT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pw
1010

1111
# This file contatins psql views with complex types to validate and troubleshoot dbeam
1212

13-
PSQL_DOCKER_IMAGE=postgres:10
13+
PSQL_DOCKER_IMAGE=postgres:16
1414
PSQL_USER=postgres
15-
PSQL_PASSWORD=mysecretpassword
15+
PSQL_PASSWORD=tempandnotasecret
1616
PSQL_DB=dbeam_test
1717
DOCKER_NETWORK=dbeam1-network
18-
JAVA_DOCKER_IMAGE=gcr.io/distroless/java:11
18+
JAVA_DOCKER_IMAGE=gcr.io/distroless/java17-debian12
1919

2020
startPostgres() {
2121
set -o xtrace
@@ -26,7 +26,7 @@ startPostgres() {
2626
docker run --detach --name dbeam-postgres \
2727
--net "$DOCKER_NETWORK" \
2828
--env "POSTGRES_DB=dbeam_test" \
29-
--env "POSTGRES_PASSWORD=mysecretpassword" \
29+
--env "POSTGRES_PASSWORD=$PSQL_PASSWORD" \
3030
--mount="type=bind,source=/tmp/pgdata,target=/var/lib/postgresql/data" \
3131
--publish="54321:5432/tcp" "$PSQL_DOCKER_IMAGE" || docker start dbeam-postgres
3232
sleep 1
@@ -35,13 +35,13 @@ startPostgres() {
3535
# https://stackoverflow.com/questions/35069027/docker-wait-for-postgresql-to-be-running
3636
time docker run --interactive --rm \
3737
--net "$DOCKER_NETWORK" \
38-
--env "PGPASSWORD=mysecretpassword" \
38+
--env "PGPASSWORD=$PSQL_PASSWORD" \
3939
"$PSQL_DOCKER_IMAGE" \
4040
timeout 45s bash -xc 'until psql -h dbeam-postgres -U postgres dbeam_test -c "select 1"; do sleep 1; done; echo "psql up and running.."'
4141
sleep 3
4242
time docker run --interactive --rm \
4343
--net "$DOCKER_NETWORK" \
44-
--env "PGPASSWORD=mysecretpassword" \
44+
--env "PGPASSWORD=$PSQL_PASSWORD" \
4545
"$PSQL_DOCKER_IMAGE" \
4646
timeout 30s psql -h dbeam-postgres -U postgres dbeam_test < "$SCRIPT_PATH/ddl.sql"
4747
timeout 1 bash -c "cat < /dev/null > /dev/tcp/0.0.0.0/54321" && echo "success"

pom.xml

+29-16
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@
104104
<avro.version>1.11.3</avro.version>
105105
<bouncycastle.version>1.77</bouncycastle.version>
106106
<!--Ensure Beam SDK compatibility-->
107-
<!-- https://github.com/apache/beam/blob/release-2.54.0/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy#L600 -->
108-
<beam.version>2.54.0</beam.version>
109-
<!--https://storage.googleapis.com/cloud-opensource-java-dashboard/com.google.cloud/libraries-bom/26.32.0/index.html -->
110-
<google-cloud-libraries-bom.version>26.32.0</google-cloud-libraries-bom.version>
111-
<guava.version>33.0.0-jre</guava.version>
107+
<!-- https://github.com/apache/beam/blob/release-2.55.0/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy#L600 -->
108+
<beam.version>2.55.0</beam.version>
109+
<!--https://storage.googleapis.com/cloud-opensource-java-dashboard/com.google.cloud/libraries-bom/26.34.0/index.html -->
110+
<google-cloud-libraries-bom.version>26.34.0</google-cloud-libraries-bom.version>
111+
<guava.version>33.1.0-jre</guava.version>
112112
<hamcrest.version>2.2</hamcrest.version>
113113
<junit.version>4.13.2</junit.version>
114114
<jackson.version>2.16.2</jackson.version>
@@ -161,13 +161,28 @@
161161
<dependency>
162162
<groupId>com.google.apis</groupId>
163163
<artifactId>google-api-services-storage</artifactId>
164-
<version>v1-rev20240202-2.0.0</version>
164+
<version>v1-rev20240209-2.0.0</version>
165165
</dependency>
166166
<dependency>
167167
<groupId>commons-codec</groupId>
168168
<artifactId>commons-codec</artifactId>
169169
<version>1.16.1</version>
170170
</dependency>
171+
<dependency>
172+
<groupId>org.apache.commons</groupId>
173+
<artifactId>commons-compress</artifactId>
174+
<version>1.26.1</version>
175+
</dependency>
176+
<dependency>
177+
<groupId>org.apache.commons</groupId>
178+
<artifactId>commons-lang3</artifactId>
179+
<version>3.14.0</version>
180+
</dependency>
181+
<dependency>
182+
<groupId>net.bytebuddy</groupId>
183+
<artifactId>byte-buddy</artifactId>
184+
<version>1.14.12</version>
185+
</dependency>
171186
<!-- overrides to resolve dependency conflicts - end-->
172187
<!-- overrides with vulnerability fixes - start-->
173188
<dependency>
@@ -249,12 +264,6 @@
249264
<groupId>org.apache.beam</groupId>
250265
<artifactId>beam-runners-direct-java</artifactId>
251266
<version>${beam.version}</version>
252-
<exclusions>
253-
<exclusion>
254-
<groupId>org.hamcrest</groupId>
255-
<artifactId>hamcrest</artifactId>
256-
</exclusion>
257-
</exclusions>
258267
</dependency>
259268
<dependency>
260269
<groupId>org.apache.beam</groupId>
@@ -265,10 +274,6 @@
265274
<groupId>junit</groupId>
266275
<artifactId>junit</artifactId>
267276
</exclusion>
268-
<exclusion>
269-
<groupId>org.hamcrest</groupId>
270-
<artifactId>hamcrest</artifactId>
271-
</exclusion>
272277
<exclusion>
273278
<groupId>com.google.api.grpc</groupId>
274279
<artifactId>grpc-google-cloud-pubsub-v1</artifactId>
@@ -380,6 +385,14 @@
380385
<artifactId>mysql-socket-factory-connector-j-8</artifactId>
381386
<version>${socket-factory.version}</version>
382387
</dependency>
388+
<dependency>
389+
<groupId>org.hamcrest</groupId>
390+
<artifactId>hamcrest</artifactId>
391+
<version>${hamcrest.version}</version>
392+
<!-- Needed for PipelineOptionRegistrar auto-service that registered TestPipelineOptions interfaces-->
393+
<!--https://github.com/apache/beam/issues/18593-->
394+
<!--https://github.com/apache/beam/pull/30637/files-->
395+
</dependency>
383396

384397
<!-- Test Deps -->
385398

0 commit comments

Comments
 (0)