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 deprecation warning for /_cat/snapshots in favor of /_cat/snapshots/{repository} #16960

Open
wants to merge 4 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.38%. Comparing base (82bbdfb) to head (96f95e9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16960      +/-   ##
============================================
- Coverage     72.59%   72.38%   -0.21%     
+ Complexity    65798    65686     -112     
============================================
  Files          5311     5311              
  Lines        304888   304890       +2     
  Branches      44212    44212              
============================================
- Hits         221323   220686     -637     
- Misses        65501    66110     +609     
- Partials      18064    18094      +30     

☔ 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
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 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?

@opensearch-trigger-bot
Copy link
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 Feb 7, 2025
@finnegancarroll finnegancarroll changed the title Deprecate /_cat/snapshots in favor of /_cat/snapshots/{repository} Add deprecation warning for /_cat/snapshots in favor of /_cat/snapshots/{repository} Mar 4, 2025
Copy link
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
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>
@finnegancarroll finnegancarroll marked this pull request as ready for review March 5, 2025 19:36
Copy link
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
Contributor Author

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

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