Skip to content

Add deprecation warning for /_cat/snapshots in favor of /_cat/snapshots/{repository}#16960

Closed
finnegancarroll wants to merge 4 commits intoopensearch-project:mainfrom
finnegancarroll:dep-cat-snapshots
Closed

Add deprecation warning for /_cat/snapshots in favor of /_cat/snapshots/{repository}#16960
finnegancarroll wants to merge 4 commits intoopensearch-project:mainfrom
finnegancarroll:dep-cat-snapshots

Conversation

@finnegancarroll
Copy link
Copy Markdown
Contributor

@finnegancarroll finnegancarroll commented Jan 6, 2025

Description

Per #16648 mark /_cat/snapshots as deprecated. Redundant with the more explicit /_cat/snapshots/{repository}.

Adds deprecation log for this route:

~/fdev curl -i -H "Accept: application/json" -H "X-Opaque-Id: 123" "localhost:9200/_cat/snapshots"
HTTP/1.1 400 Bad Request
X-Opaque-Id: 123
Warning: 299 OpenSearch-3.0.0-SNAPSHOT-4a53ff24adbec1d5aeb3d73548171870a3de925d "[/_cat/snapshots] is a deprecated endpoint. Please use [/_cat/snapshots/{repository}] instead."
X-OpenSearch-Version: OpenSearch/3.0.0-SNAPSHOT (opensearch)
content-type: application/json; charset=UTF-8
content-length: 243

Related Issues

Resolves #16648

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@github-actions github-actions bot added bug Something isn't working Storage:Snapshots labels Jan 6, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2025

❕ Gradle check result for bfa304e: UNSTABLE

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

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.43%. Comparing base (af5835f) to head (cf77a81).
⚠️ Report is 779 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16960      +/-   ##
============================================
- Coverage     72.44%   72.43%   -0.01%     
+ Complexity    65732    65690      -42     
============================================
  Files          5311     5311              
  Lines        305011   305013       +2     
  Branches      44232    44232              
============================================
- Hits         220969   220951      -18     
+ Misses        65967    65940      -27     
- Partials      18075    18122      +47     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reta
Copy link
Copy Markdown
Contributor

reta commented Jan 6, 2025

Could you please add test case to rest-api-spec/test/cat.snapshots/10_basic.yml and check for deprecation message, thank you.

@reta reta added the backport 2.x Backport to 2.x branch label Jan 6, 2025
@reta
Copy link
Copy Markdown
Contributor

reta commented Jan 6, 2025

Also please add CHANGELOG entry (for 3.x?), thank you

@github-project-automation github-project-automation bot moved this from ✅ Done to 🏗 In progress in Storage Project Board Mar 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2025

❕ Gradle check result for 37da999: UNSTABLE

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

@opensearch-trigger-bot opensearch-trigger-bot bot removed the stalled Issues that have stalled label Mar 5, 2025
@finnegancarroll finnegancarroll marked this pull request as ready for review March 5, 2025 19:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2025

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

@finnegancarroll
Copy link
Copy Markdown
Contributor Author

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Storage Project Board Mar 5, 2025
@github-project-automation github-project-automation bot moved this from ✅ Done to 🏗 In progress in Storage Project Board Mar 5, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2025

❕ Gradle check result for 96f95e9: UNSTABLE

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

Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
…nt} yamlRestTest to version 3.0.

Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

❕ Gradle check result for cf77a81: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode

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

@finnegancarroll
Copy link
Copy Markdown
Contributor Author

I'm noticing the way yaml rest tests handle query parameters and paths is creating some issues for this specific case. The client appears to move all variable parameters of a request (regardless of origin) into a single Set<String>, at which point it tries to match these params to the longest possible path. Since the query param and the path param are both named "repository" the yaml client will always select the /_cat/snapshots/{repository} route.

https://github.com/opensearch-project/OpenSearch/blob/main/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestApi.java#L151

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Apr 26, 2025
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Storage Project Board Oct 9, 2025
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 bug Something isn't working stalled Issues that have stalled Storage:Snapshots

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[BUG] GET /_cat/snapshots incorrectly requires a repository

2 participants