Adding BWC test for remote publication enabled cluster#20221
Adding BWC test for remote publication enabled cluster#20221shwetathareja merged 3 commits intoopensearch-project:mainfrom
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis PR adds backward compatibility testing for OpenSearch clusters with remote publication enabled. It introduces a new test class, refactors the rolling upgrade build configuration with a helper function for centralized test task setup, and extends the test workflow to include remote cluster testing scenarios alongside existing local cluster tests. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20221 +/- ##
============================================
- Coverage 73.28% 73.26% -0.02%
- Complexity 71825 71896 +71
============================================
Files 5793 5793
Lines 328844 328846 +2
Branches 47343 47343
============================================
- Hits 240978 240930 -48
- Misses 68571 68617 +46
- Partials 19295 19299 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rajiv-kv
left a comment
There was a problem hiding this comment.
Can you include the build logs (from your local runs / remote jenkins) where the additional tests are able to run successfully with remote publication enabled ?
qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RemotePublicationClusterStateIT.java
Show resolved
Hide resolved
4bb7fe0 to
e3183fa
Compare
|
❌ Gradle check result for e3183fa: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RemotePublicationClusterStateIT.java (2)
85-97: Both persistent and transient settings use identical values.Both
addPersistentSettings()andaddTransientSettings()configure the samecluster.remote.cluster.seedspath with the same value. Transient settings take precedence over persistent ones, so the persistent setting is effectively shadowed.If the intent is to test that both setting types survive the rolling upgrade, consider using different values or different setting keys to distinguish them in verification.
143-150: Transient settings verification is missing.
verifySettingsInClusterState()only validates that persistent settings exist but doesn't verify the transient settings added byaddTransientSettings(). Consider adding verification for transient settings to ensure complete coverage.🔎 Suggested addition
private static void verifySettingsInClusterState() throws Exception { Request getSettingRequest = new Request("GET", "/_cluster/settings"); Response response = client().performRequest(getSettingRequest); assertOK(response); Map<String, Object> responseMap = entityAsMap(response); Map<String, Object> persistent = (Map<String, Object>) responseMap.get("persistent"); assertNotNull("Persistent settings should exist in metadata", persistent); + Map<String, Object> transient_ = (Map<String, Object>) responseMap.get("transient"); + assertNotNull("Transient settings should exist in metadata", transient_); }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
CHANGELOG.mdqa/rolling-upgrade/build.gradleqa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RemotePublicationClusterStateIT.java
🔇 Additional comments (9)
CHANGELOG.md (1)
13-13: LGTM!The changelog entry is correctly placed under the "Added" section and follows the project's formatting conventions.
qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RemotePublicationClusterStateIT.java (4)
19-24: LGTM!Class structure is appropriate. The
@SuppressWarnings("unchecked")at class level is justified given the pervasive use ofMap<String, Object>casts throughout the verification methods.
50-61: Consider verifying cluster settings after upgrade.The
verifySettingsInClusterState()call is missing in the non-OLD branch. If persistent settings added during the OLD cluster phase should survive the rolling upgrade, consider adding this verification to ensure settings persistence is maintained across versions.If the omission is intentional (e.g., settings are expected to change or reset), a comment explaining this would be helpful.
64-83: LGTM!Template creation methods are well-structured. The composable template correctly references the component template, establishing the expected relationship for verification.
152-170: LGTM!The helper methods are well-implemented.
getNestedValue()handles edge cases gracefully, andverifyRemotePublicationEnabled()correctly verifies the setting from cluster defaults.qa/rolling-upgrade/build.gradle (4)
40-55: LGTM!The
configureTestTaskhelper function effectively centralizes test task configuration, reducing duplication. The closure delegation pattern (extraConfig.delegate = delegate) is the idiomatic Groovy approach for extending configuration blocks.
84-113: LGTM!The local cluster test tasks are correctly refactored to use the helper function. Setting
excludeRemoteTest=trueappropriately excludesRemotePublicationClusterStateITfrom running against the non-remote-publication-enabled cluster.
115-132: LGTM!The remote publication cluster is properly configured with the necessary settings to enable remote state store and publication. The filesystem-based repository under
buildDirensures test isolation.
134-166: LGTM!The remote cluster test tasks correctly mirror the local cluster workflow. The dependency chain ensures:
- Local cluster tests complete first (with
RemotePublicationClusterStateITexcluded)- Remote cluster tests run with
RemotePublicationClusterStateITincluded- The
bwctask depends on the full chain completingThis properly validates remote publication backward compatibility.
rajiv-kv
left a comment
There was a problem hiding this comment.
LGTM ! Please fix the build errors.
|
❌ Gradle check result for a89ec02: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RemotePublicationClusterStateIT.java
Show resolved
Hide resolved
qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RemotePublicationClusterStateIT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
26cfb71 to
aed21ab
Compare
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
aed21ab to
5660fca
Compare
…oject#20221) * Adding BWC test for remote publication enabled cluster Signed-off-by: Harsh Garg <gkharsh@amazon.com>
…oject#20221) * Adding BWC test for remote publication enabled cluster Signed-off-by: Harsh Garg <gkharsh@amazon.com>
…earch-project#20221)" The remote cluster state feature does not support forward compatibility by design. Therefore these rolling upgrade tests are not compatible with the feature because they make no guarantees whether an old-version or new-version node will be elected as cluster manager in the mixed version state. Reverting this commit and will let the remote cluster state experts come back with a non-flaky test. This reverts commit dbb6d2e. Signed-off-by: Andrew Ross <andrross@amazon.com>
…earch-project#20221)" The remote cluster state feature does not support forward compatibility by design. Therefore these rolling upgrade tests are not compatible with the feature because they make no guarantees whether an old-version or new-version node will be elected as cluster manager in the mixed version state. Reverting this commit and will let the remote cluster state experts come back with a non-flaky test. This reverts commit dbb6d2e. Signed-off-by: Andrew Ross <andrross@amazon.com>
Description
RemotePublication feature was missing BackWardCompatibility rolling upgrade integration tests which was leading to unintended incompatibilities between versions. Added changes in qa rolling upgrades tests to execute a new and the existing tests with and without remote publication enabled.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
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.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.