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

[Searchable Snapshot] Add Relevant Error handling for Restore API with remote_snapshot. #11840

Merged

Conversation

Rishikesh1159
Copy link
Member

@Rishikesh1159 Rishikesh1159 commented Jan 10, 2024

Description

This PR adds appropriate error handling in restore API path when user attempts to set index.store.type to remote_snapshot directly instead of using "storage_type": "remote_snapshot"

Related Issues

Resolves #11658

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

❌ Gradle check result for 34fb46b: 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 10, 2024

Compatibility status:

Checks if related components are compatible with change 7b511b4

Incompatible components

Incompatible components: [https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/cross-cluster-replication.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/security.git]

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

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

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

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

❌ Gradle check result for 25966ea: 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

❕ Gradle check result for 25966ea: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.classMethod
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testAfterRefresh
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testAfterCommit

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

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (304042f) 71.37% compared to head (7b511b4) 71.35%.
Report is 9 commits behind head on main.

Files Patch % Lines
.../java/org/opensearch/snapshots/RestoreService.java 20.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11840      +/-   ##
============================================
- Coverage     71.37%   71.35%   -0.03%     
+ Complexity    59403    59388      -15     
============================================
  Files          4923     4923              
  Lines        279214   279219       +5     
  Branches      40596    40597       +1     
============================================
- Hits         199302   199247      -55     
+ Misses        63375    63369       -6     
- Partials      16537    16603      +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kotwanikunal
Copy link
Member

@Rishikesh1159 Looks like you have conflicts and failures. Can you please iterate to green?

Copy link
Contributor

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

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

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

❕ Gradle check result for 7b511b4: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testMultiGetWithNetworkDisruption_FailOpenEnabled

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

@Rishikesh1159
Copy link
Member Author

@Rishikesh1159 Looks like you have conflicts and failures. Can you please iterate to green?

Done

@Rishikesh1159
Copy link
Member Author

testMultiGetWithNetworkDisruption_FailOpenEnabled

#10755

@Rishikesh1159
Copy link
Member Author

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

#11875

@Rishikesh1159 Rishikesh1159 added the backport 2.x Backport to 2.x branch label Jan 24, 2024
@Rishikesh1159 Rishikesh1159 merged commit 7da8628 into opensearch-project:main Jan 24, 2024
48 of 57 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 24, 2024
…h remote_snapshot. (#11840)

* Add Relevant Error handling for Restore API with remote_snapshot.

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

* update comment with more revelant info.

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

* apply spotless check.

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

* Add null check

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

* apply spotless check.

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

* fix error message in test.

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

* apply spotless check.

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

---------

Signed-off-by: Rishikesh1159 <[email protected]>
Signed-off-by: Rishikesh Pasham <[email protected]>
(cherry picked from commit 7da8628)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Jan 24, 2024
…h remote_snapshot. (#11840) (#12011)

* Add Relevant Error handling for Restore API with remote_snapshot.



* update comment with more revelant info.



* apply spotless check.



* Add null check



* apply spotless check.



* fix error message in test.



* apply spotless check.



---------



(cherry picked from commit 7da8628)

Signed-off-by: Rishikesh1159 <[email protected]>
Signed-off-by: Rishikesh Pasham <[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
…h remote_snapshot. (opensearch-project#11840)

* Add Relevant Error handling for Restore API with remote_snapshot.

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

* update comment with more revelant info.

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

* apply spotless check.

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

* Add null check

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

* apply spotless check.

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

* fix error message in test.

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

* apply spotless check.

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

---------

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

* Add Relevant Error handling for Restore API with remote_snapshot.

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

* update comment with more revelant info.

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

* apply spotless check.

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

* Add null check

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

* apply spotless check.

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

* fix error message in test.

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

* apply spotless check.

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

---------

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

* Add Relevant Error handling for Restore API with remote_snapshot.

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

* update comment with more revelant info.

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

* apply spotless check.

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

* Add null check

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

* apply spotless check.

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

* fix error message in test.

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

* apply spotless check.

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

---------

Signed-off-by: Rishikesh1159 <[email protected]>
Signed-off-by: Rishikesh Pasham <[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 enhancement Enhancement or improvement to existing feature or request Search:Searchable Snapshots skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Restore API Error Handling
3 participants