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

Add Replication plugin BWC tests #257

Merged
merged 1 commit into from
Nov 23, 2021
Merged

Add Replication plugin BWC tests #257

merged 1 commit into from
Nov 23, 2021

Conversation

ankitkala
Copy link
Member

@ankitkala ankitkala commented Nov 22, 2021

Signed-off-by: Ankit Kala [email protected]

Description

Adds Backward compatibility tests for replication plugin
Re-raised(old PR) as we recently got branch protection rule due to which i can't push more changes(without PR) in any private branch in main repo.

Task flow:

  • On domains bwcLeader0+bwcFollower0:
    • Mixed cluster scenario: oldVersionClusterTask0 --> mixedClusterTask
    • Rolling restart scenario: oldVersionClusterTask0 --> mixedClusterTask --> twoThirdsUpgradedClusterTask --> rollingUpgradeClusterTask
  • On domains bwcLeader1+bwcFollower1:
    • Full cluster restart scenario: oldVersionClusterTask1 --> fullRestartClusterTask

How to execute

  • Run complete suite with ./gradlew bwcTestSuite
  • Run mixedCluster scenario with ./gradlew mixedClusterTask
  • Run rolling restart scenario with ./gradlew rollingUpgradeClusterTask
  • Run Full cluster restart scenario with ./gradlew fullRestartClusterTask

Issues Resolved

#116

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • 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.

@gbbafna gbbafna self-requested a review November 23, 2021 05:18
Copy link
Collaborator

@gbbafna gbbafna left a comment

Choose a reason for hiding this comment

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

LGTM. Just one comment.

Comment on lines +576 to +599
useCluster testClusters.bwcLeader0
useCluster testClusters.bwcFollower0
doFirst {
testClusters.bwcLeader0.upgradeNodeAndPluginToNextVersion(replPluginProvider)
testClusters.bwcFollower0.upgradeNodeAndPluginToNextVersion(replPluginProvider)
getClusters().forEach { cluster ->
String alltransportSocketURI = cluster.nodes.stream().flatMap { node ->
node.getAllTransportPortURI().stream()
}.collect(Collectors.joining(","))
String allHttpSocketURI = cluster.nodes.stream().flatMap { node ->
node.getAllHttpSocketURI().stream()
}.collect(Collectors.joining(","))

systemProperty "tests.cluster.${cluster.name}.http_hosts", "${-> allHttpSocketURI}"
systemProperty "tests.cluster.${cluster.name}.transport_hosts", "${-> alltransportSocketURI}"
systemProperty "tests.cluster.${cluster.name}.security_enabled", "${-> securityEnabled.toString()}"
configureCluster(cluster, securityEnabled)
}
}
nonInputProperties.systemProperty('tests.bwcTask', "twoThirdsUpgradedClusterTask")
nonInputProperties.systemProperty('tests.cluster_suffix', "0")
filter {
setIncludePatterns("org.opensearch.replication.bwc.BackwardsCompatibilityIT")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we put this in a common function so that duplication with mixedClusterTask and rollingUpgradeClusterTask can be reduced ?

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 had tried that earlier but there were some issue with setting system properties and thus we had to duplicate the logic.

@ankitkala ankitkala merged commit 8bb7bce into opensearch-project:main Nov 23, 2021
@ankitkala ankitkala deleted the bwc-pr branch November 23, 2021 08:36
@dblock
Copy link
Member

dblock commented Dec 18, 2021

This added -SNAPSHOT binaries to the tree, which is probably not what we wanted, see #274.

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.

4 participants