-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match version of zstd-jni from core #2832
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@@ -460,7 +461,7 @@ dependencies { | |||
runtimeOnly 'com.fasterxml.woodstox:woodstox-core:6.4.0' | |||
runtimeOnly 'org.apache.ws.xmlschema:xmlschema-core:2.2.5' | |||
runtimeOnly 'org.apache.santuario:xmlsec:2.2.3' | |||
runtimeOnly 'com.github.luben:zstd-jni:1.5.2-1' | |||
runtimeOnly "com.github.luben:zstd-jni:${versions.zstd}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cwperks I haven't checked by do you happen to know why ZSTD is needed for security plugin? thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @reta, thank you for checking this up~ I think the one is related to the core changes about the snapshot compression. I think we dont rely on this for any part of our code, but we do have this related to the task :bundlePlugin
of build in build.gradle
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure, but it looks related to kafka.
This runtimeOnly dependency was added in the switch to the opensearch standard build.gradle file here: 03a224d
And it was upgraded once when kafka was upgraded: #2484
Kafka is one of the available sinks for audit logging.
I am taking a deeper look into what those runtimeOnly dependencies are in the build.gradle file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you folks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe its utilized here at runtime: https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/auditlog/sink/KafkaSink.java#L75-L85
There's more details on the KafkaProducer from IBM here: https://developer.ibm.com/articles/benefits-compression-kafka-messaging/
Codecov Report
@@ Coverage Diff @@
## main #2832 +/- ##
============================================
- Coverage 61.60% 61.56% -0.04%
+ Complexity 3414 3411 -3
============================================
Files 266 266
Lines 18917 18917
Branches 3303 3303
============================================
- Hits 11653 11647 -6
- Misses 5669 5670 +1
- Partials 1595 1600 +5 |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-2832-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 abcb3a2124b3bb8f5b8bd81c83c3fb5ddc5edd50
# Push it to GitHub
git push --set-upstream origin backport/backport-2832-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
I'll create a manual backport |
* Match version of zstd-jni from core Signed-off-by: Craig Perkins <[email protected]> * Add zstd version from core to force resolutions section Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
* Match version of zstd-jni from core Signed-off-by: Craig Perkins <[email protected]> * Add zstd version from core to force resolutions section Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
* Match version of zstd-jni from core Signed-off-by: Craig Perkins <[email protected]> * Add zstd version from core to force resolutions section Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Maciej Mierzwa <[email protected]>
* Match version of zstd-jni from core Signed-off-by: Craig Perkins <[email protected]> * Add zstd version from core to force resolutions section Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
* Match version of zstd-jni from core Signed-off-by: Craig Perkins <[email protected]> * Add zstd version from core to force resolutions section Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
* Match version of zstd-jni from core Signed-off-by: Craig Perkins <[email protected]> * Add zstd version from core to force resolutions section Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Sam <[email protected]>
Description
Currently
./gradlew assemble
is failing for the security plugin due to the addition ofzstd-jni
in core which the security plugin already has a runtime dependency on. This PR uses the version from core's version.properties to ensure there is a matching version.Related PR: opensearch-project/OpenSearch#2996
./gradlew assemble
is failing with the following error:Maintenance
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.