Skip to content

Manage Kotlin dependencies#26684

Open
thll wants to merge 6 commits into
masterfrom
add/kotlin-dep-mgmt
Open

Manage Kotlin dependencies#26684
thll wants to merge 6 commits into
masterfrom
add/kotlin-dep-mgmt

Conversation

@thll

@thll thll commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Adds dependency management for Kotlin, which is used transitively by the graylog2-server module but also required by the enterprise plugin.

By managing the Kotlin dependencies, we can ensure a consistent version.

Also excludes the dependencies required for Glue schema serde support from the Kinesis client. We are not using that functionality and it and rather relying on upwards compatibility, we exclude it. To make sure that the Kinesis consumer is still functional, I've added a very basic integration test.

Dependency tree:

before:

./mvnw -pl org.graylog2:graylog2-server dependency:tree -Dverbose -Dincludes='org.jetbrains.kotlin:*,org.jetbrains.kotlinx:*'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: aarch_64
[INFO] os.detected.bitness: 64
[INFO] os.detected.version: 26.5
[INFO] os.detected.version.major: 26
[INFO] os.detected.version.minor: 5
[INFO] os.detected.classifier: osx-aarch_64
[INFO]
[INFO] --------------------< org.graylog2:graylog2-server >--------------------
[INFO] Building Graylog 7.2.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- dependency:3.7.0:tree (default-cli) @ graylog2-server ---
[INFO] org.graylog2:graylog2-server:jar:7.2.0-SNAPSHOT
[INFO] +- com.squareup.okhttp3:okhttp-jvm:jar:5.4.0:compile
[INFO] |  +- org.jetbrains.kotlin:kotlin-stdlib:jar:2.1.21:compile (scope not updated to compile)
[INFO] |  \- com.squareup.okio:okio-jvm:jar:3.17.0:compile (scope not updated to compile)
[INFO] |     \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.1.21:compile - omitted for duplicate)
[INFO] +- com.squareup.retrofit2:retrofit:jar:3.0.0:compile
[INFO] |  +- com.squareup.okhttp3:okhttp:jar:5.4.0:compile (version managed from 4.12.0; scope not updated to compile)
[INFO] |  |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.1.21:runtime - omitted for duplicate)
[INFO] |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.1.21:compile - omitted for duplicate)
[INFO] +- com.squareup.okhttp3:okhttp-tls:jar:5.4.0:test
[INFO] |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.1.21:test - omitted for duplicate)
[INFO] +- software.amazon.kinesis:amazon-kinesis-client:jar:3.5.0:compile
[INFO] |  \- software.amazon.glue:schema-registry-serde:jar:1.1.27:compile
[INFO] |     +- com.kjetland:mbknor-jackson-jsonschema_2.12:jar:1.0.39:compile
[INFO] |     |  \- (org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:jar:1.3.50:compile - omitted for conflict with 1.9.25)
[INFO] |     +- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:compile - omitted for conflict with 2.1.21)
[INFO] |     +- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.9.25:compile
[INFO] |     |  +- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:compile - omitted for conflict with 2.1.21)
[INFO] |     |  \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.9.25:compile
[INFO] |     |     \- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:compile - omitted for conflict with 2.1.21)
[INFO] |     +- org.jetbrains.kotlin:kotlin-reflect:jar:1.9.25:compile
[INFO] |     |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:compile - omitted for conflict with 2.1.21)
[INFO] |     +- org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:jar:1.9.25:compile
[INFO] |     |  +- org.jetbrains.kotlin:kotlin-scripting-common:jar:1.9.25:runtime
[INFO] |     |  |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:runtime - omitted for conflict with 2.1.21)
[INFO] |     |  +- org.jetbrains.kotlin:kotlin-scripting-jvm:jar:1.9.25:runtime
[INFO] |     |  |  +- org.jetbrains.kotlin:kotlin-script-runtime:jar:1.9.25:runtime
[INFO] |     |  |  +- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:runtime - omitted for conflict with 2.1.21)
[INFO] |     |  |  \- (org.jetbrains.kotlin:kotlin-scripting-common:jar:1.9.25:runtime - omitted for duplicate)
[INFO] |     |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:runtime - omitted for conflict with 2.1.21)
[INFO] |     +- org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:jar:1.9.25:compile
[INFO] |     |  +- (org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:jar:1.9.25:runtime - omitted for duplicate)
[INFO] |     |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:runtime - omitted for conflict with 2.1.21)
[INFO] |     +- com.squareup.okio:okio-fakefilesystem:jar:3.2.0:compile
[INFO] |     |  \- com.squareup.okio:okio-fakefilesystem-jvm:jar:3.2.0:compile (scope not updated to compile)
[INFO] |     |     +- (org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.6.20:compile - omitted for conflict with 1.9.25)
[INFO] |     |     +- org.jetbrains.kotlinx:kotlinx-datetime-jvm:jar:0.3.2:compile
[INFO] |     |     |  +- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.6.0:compile - omitted for conflict with 2.1.21)
[INFO] |     |     |  \- (org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.6.0:compile - omitted for conflict with 1.7.10)
[INFO] |     |     \- (org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.6.20:compile - omitted for conflict with 1.7.10)
[INFO] |     +- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:jar:1.4.0:compile
[INFO] |     |  +- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.7.10:compile - omitted for conflict with 2.1.21)
[INFO] |     |  +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.7.10:compile
[INFO] |     |  \- (org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.7.10:compile - omitted for conflict with 1.9.25)
[INFO] |     +- com.squareup.wire:wire-schema:jar:5.2.0:compile
[INFO] |     |  +- com.squareup.wire:wire-runtime:jar:5.2.0:runtime
[INFO] |     |  |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:runtime - omitted for conflict with 2.1.21)
[INFO] |     |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:runtime - omitted for conflict with 2.1.21)
[INFO] |     \- com.squareup.wire:wire-compiler:jar:5.2.0:compile
[INFO] |        +- com.squareup.wire:wire-schema-jvm:jar:5.2.0:compile (scope not updated to compile)
[INFO] |        |  +- com.squareup:kotlinpoet-jvm:jar:2.0.0:compile (scope not updated to compile)
[INFO] |        |  |  +- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.10:compile - omitted for conflict with 2.1.21)
[INFO] |        |  |  \- (org.jetbrains.kotlin:kotlin-reflect:jar:2.0.10:runtime - omitted for conflict with 1.9.25)
[INFO] |        |  +- com.squareup.wire:wire-runtime-jvm:jar:5.2.0:compile (scope not updated to compile)
[INFO] |        |  |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:compile - omitted for conflict with 2.1.21)
[INFO] |        |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:compile - omitted for conflict with 2.1.21)
[INFO] |        +- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:compile - omitted for conflict with 2.1.21)
[INFO] |        +- com.squareup.wire:wire-kotlin-generator:jar:5.2.0:runtime
[INFO] |        |  +- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:runtime - omitted for conflict with 2.1.21)
[INFO] |        |  \- com.squareup.wire:wire-grpc-client-jvm:jar:5.2.0:runtime
[INFO] |        |     +- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:jar:1.9.0:runtime
[INFO] |        |     |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.0:runtime - omitted for conflict with 2.1.21)
[INFO] |        |     \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:runtime - omitted for conflict with 2.1.21)
[INFO] |        +- com.squareup.wire:wire-java-generator:jar:5.2.0:runtime
[INFO] |        |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:runtime - omitted for conflict with 2.1.21)
[INFO] |        +- com.squareup.wire:wire-swift-generator:jar:5.2.0:runtime
[INFO] |        |  +- io.outfoxx:swiftpoet:jar:1.6.5:runtime
[INFO] |        |  |  +- (org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.7.21:runtime - omitted for conflict with 1.9.25)
[INFO] |        |  |  \- (org.jetbrains.kotlin:kotlin-reflect:jar:1.7.21:runtime - omitted for conflict with 1.9.25)
[INFO] |        |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:runtime - omitted for conflict with 2.1.21)
[INFO] |        +- (org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:jar:1.7.3:runtime - omitted for conflict with 1.4.0)
[INFO] |        \- com.charleskorn.kaml:kaml-jvm:jar:0.67.0:runtime
[INFO] |           +- (org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:jar:1.7.3:runtime - omitted for conflict with 1.4.0)
[INFO] |           +- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.21:runtime - omitted for conflict with 2.1.21)
[INFO] |           \- it.krzeminski:snakeyaml-engine-kmp-jvm:jar:3.0.3:runtime
[INFO] |              +- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.0.10:runtime - omitted for conflict with 2.1.21)
[INFO] |              \- net.thauvin.erik.urlencoder:urlencoder-lib-jvm:jar:1.6.0:runtime
[INFO] |                 \- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.24:runtime - omitted for conflict with 2.1.21)
[INFO] \- com.squareup.okhttp3:mockwebserver3:jar:5.4.0:test
[INFO]    \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.1.21:test - omitted for duplicate)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.062 s
[INFO] Finished at: 2026-07-17T13:14:14+02:00
[INFO] ------------------------------------------------------------------------

after:

./mvnw -pl org.graylog2:graylog2-server dependency:tree -Dverbose -Dincludes='org.jetbrains.kotlin:*,org.jetbrains.kotlinx:*'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: aarch_64
[INFO] os.detected.bitness: 64
[INFO] os.detected.version: 26.5
[INFO] os.detected.version.major: 26
[INFO] os.detected.version.minor: 5
[INFO] os.detected.classifier: osx-aarch_64
[INFO]
[INFO] --------------------< org.graylog2:graylog2-server >--------------------
[INFO] Building Graylog 7.2.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- dependency:3.7.0:tree (default-cli) @ graylog2-server ---
[INFO] org.graylog2:graylog2-server:jar:7.2.0-SNAPSHOT
[INFO] +- com.squareup.okhttp3:okhttp-jvm:jar:5.4.0:compile
[INFO] |  +- org.jetbrains.kotlin:kotlin-stdlib:jar:2.3.21:compile (version managed from 2.1.21; scope not updated to compile)
[INFO] |  \- com.squareup.okio:okio-jvm:jar:3.17.0:compile (scope not updated to compile)
[INFO] |     \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.3.21:compile - version managed from 2.1.21; omitted for duplicate)
[INFO] +- com.squareup.retrofit2:retrofit:jar:3.0.0:compile
[INFO] |  +- com.squareup.okhttp3:okhttp:jar:5.4.0:compile (version managed from 4.12.0)
[INFO] |  |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.3.21:runtime - version managed from 2.1.21; omitted for duplicate)
[INFO] |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.3.21:compile - version managed from 2.1.21; omitted for duplicate)
[INFO] +- com.squareup.okhttp3:okhttp-tls:jar:5.4.0:test
[INFO] |  \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.3.21:test - version managed from 2.1.21; omitted for duplicate)
[INFO] \- com.squareup.okhttp3:mockwebserver3:jar:5.4.0:test
[INFO]    \- (org.jetbrains.kotlin:kotlin-stdlib:jar:2.3.21:test - version managed from 2.1.21; omitted for duplicate)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.342 s
[INFO] Finished at: 2026-07-17T13:15:28+02:00
[INFO] ------------------------------------------------------------------------

/prd https://github.com/Graylog2/graylog-plugin-enterprise/pull/14880
/nocl not user-facing

thll and others added 5 commits July 16, 2026 15:19
Materialize the KCL config objects as locals (ConfigsBuilder accessors
create a new instance per call) and add a no-op hook so integration
tests can tune KCL coordination timings. Also extract the KCL
application name derivation into a package-private method so tests
can pre-seed the lease table without duplicating the format.
No production behavior change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Runs Floci (MIT-licensed, LocalStack-API-compatible) with Kinesis and
DynamoDB. LocalStack itself is not an option: its free tier prohibits
commercial use since March 2026 and the image requires an auth token.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Boots the KCL Scheduler end-to-end against a local Kinesis+DynamoDB
emulator and verifies a record round-trip in a few seconds. KCL
coordination timings are tuned via the test seam, and the consumer
runs in KCL's 2.x-compatible lease assignment mode because the 3.x
default requires worker-utilization metrics and EC2 platform detection
that do not exist in a local test environment. The lease table is
pre-seeded with an unowned TRIM_HORIZON lease to bypass KCL's random
1-30s initial lease-sync jitter; there is deliberately no fallback,
so if KCL ever stops honoring the pre-seeded lease the test fails by
timeout instead of silently passing slower.

Guards the schema-registry-serde exclusion and future
amazon-kinesis-client upgrades.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thll
thll marked this pull request as ready for review July 17, 2026 11:20
@thll
thll requested review from a team and danotorrey July 17, 2026 11:20
@thll

thll commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@danotorrey, if you have the capacity, it would be great if you could have a look at the Kinesis client related changes.

@danotorrey danotorrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thll The Kinesis changes LGTM and tests successfully. Thanks also for the IT. That's a nice addition to exercise the KCL in a self-contained way.

@luk-kaminski
luk-kaminski self-requested a review July 20, 2026 12:43

@luk-kaminski luk-kaminski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants