Skip to content
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

Merged
merged 2 commits into from
Jun 5, 2023
Merged

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Jun 2, 2023

Description

Currently ./gradlew assemble is failing for the security plugin due to the addition of zstd-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:

Execution failed for task ':bundlePlugin'.
> Could not resolve all dependencies for configuration ':runtimeClasspath'.
   > Conflict(s) found for the following module(s):
       - com.github.luben:zstd-jni between versions 1.5.5-3 and ${versions.zstd}
     Run with:
         --scan or
         :dependencyInsight --configuration runtimeClasspath --dependency com.github.luben:zstd-jni
     to get more insight on how to solve the conflict.
  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Maintenance

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

@@ -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}"
Copy link
Collaborator

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.

Copy link
Collaborator

@RyanL1997 RyanL1997 Jun 2, 2023

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.

Copy link
Member Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you folks

Copy link
Member Author

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #2832 (80d4c33) into main (76a5d7f) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@             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     

see 3 files with indirect coverage changes

@cwperks cwperks merged commit abcb3a2 into opensearch-project:main Jun 5, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

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 base branch is 2.x and the compare/head branch is backport/backport-2832-to-2.x.

@cwperks
Copy link
Member Author

cwperks commented Jun 5, 2023

I'll create a manual backport

RyanL1997 pushed a commit to RyanL1997/security that referenced this pull request Jun 9, 2023
* 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]>
MaciejMierzwa pushed a commit to MaciejMierzwa/security that referenced this pull request Jun 13, 2023
* 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]>
MaciejMierzwa pushed a commit to MaciejMierzwa/security that referenced this pull request Jun 13, 2023
* 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]>
RyanL1997 pushed a commit to RyanL1997/security that referenced this pull request Jun 13, 2023
* 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]>
samuelcostae pushed a commit to samuelcostae/security that referenced this pull request Jun 19, 2023
* 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]>
samuelcostae pushed a commit to samuelcostae/security that referenced this pull request Jun 19, 2023
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants