-
Notifications
You must be signed in to change notification settings - Fork 276
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
[Build Break] Update imports for files refactored in core PR #8157 #3003
[Build Break] Update imports for files refactored in core PR #8157 #3003
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #3003 +/- ##
============================================
- Coverage 62.43% 62.27% -0.16%
+ Complexity 3380 3368 -12
============================================
Files 267 267
Lines 19772 19772
Branches 3355 3355
============================================
- Hits 12345 12314 -31
- Misses 5790 5813 +23
- Partials 1637 1645 +8
|
This needs updated common-utils artifacts which may be available now after merge of opensearch-project/common-utils#486 |
Signed-off-by: Craig Perkins <[email protected]>
bwc-test/build.gradle
Outdated
@@ -69,7 +69,7 @@ repositories { | |||
dependencies { | |||
testImplementation 'com.google.guava:guava:30.0-jre' | |||
testImplementation "org.opensearch.test:framework:${opensearch_version}" | |||
testImplementation 'org.apache.logging.log4j:log4j-core:2.17.1' | |||
testImplementation 'org.apache.logging.log4j:log4j-core:2.20.0' |
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.
Updated this to match the version in core to try to resolve the issue in bwc test. I'm not sure why this dependency is required here or if the version from core's buildSrc/version.properties can be referenced in this build.gradle file. This is a separate gradle build file from the one at the top level.
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.
@peternied @willyborankin Are either of you available to help diagnose the issue with bwc test on this PR? I'm not very familiar with testclusters and not sure if any change needs to be done here or another branch to get those checks working.
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.
The root cause is:
» java.lang.NoClassDefFoundError: org/opensearch/core/common/settings/SecureString
» at org.opensearch.security.ssl.SecureSSLSettings$InsecureFallbackStringSetting.<init>(SecureSSLSettings.java:113)
» at org.opensearch.security.ssl.SecureSSLSettings$SSLSetting.asSetting(SecureSSLSettings.java:78)
» at org.opensearch.security.ssl.SecureSSLSettings.lambda$getSecureSettings$0(SecureSSLSettings.java:101)
» at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
» at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
» at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
» at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
» at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
» at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
» at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
» at org.opensearch.security.ssl.SecureSSLSettings.getSecureSettings(SecureSSLSettings.java:102)
but I can't tell why that class isn't found because it exists on the main branch of core. It does not exist on 2.x, but in 2.x it uses the correct import for that class.
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.
It looks like its not using the HEAD of main for core when building the testcluster based off main
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.
Regarding BWC it does not use OS versioning for log4j ... I missed it when prepared fix in other places
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.
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.
@willyborankin I invited you to be a collaborator on my fork if you want to push changes directly to this branch.
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.
Does this line in the bwc test workflow mean its checking out main instead of the PR branch? https://github.com/opensearch-project/security/blob/main/.github/workflows/bwc-tests.yml#L41
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 now it fails since it takes latest version. If i understand gradle script. So theoretically after merging of this PR it should start building the plugin :-)
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.
Does this line in the bwc test workflow mean its checking out main instead of the PR branch? https://github.com/opensearch-project/security/blob/main/.github/workflows/bwc-tests.yml#L41
yes it is. thats why i think if we merge your changes most probably it will fix BWC since previous problems were related to libraries only
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Thank you @reta! I was hoping to unblock the release notes PR, but I'll instead make a targeted manual backport to ensure that gets into the 2.9 branch |
Release notes PR targeting 2.9 branch: #3007 |
Signed-off-by: Craig Perkins <[email protected]>
c1eb5b8
Some tests started failing after this PR: opensearch-project/OpenSearch#8084 Updating the tests that assert expected number of HTTP Headers in a response now. |
Failing tests:
|
Signed-off-by: Craig Perkins <[email protected]>
@opensearch-project/engineering-effectiveness I believe the failing checks on this PR are due to a stale minimum distribution of 3.0.0. This PR is needed to unblock many security PRs and make the main branch stable. Can you trigger a new minimum distribution build? Security needs this change included: opensearch-project/OpenSearch#8157 |
@jordarlu Could you help in creating a new min distribution build for 3.0.0 to unblock this PR? |
Hi, @cwperks , pls check out this latest 3.0.0 min build with only the Core - https://build.ci.opensearch.org/job/distribution-build-opensearch/8177/console. thanks |
Looks like the BWC test are having trouble that we might not be able to easly mitigate - let retrigger and make sure we have a clean integration test run and the we can seperately work on the BWC issue |
Signed-off-by: Craig Perkins <[email protected]>
@peternied FYI I ran the failing checks on an EC2 instance and they passed.
Tested using JDK 14 |
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-3003-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 37aacdc0ceab4462498c9bdf339e6e0b5d30ef80
# Push it to GitHub
git push --set-upstream origin backport/backport-3003-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 |
…ect#3003) * Update imports for files refactored in core PR #8157 Signed-off-by: Craig Perkins <[email protected]> * Update references to old packages in test files Signed-off-by: Craig Perkins <[email protected]> * Get remaining bad imports in integrationTest Signed-off-by: Craig Perkins <[email protected]> * Update log4j in bwc build.gradle Signed-off-by: Craig Perkins <[email protected]> * Use versions.log4j Signed-off-by: Craig Perkins <[email protected]> * Also reference guava version Signed-off-by: Craig Perkins <[email protected]> * Update integtest.sh Signed-off-by: Craig Perkins <[email protected]> * Update tests that expect certain amount of headers in a response Signed-off-by: Craig Perkins <[email protected]> * Empty commit Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit 37aacdc)
…3003) (#3036) * Update imports for files refactored in core PR #8157 (#3003) * Update imports for files refactored in core PR #8157 Signed-off-by: Craig Perkins <[email protected]> * Update references to old packages in test files Signed-off-by: Craig Perkins <[email protected]> * Get remaining bad imports in integrationTest Signed-off-by: Craig Perkins <[email protected]> * Update log4j in bwc build.gradle Signed-off-by: Craig Perkins <[email protected]> * Use versions.log4j Signed-off-by: Craig Perkins <[email protected]> * Also reference guava version Signed-off-by: Craig Perkins <[email protected]> * Update integtest.sh Signed-off-by: Craig Perkins <[email protected]> * Update tests that expect certain amount of headers in a response Signed-off-by: Craig Perkins <[email protected]> * Empty commit Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit 37aacdc) * Fixes Index import Signed-off-by: Darshit Chanpura <[email protected]> * Addresses dlicDlsFlsTest failures Signed-off-by: Darshit Chanpura <[email protected]> * Addresses PR feedback Signed-off-by: Darshit Chanpura <[email protected]> * Removed Integration Tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc versions to fix bwc tests Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Craig Perkins <[email protected]>
Description
Update imports in security plugin to react to changes introduced in opensearch-project/OpenSearch#8157
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.