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

[Segment Replication] Add Segment Replication Specific Integration Tests #11773

Merged

Conversation

Rishikesh1159
Copy link
Member

@Rishikesh1159 Rishikesh1159 commented Jan 5, 2024

Description

This PR adds new segment replication specific integ tests. As discussed on issue here, this PR provides implementation of Steps 1,2,3.

For Step 2: We have chosen Approach 2 (modifying indexing helper methods). Please feel free to comment on this PR if anyone has strong opinions against this approach. In this PR we added 3 new segrep specific integtests, each one representing different way to support Approach 2:
-> SegmentReplicationIndicesRequestCacheIT - IndicesRequestCacheIT - indexRandom()
-> SegmentReplicationSimpleClusterStateIT - SimpleClusterStateIT - index()
-> SegmentReplicationIndexStatsIT - IndexStatsIT - client().prepareIndex()

For Step 3: We have chosen Approach 2 (new segrep test class for every test). Again please feel free to comment on this PR if anyone has strong opinions against this approach.

This PR has small initial set of tests running with segment replication. But later there will follow up PR's that will add bunch of new segrep specific integ tests similar to tests in this PR.

Related Issues

Resolves #6761

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

Copy link
Contributor

github-actions bot commented Jan 5, 2024

❌ Gradle check result for 56b1d57: 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?

Copy link
Contributor

github-actions bot commented Jan 5, 2024

Compatibility status:

Checks if related components are compatible with change e6d3703

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git]

Copy link
Contributor

github-actions bot commented Jan 5, 2024

❌ Gradle check result for 56b1d57: 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?

Copy link
Contributor

github-actions bot commented Feb 7, 2024

❌ Gradle check result for 19d99d8: 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?

Copy link
Contributor

github-actions bot commented Feb 7, 2024

❌ Gradle check result for 718ecb3: 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?

Copy link
Contributor

github-actions bot commented Feb 7, 2024

❌ Gradle check result for 4649c42: 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?

Copy link
Contributor

github-actions bot commented Feb 8, 2024

❌ Gradle check result for bcc0ca0: 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?

Copy link
Contributor

github-actions bot commented Feb 8, 2024

❕ Gradle check result for d7e9027: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.multipart.RemoteStoreMultipartIT.testOverriddenBufferInterval

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Contributor

github-actions bot commented Feb 8, 2024

❕ Gradle check result for de8e7e2: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Contributor

github-actions bot commented Feb 8, 2024

❕ Gradle check result for 2c305cb: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing
      1 org.opensearch.search.SearchWeightedRoutingIT.testShardRoutingWithNetworkDisruption_FailOpenEnabled
      1 org.opensearch.http.SearchRestCancellationIT.testAutomaticCancellationMultiSearchDuringFetchPhase

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Contributor

github-actions bot commented Feb 8, 2024

❌ Gradle check result for e6d3703: 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?

@Rishikesh1159
Copy link
Member Author

❌ Gradle check result for e6d3703: 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?

#12197

Copy link
Contributor

github-actions bot commented Feb 8, 2024

✅ Gradle check result for e6d3703: SUCCESS

@andrross andrross added backport 2.x Backport to 2.x branch and removed v2.11.0 Issues and PRs related to version 2.11.0 labels Feb 9, 2024
@Rishikesh1159 Rishikesh1159 merged commit 30c4210 into opensearch-project:main Feb 9, 2024
34 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 9, 2024
…sts (#11773)

* Run few tests with Segment Replication enabled.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update reason for ignoring test.

Signed-off-by: Rishikesh1159 <[email protected]>

* remove @ignore to resolve :server:forbiddenApisInternalClusterTest check.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix spotlessCheck.

Signed-off-by: Rishikesh1159 <[email protected]>

* add conditional logic of force refresh.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failing errors.

Signed-off-by: Rishikesh1159 <[email protected]>

* Use parameterization for running segment replication tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing test.

Signed-off-by: Rishikesh1159 <[email protected]>

* add new waitForReplication() and refactor.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR and revert back changes made to SegmentReplication Tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* revert changes made to Segrep tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Refactor and address comments.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failure of using forbidden api new Random().

Signed-off-by: Rishikesh1159 <[email protected]>

* Add comments to debug.

Signed-off-by: Rishikesh1159 <[email protected]>

* Remove non-critical tests from running with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix test to run with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* separate out refresh and waitForReplication into different methods.

Signed-off-by: Rishikesh1159 <[email protected]>

* refactor with usage of waitForReplication().

Signed-off-by: Rishikesh1159 <[email protected]>

* fix parameters passed in factory for IndexStatsIT.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update IndexstatsIT to run with segrep

Signed-off-by: Rishikesh1159 <[email protected]>

---------

Signed-off-by: Rishikesh1159 <[email protected]>
(cherry picked from commit 30c4210)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Feb 15, 2024
…sts (#11773) (#12270)

* Run few tests with Segment Replication enabled.



* Update reason for ignoring test.



* remove @ignore to resolve :server:forbiddenApisInternalClusterTest check.



* fix spotlessCheck.



* add conditional logic of force refresh.



* Address comments on PR.



* fix failing errors.



* Use parameterization for running segment replication tests.



* Fix failing tests.



* Fix failing test.



* add new waitForReplication() and refactor.



* Address comments on PR and revert back changes made to SegmentReplication Tests.



* revert changes made to Segrep tests.



* Refactor and address comments.



* fix failure of using forbidden api new Random().



* Add comments to debug.



* Remove non-critical tests from running with segrep.



* Fix test to run with segrep.



* separate out refresh and waitForReplication into different methods.



* refactor with usage of waitForReplication().



* fix parameters passed in factory for IndexStatsIT.



* Update IndexstatsIT to run with segrep



---------


(cherry picked from commit 30c4210)

Signed-off-by: Rishikesh1159 <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Mar 1, 2024
…sts (opensearch-project#11773)

* Run few tests with Segment Replication enabled.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update reason for ignoring test.

Signed-off-by: Rishikesh1159 <[email protected]>

* remove @ignore to resolve :server:forbiddenApisInternalClusterTest check.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix spotlessCheck.

Signed-off-by: Rishikesh1159 <[email protected]>

* add conditional logic of force refresh.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failing errors.

Signed-off-by: Rishikesh1159 <[email protected]>

* Use parameterization for running segment replication tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing test.

Signed-off-by: Rishikesh1159 <[email protected]>

* add new waitForReplication() and refactor.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR and revert back changes made to SegmentReplication Tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* revert changes made to Segrep tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Refactor and address comments.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failure of using forbidden api new Random().

Signed-off-by: Rishikesh1159 <[email protected]>

* Add comments to debug.

Signed-off-by: Rishikesh1159 <[email protected]>

* Remove non-critical tests from running with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix test to run with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* separate out refresh and waitForReplication into different methods.

Signed-off-by: Rishikesh1159 <[email protected]>

* refactor with usage of waitForReplication().

Signed-off-by: Rishikesh1159 <[email protected]>

* fix parameters passed in factory for IndexStatsIT.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update IndexstatsIT to run with segrep

Signed-off-by: Rishikesh1159 <[email protected]>

---------

Signed-off-by: Rishikesh1159 <[email protected]>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…sts (opensearch-project#11773)

* Run few tests with Segment Replication enabled.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update reason for ignoring test.

Signed-off-by: Rishikesh1159 <[email protected]>

* remove @ignore to resolve :server:forbiddenApisInternalClusterTest check.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix spotlessCheck.

Signed-off-by: Rishikesh1159 <[email protected]>

* add conditional logic of force refresh.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failing errors.

Signed-off-by: Rishikesh1159 <[email protected]>

* Use parameterization for running segment replication tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing test.

Signed-off-by: Rishikesh1159 <[email protected]>

* add new waitForReplication() and refactor.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR and revert back changes made to SegmentReplication Tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* revert changes made to Segrep tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Refactor and address comments.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failure of using forbidden api new Random().

Signed-off-by: Rishikesh1159 <[email protected]>

* Add comments to debug.

Signed-off-by: Rishikesh1159 <[email protected]>

* Remove non-critical tests from running with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix test to run with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* separate out refresh and waitForReplication into different methods.

Signed-off-by: Rishikesh1159 <[email protected]>

* refactor with usage of waitForReplication().

Signed-off-by: Rishikesh1159 <[email protected]>

* fix parameters passed in factory for IndexStatsIT.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update IndexstatsIT to run with segrep

Signed-off-by: Rishikesh1159 <[email protected]>

---------

Signed-off-by: Rishikesh1159 <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…sts (opensearch-project#11773)

* Run few tests with Segment Replication enabled.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update reason for ignoring test.

Signed-off-by: Rishikesh1159 <[email protected]>

* remove @ignore to resolve :server:forbiddenApisInternalClusterTest check.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix spotlessCheck.

Signed-off-by: Rishikesh1159 <[email protected]>

* add conditional logic of force refresh.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failing errors.

Signed-off-by: Rishikesh1159 <[email protected]>

* Use parameterization for running segment replication tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix failing test.

Signed-off-by: Rishikesh1159 <[email protected]>

* add new waitForReplication() and refactor.

Signed-off-by: Rishikesh1159 <[email protected]>

* Address comments on PR and revert back changes made to SegmentReplication Tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* revert changes made to Segrep tests.

Signed-off-by: Rishikesh1159 <[email protected]>

* Refactor and address comments.

Signed-off-by: Rishikesh1159 <[email protected]>

* fix failure of using forbidden api new Random().

Signed-off-by: Rishikesh1159 <[email protected]>

* Add comments to debug.

Signed-off-by: Rishikesh1159 <[email protected]>

* Remove non-critical tests from running with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* Fix test to run with segrep.

Signed-off-by: Rishikesh1159 <[email protected]>

* separate out refresh and waitForReplication into different methods.

Signed-off-by: Rishikesh1159 <[email protected]>

* refactor with usage of waitForReplication().

Signed-off-by: Rishikesh1159 <[email protected]>

* fix parameters passed in factory for IndexStatsIT.

Signed-off-by: Rishikesh1159 <[email protected]>

* Update IndexstatsIT to run with segrep

Signed-off-by: Rishikesh1159 <[email protected]>

---------

Signed-off-by: Rishikesh1159 <[email protected]>
Signed-off-by: Shivansh Arora <[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 Indexing:Replication Issues and PRs related to core replication framework eg segrep skip-changelog >test-failure Test failure from CI, local build, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Meta] [Segment Replication] Run all integration tests with segment replication enabled
4 participants