Skip to content

Commit 53978fb

Browse files
authored
Merge pull request #525 from RADAR-base/release-2.2.0
Release 2.2.0
2 parents b0fe110 + 421ae21 commit 53978fb

File tree

113 files changed

+3219
-2010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+3219
-2010
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
# Steps represent a sequence of tasks that will be executed as part of the job
2121
steps:
2222
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2424

25-
- uses: actions/setup-java@v2
25+
- uses: actions/setup-java@v3
2626
with:
2727
distribution: zulu
2828
java-version: 17
@@ -38,7 +38,7 @@ jobs:
3838
- name: Check
3939
run: ./gradlew check
4040

41-
- uses: actions/upload-artifact@v2
41+
- uses: actions/upload-artifact@v3
4242
if: always()
4343
with:
4444
name: integration-test-logs
@@ -53,10 +53,10 @@ jobs:
5353
# Steps represent a sequence of tasks that will be executed as part of the job
5454
steps:
5555
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
56-
- uses: actions/checkout@v2
56+
- uses: actions/checkout@v3
5757

5858
- name: Cache Docker layers
59-
uses: actions/cache@v2
59+
uses: actions/cache@v3
6060
with:
6161
path: /tmp/.buildx-cache
6262
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile', '**/*.gradle.kts', 'gradle.properties', 'src/main/**') }}
@@ -66,27 +66,27 @@ jobs:
6666
# Add Docker labels and tags
6767
- name: Docker meta
6868
id: docker_meta
69-
uses: crazy-max/ghaction-docker-meta@v2
69+
uses: docker/metadata-action@v4
7070
with:
7171
images: ${{ env.DOCKER_IMAGE }}
7272

7373
- name: Login to Docker Hub
74-
uses: docker/login-action@v1
74+
uses: docker/login-action@v2
7575
with:
7676
username: ${{ secrets.DOCKERHUB_USERNAME }}
7777
password: ${{ secrets.DOCKERHUB_TOKEN }}
7878

7979
# Setup docker build environment
8080
- name: Set up QEMU
81-
uses: docker/setup-qemu-action@v1
81+
uses: docker/setup-qemu-action@v2
8282

8383
- name: Set up Docker Buildx
84-
uses: docker/setup-buildx-action@v1
84+
uses: docker/setup-buildx-action@v2
8585

8686
- name: Build
87-
uses: docker/build-push-action@v2
87+
uses: docker/build-push-action@v3
8888
with:
89-
context: ./
89+
context: .
9090
file: ./Dockerfile
9191
cache-from: type=local,src=/tmp/.buildx-cache
9292
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max

.github/workflows/publish_snapshots.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
# Steps represent a sequence of tasks that will be executed as part of the job
1616
steps:
1717
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919

2020
- name: Has SNAPSHOT version
2121
id: is-snapshot
2222
run: grep 'version = ".*-SNAPSHOT"' build.gradle.kts
2323

24-
- uses: actions/setup-java@v2
24+
- uses: actions/setup-java@v3
2525
with:
2626
distribution: zulu
2727
java-version: 17

.github/workflows/release.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
# Steps represent a sequence of tasks that will be executed as part of the job
1717
steps:
1818
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020

21-
- uses: actions/setup-java@v2
21+
- uses: actions/setup-java@v3
2222
with:
2323
distribution: zulu
2424
java-version: 17
2525

2626
- name: Setup Gradle
27-
uses: gradle/gradle-build-action@v2
27+
uses: gradle/gradle-build-action@v3
2828

2929
# Compile code
3030
- name: Compile code
@@ -55,39 +55,37 @@ jobs:
5555

5656
# Steps represent a sequence of tasks that will be executed as part of the job
5757
steps:
58-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v3
5959

6060
# Add Docker labels and tags
6161
- name: Docker meta
6262
id: docker_meta
63-
uses: crazy-max/ghaction-docker-meta@v2
63+
uses: docker/metadata-action@v4
6464
with:
6565
images: ${{ env.DOCKER_IMAGE }}
6666
# output 2.1.2, 2.1 and 2
6767
tags: |
6868
type=semver,pattern={{version}}
6969
type=semver,pattern={{major}}.{{minor}}
70-
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
7170
7271
# Setup docker build environment
7372
- name: Set up QEMU
74-
uses: docker/setup-qemu-action@v1
73+
uses: docker/setup-qemu-action@v2
7574
- name: Set up Docker Buildx
76-
uses: docker/setup-buildx-action@v1
75+
uses: docker/setup-buildx-action@v2
7776

7877
- name: Login to DockerHub
79-
uses: docker/login-action@v1
78+
uses: docker/login-action@v2
8079
with:
8180
username: ${{ secrets.DOCKERHUB_USERNAME }}
8281
password: ${{ secrets.DOCKERHUB_TOKEN }}
8382

8483
- name: Build and push
8584
id: docker_build
86-
uses: docker/build-push-action@v2
85+
uses: docker/build-push-action@v3
8786
with:
88-
context: ./
87+
context: .
8988
file: ./Dockerfile
90-
# Allow running the image on the architectures supported by openjdk:11-jre-slim
9189
platforms: linux/amd64,linux/arm64
9290
push: true
9391
tags: ${{ steps.docker_meta.outputs.tags }}
@@ -99,7 +97,17 @@ jobs:
9997
org.opencontainers.image.vendor=RADAR-base
10098
org.opencontainers.image.licenses=Apache-2.0
10199
100+
- name: Build locally
101+
id: docker_build
102+
uses: docker/build-push-action@v3
103+
with:
104+
context: .
105+
file: ./Dockerfile
106+
platforms: linux/amd64
107+
load: true
108+
tags: ${{ steps.docker_meta.outputs.tags }}
109+
102110
- name: Inspect image
103111
run: |
104-
docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
105112
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
113+
docker run --rm ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} --help

.github/workflows/scheduled_snyk.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ jobs:
88
env:
99
REPORT_FILE: test.json
1010
steps:
11-
- uses: actions/checkout@master
11+
- uses: actions/checkout@v3
1212
- uses: snyk/actions/setup@master
13+
with:
14+
snyk-version: v1.931.0
1315

14-
- uses: actions/setup-java@v2
16+
- uses: actions/setup-java@v3
1517
with:
16-
distribution: zulu
18+
distribution: temurin
1719
java-version: 17
1820

1921
- name: Setup Gradle
@@ -27,3 +29,11 @@ jobs:
2729
--configuration-matching='^runtimeClasspath$'
2830
--json-file-output=${{ env.REPORT_FILE }}
2931
--org=radar-base
32+
33+
- name: Report new vulnerabilities
34+
uses: thehyve/report-vulnerability@master
35+
with:
36+
report-file: ${{ env.REPORT_FILE }}
37+
env:
38+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
if: ${{ failure() }}

.github/workflows/snyk.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ jobs:
77
security:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@master
10+
- uses: actions/checkout@v3
1111
- uses: snyk/actions/setup@master
12+
with:
13+
snyk-version: v1.931.0
1214

13-
- uses: actions/setup-java@v2
15+
- uses: actions/setup-java@v3
1416
with:
15-
distribution: zulu
17+
distribution: temurin
1618
java-version: 17
1719

1820
- name: Setup Gradle
@@ -23,7 +25,7 @@ jobs:
2325
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
2426
run: >
2527
snyk test
26-
--severity-threshold=high
2728
--configuration-matching='^runtimeClasspath$'
2829
--fail-on=upgradable
2930
--org=radar-base
31+
--severity-threshold=high

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ COPY ./src /code/src
2525

2626
RUN gradle jar --no-watch-fs
2727

28-
FROM azul/zulu-openjdk-alpine:17-jre-headless
28+
FROM eclipse-temurin:17-jre
2929

3030
MAINTAINER Joris Borgdorff <[email protected]>, Yatharth Ranjan<[email protected]>
3131

3232
LABEL description="RADAR-base output data restructuring"
3333

34-
ENV RADAR_OUTPUT_RESTRUCTURE_OPTS=""
35-
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -XX:+UseG1GC -XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=10"
34+
ENV RADAR_OUTPUT_RESTRUCTURE_OPTS="" \
35+
JAVA_OPTS="-XX:+UseG1GC -XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=10"
3636

3737
COPY --from=builder /code/build/third-party/* /usr/lib/
3838
COPY --from=builder /code/build/scripts/* /usr/bin/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ When upgrading to version 0.6.0 from version 0.5.x or earlier, please follow the
7070
This package is available as docker image [`radarbase/radar-output-restructure`](https://hub.docker.com/r/radarbase/radar-output-restructure). The entrypoint of the image is the current application. So in all the commands listed in usage, replace `radar-output-restructure` with for example:
7171

7272
```shell
73-
docker run --rm -t --network s3 -v "$PWD/output:/output" radarbase/radar-output-restructure:2.1.0 -o /output /myTopic
73+
docker run --rm -t --network s3 -v "$PWD/output:/output" radarbase/radar-output-restructure:2.2.0 -o /output /myTopic
7474
```
7575

7676
## Command line usage
@@ -182,7 +182,7 @@ This package requires at least Java JDK 8. Build the distribution with
182182
and install the package into `/usr/local` with for example
183183
```shell
184184
sudo mkdir -p /usr/local
185-
sudo tar -xzf build/distributions/radar-output-restructure-2.1.0.tar.gz -C /usr/local --strip-components=1
185+
sudo tar -xzf build/distributions/radar-output-restructure-2.2.0.tar.gz -C /usr/local --strip-components=1
186186
```
187187

188188
Now the `radar-output-restructure` command should be available.

build.gradle.kts

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ plugins {
1212
id("com.avast.gradle.docker-compose")
1313
id("com.github.ben-manes.versions")
1414
id("io.github.gradle-nexus.publish-plugin")
15+
id("org.jlleitschuh.gradle.ktlint") version "10.3.0"
1516
}
1617

1718
group = "org.radarbase"
18-
version = "2.1.0.1"
19+
version = "2.2.0"
1920

2021
repositories {
2122
mavenCentral()
@@ -24,8 +25,8 @@ repositories {
2425
description = "RADAR-base output restructuring"
2526
val website = "https://radar-base.org"
2627
val githubRepoName = "RADAR-base/radar-output-restructure"
27-
val githubUrl = "https://github.com/${githubRepoName}"
28-
val issueUrl = "${githubUrl}/issues"
28+
val githubUrl = "https://github.com/$githubRepoName"
29+
val issueUrl = "$githubUrl/issues"
2930

3031
sourceSets {
3132
create("integrationTest") {
@@ -50,6 +51,8 @@ dependencies {
5051
runtimeOnly("org.xerial.snappy:snappy-java:$snappyVersion")
5152

5253
implementation(kotlin("reflect"))
54+
val coroutinesVersion: String by project
55+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
5356

5457
val jacksonVersion: String by project
5558
api(platform("com.fasterxml.jackson:jackson-bom:$jacksonVersion"))
@@ -90,9 +93,12 @@ dependencies {
9093

9194
val log4jVersion: String by project
9295
runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion")
96+
runtimeOnly("org.apache.logging.log4j:log4j-api:$log4jVersion")
97+
runtimeOnly("org.apache.logging.log4j:log4j-jul:$log4jVersion")
9398

9499
val radarSchemasVersion: String by project
95100
testImplementation("org.radarbase:radar-schemas-commons:$radarSchemasVersion")
101+
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
96102

97103
val junitVersion: String by project
98104
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
@@ -114,6 +120,10 @@ dependencies {
114120

115121
application {
116122
mainClass.set("org.radarbase.output.Application")
123+
applicationDefaultJvmArgs = listOf(
124+
"-Djava.security.egd=file:/dev/./urandom",
125+
"-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager",
126+
)
117127
}
118128

119129
distributions {
@@ -195,7 +205,6 @@ publishing {
195205
email.set("[email protected]")
196206
organization.set("The Hyve")
197207
}
198-
199208
}
200209
issueManagement {
201210
system.set("GitHub")
@@ -206,7 +215,7 @@ publishing {
206215
url.set(website)
207216
}
208217
scm {
209-
connection.set("scm:git:${githubUrl}")
218+
connection.set("scm:git:$githubUrl")
210219
url.set(githubUrl)
211220
}
212221
}
@@ -259,8 +268,9 @@ dockerCompose {
259268
isRequiredBy(integrationTest)
260269
}
261270

262-
val check by tasks
263-
check.dependsOn(integrationTest)
271+
tasks["composeUp"].dependsOn("composePull")
272+
273+
tasks["check"].dependsOn(integrationTest)
264274

265275
tasks.withType<Test> {
266276
useJUnitPlatform()
@@ -298,6 +308,11 @@ tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
298308
}
299309
}
300310

311+
ktlint {
312+
version.set("0.45.2")
313+
disabledRules.set(setOf("no-wildcard-imports"))
314+
}
315+
301316
tasks.wrapper {
302-
gradleVersion = "7.4.1"
317+
gradleVersion = "7.4.2"
303318
}

gradle.properties

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
kotlin.code.style=official
22

3-
kotlinVersion=1.6.10
4-
dokkaVersion=1.6.10
5-
dockerComposeVersion=0.15.2
3+
kotlinVersion=1.6.21
4+
dokkaVersion=1.6.21
5+
dockerComposeVersion=0.16.4
66
dependencyUpdateVersion=0.42.0
77
nexusPublishVersion=1.1.0
8-
jsoupVersion=1.14.3
8+
jsoupVersion=1.15.1
99

10+
coroutinesVersion=1.6.1
1011
avroVersion=1.11.0
1112
snappyVersion=1.1.8.4
12-
jacksonVersion=2.13.2.20220324
13+
jacksonVersion=2.13.3
1314
jCommanderVersion=1.82
1415
almworksVersion=1.1.2
15-
minioVersion=8.3.7
16+
minioVersion=8.4.1
1617
guavaVersion=31.1-jre
1718
opencsvVersion=5.6
1819
okhttpVersion=4.9.3
19-
jedisVersion=4.1.1
20+
jedisVersion=4.2.3
2021
slf4jVersion=1.7.36
2122
log4jVersion=2.17.2
22-
azureStorageVersion=12.15.0
23-
nettyVersion=4.1.75.Final
23+
azureStorageVersion=12.16.1
24+
nettyVersion=4.1.77.Final
2425

2526
junitVersion=5.8.2
2627
mockitoKotlinVersion=4.0.0
27-
radarSchemasVersion=0.7.7
28+
radarSchemasVersion=0.7.9

0 commit comments

Comments
 (0)