-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix GetSnapshots to not return non-existent snapshots with ignore_unavailable=true #6839
Conversation
…a non-existing snapshot (opensearch-project#6820) Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #6839 +/- ##
============================================
- Coverage 70.73% 70.71% -0.02%
+ Complexity 59281 59235 -46
============================================
Files 4812 4812
Lines 283614 283614
Branches 40896 40897 +1
============================================
- Hits 200606 200550 -56
- Misses 66552 66628 +76
+ Partials 16456 16436 -20
... and 482 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Shouldn't specifying a non-existent snapshot be an error? (different from an unavailable snapshot) |
@dblock just like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. Is there a unit test possible for this?
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Thanks for your review and suggestion, I've tried adding unit tests for the changed method but found Line 247 in 53b128f
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge. Consider some refactoring to make unit tests possible.
…vailable=true (#6839) * Fix bug for Get Snapshot API to return correct response when getting a non-existing snapshot (#6820) Signed-off-by: Gao Binlong <gbinlong@amazon.com> * modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify changelog Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> (cherry picked from commit 8b34e5f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…vailable=true (#6839) (#7029) * Fix bug for Get Snapshot API to return correct response when getting a non-existing snapshot (#6820) * modify change log * Modify changelog --------- (cherry picked from commit 8b34e5f) Signed-off-by: Gao Binlong <gbinlong@amazon.com> 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>
Description
Relates to #6820.
Currently, the Get Snapshot API returns all of the snapshots in-progress when the specified snapshot is non-existent and the parameter
ignore_unavailable
is set totrue
.The main changes are:
ignore_unavailable
totrue
and there are just some snapshots in-progress.Issues Resolved
#6820.
Check List
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.