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

Deprecate /_cat/snapshots in favor of /_cat/snapshots/{repository} #16960

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

finnegancarroll
Copy link
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
Copy link
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.

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.27%. Comparing base (4a53ff2) to head (bfa304e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16960      +/-   ##
============================================
- Coverage     72.32%   72.27%   -0.06%     
  Complexity    65310    65310              
============================================
  Files          5299     5299              
  Lines        303534   303536       +2     
  Branches      43941    43941              
============================================
- Hits         219527   219376     -151     
- Misses        66021    66173     +152     
- Partials      17986    17987       +1     

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

@reta
Copy link
Collaborator

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
Collaborator

reta commented Jan 6, 2025

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

@finnegancarroll
Copy link
Contributor Author

I think this change needs to wait on the associated api spec fix to make its way into the core yml rest tests. Currently the definition in main does not allow for the additional "repository" param needed by /_cat/snapshots. I'll plan on adding what the test will look like here and then leave the pr as draft to revisit on next release.

@finnegancarroll finnegancarroll marked this pull request as draft January 7, 2025 21:39
Copy link
Contributor

github-actions bot commented Jan 7, 2025

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

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 Storage:Snapshots
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

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