Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/improved-ks…
Browse files Browse the repository at this point in the history
…tream

# Conflicts:
#	streams-bootstrap-core/build.gradle.kts
#	streams-bootstrap-core/src/test/java/com/bakdata/kafka/integration/StreamsRunnerTest.java
  • Loading branch information
philipp94831 committed Jan 27, 2025
2 parents 322eb93 + f3b181b commit 8f1b481
Show file tree
Hide file tree
Showing 37 changed files with 1,746 additions and 1,043 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build-and-publish:
name: Java Gradle
uses: bakdata/ci-templates/.github/workflows/java-gradle-library.yaml@1.43.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-library.yaml@1.56.0
with:
java-version: 17
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Lint Helm chart
uses: bakdata/ci-templates/actions/helm-lint@1.46.3
uses: bakdata/ci-templates/actions/helm-lint@1.54.1
with:
lint-config-path: ".github/lint-config.yaml"
ref: ${{ github.ref_name }}
7 changes: 4 additions & 3 deletions .github/workflows/helm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: bakdata/ci-templates/actions/checkout@1.32.0

- name: Set up Gradle with version ${{ inputs.gradle-version }}
uses: bakdata/ci-templates/actions/java-gradle-setup@1.42.0
uses: bakdata/ci-templates/actions/java-gradle-setup@1.54.1
with:
java-distribution: "microsoft"
java-version: "11"
Expand All @@ -29,9 +29,10 @@ jobs:
echo "version=$version" >> "$GITHUB_OUTPUT"
shell: bash

call-workflow-passing-data:

helm-publish:
name: Publish Helm chart
uses: bakdata/ci-templates/.github/workflows/helm-multi-release.yaml@1.46.3
uses: bakdata/ci-templates/.github/workflows/helm-multi-release.yaml@1.54.1
needs: get-gradle-version
with:
charts-path: "./charts"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
java-gradle-release:
name: Java Gradle
uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.43.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.56.0
with:
java-version: 17
release-type: "${{ inputs.release-type }}"
Expand Down
49 changes: 47 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@
# Change Log

## [3.1.0](https://github.com/bakdata/streams-bootstrap/tree/3.1.0) (2024-12-05)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.1.0...3.1.0)
## [3.5.1](https://github.com/bakdata/streams-bootstrap/tree/3.5.1) (2025-01-23)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.5.1...3.5.1)


## [3.5.1](https://github.com/bakdata/streams-bootstrap/tree/3.5.1) (2025-01-23)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.5.0...3.5.1)

**Closed issues:**

- Close method is called twice on shutdown [\#263](https://github.com/bakdata/streams-bootstrap/issues/263)

**Merged pull requests:**

- Call close on KafkaApplication only once [\#275](https://github.com/bakdata/streams-bootstrap/pull/275) ([@philipp94831](https://github.com/philipp94831))

## [3.5.0](https://github.com/bakdata/streams-bootstrap/tree/3.5.0) (2025-01-20)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.4.0...3.5.0)

**Merged pull requests:**

- Run tests in parallel [\#274](https://github.com/bakdata/streams-bootstrap/pull/274) ([@philipp94831](https://github.com/philipp94831))
- Use Awaitility [\#273](https://github.com/bakdata/streams-bootstrap/pull/273) ([@philipp94831](https://github.com/philipp94831))
- Add methods for simplified testing of Kafka endpoints [\#270](https://github.com/bakdata/streams-bootstrap/pull/270) ([@philipp94831](https://github.com/philipp94831))
- Fix Helm publish [\#271](https://github.com/bakdata/streams-bootstrap/pull/271) ([@yannick-roeder](https://github.com/yannick-roeder))

## [3.4.0](https://github.com/bakdata/streams-bootstrap/tree/3.4.0) (2025-01-09)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.3.0...3.4.0)

**Merged pull requests:**

- Use Confluent MockSchemaRegistry [\#269](https://github.com/bakdata/streams-bootstrap/pull/269) ([@philipp94831](https://github.com/philipp94831))
- Upgrade large\-message to 2.9 [\#268](https://github.com/bakdata/streams-bootstrap/pull/268) ([@philipp94831](https://github.com/philipp94831))

## [3.3.0](https://github.com/bakdata/streams-bootstrap/tree/3.3.0) (2025-01-08)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.2.0...3.3.0)

**Merged pull requests:**

- Upgrade to Kafka 3.8 [\#267](https://github.com/bakdata/streams-bootstrap/pull/267) ([@philipp94831](https://github.com/philipp94831))

## [3.2.0](https://github.com/bakdata/streams-bootstrap/tree/3.2.0) (2025-01-07)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.1.0...3.2.0)

**Merged pull requests:**

- Upgrade to Kafka 3.7 [\#266](https://github.com/bakdata/streams-bootstrap/pull/266) ([@philipp94831](https://github.com/philipp94831))
- Replace kafka\-junit with testcontainers [\#264](https://github.com/bakdata/streams-bootstrap/pull/264) ([@philipp94831](https://github.com/philipp94831))
- Fix version in README [\#262](https://github.com/bakdata/streams-bootstrap/pull/262) ([@philipp94831](https://github.com/philipp94831))

## [3.1.0](https://github.com/bakdata/streams-bootstrap/tree/3.1.0) (2024-12-05)
[View commits](https://github.com/bakdata/streams-bootstrap/compare/3.0.4...3.1.0)
Expand Down
14 changes: 5 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
plugins {
id("com.bakdata.release") version "1.4.0"
id("com.bakdata.sonar") version "1.4.0"
id("com.bakdata.sonatype") version "1.4.1"
id("io.freefair.lombok") version "8.4"
id("com.bakdata.release") version "1.6.1"
id("com.bakdata.sonar") version "1.6.1"
id("com.bakdata.sonatype") version "1.6.1"
id("io.freefair.lombok") version "8.11"
}

allprojects {
group = "com.bakdata.kafka"

tasks.withType<Test> {
maxParallelForks = 1 // Embedded Kafka does not reliably work in parallel since Kafka 3.0
useJUnitPlatform()
}

repositories {
mavenCentral()
maven(url = "https://packages.confluent.io/maven/")
Expand Down Expand Up @@ -67,6 +62,7 @@ configure<com.bakdata.gradle.SonatypeSettings> {

subprojects {
apply(plugin = "java-library")
apply(plugin = "java-test-fixtures")
apply(plugin = "io.freefair.lombok")

configure<JavaPluginExtension> {
Expand Down
22 changes: 11 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version=3.1.1-SNAPSHOT
version=3.5.2-SNAPSHOT
org.gradle.caching=true
# running Kafka JUnit in parallel causes problems
org.gradle.parallel=false
kafkaVersion=3.6.1
kafkaJunitVersion=3.6.0
confluentVersion=7.6.0
fluentKafkaVersion=2.14.0
junitVersion=5.10.2
mockitoVersion=5.11.0
assertJVersion=3.25.3
log4jVersion=2.23.1
org.gradle.parallel=true
kafkaVersion=3.8.1
testContainersVersion=1.20.4
confluentVersion=7.8.0
fluentKafkaVersion=3.0.0
junitVersion=5.11.4
mockitoVersion=5.15.2
assertJVersion=3.27.2
log4jVersion=2.24.3
awaitilityVersion=4.2.2
org.gradle.jvmargs=-Xmx4096m
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
15 changes: 4 additions & 11 deletions streams-bootstrap-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

dependencies {
api(project(":streams-bootstrap-core"))
api(group = "info.picocli", name = "picocli", version = "4.7.5")
api(group = "info.picocli", name = "picocli", version = "4.7.6")

val junitVersion: String by project
testRuntimeOnly(group = "org.junit.jupiter", name = "junit-jupiter-engine", version = junitVersion)
Expand All @@ -17,17 +17,10 @@ dependencies {
val mockitoVersion: String by project
testImplementation(group = "org.mockito", name = "mockito-core", version = mockitoVersion)
testImplementation(group = "org.mockito", name = "mockito-junit-jupiter", version = mockitoVersion)
val kafkaJunitVersion: String by project
testImplementation(group = "net.mguenther.kafka", name = "kafka-junit", version = kafkaJunitVersion) {
exclude(group = "org.slf4j", module = "slf4j-log4j12")
}
testImplementation(testFixtures(project(":streams-bootstrap-core")))
testImplementation(group = "com.ginsberg", name = "junit5-system-exit", version = "1.1.2")
val fluentKafkaVersion: String by project
testImplementation(
group = "com.bakdata.fluent-kafka-streams-tests",
name = "schema-registry-mock-junit5",
version = fluentKafkaVersion
)
val confluentVersion: String by project
testImplementation(group = "io.confluent", name = "kafka-streams-avro-serde", version = confluentVersion)
val log4jVersion: String by project
testImplementation(group = "org.apache.logging.log4j", name = "log4j-slf4j2-impl", version = log4jVersion)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2024 bakdata
* Copyright (c) 2025 bakdata
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -95,7 +95,7 @@ public abstract class KafkaApplication<R extends Runner, CR extends CleanUpRunne
private Map<String, String> kafkaConfig = emptyMap();

/**
* <p>This methods needs to be called in the executable custom application class inheriting from
* <p>This method needs to be called in the executable custom application class inheriting from
* {@code KafkaApplication}.</p>
* <p>This method calls System exit</p>
*
Expand All @@ -109,7 +109,7 @@ public static void startApplication(final KafkaApplication<?, ?, ?, ?, ?, ?, ?>
}

/**
* <p>This methods needs to be called in the executable custom application class inheriting from
* <p>This method needs to be called in the executable custom application class inheriting from
* {@code KafkaApplication}.</p>
*
* @param app An instance of the custom application class.
Expand Down Expand Up @@ -296,9 +296,7 @@ private void startApplication() {

private int execute(final ParseResult parseResult) {
this.startApplication();
final int exitCode = new CommandLine.RunLast().execute(parseResult);
this.close();
return exitCode;
return new CommandLine.RunLast().execute(parseResult);
}

@FunctionalInterface
Expand Down
Loading

0 comments on commit 8f1b481

Please sign in to comment.