-
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: Update field names in /index/_recovery API response to snake_case for consistency #16541
base: main
Are you sure you want to change the base?
Conversation
Updated field names in SnapshotRecoverySource to use snake_case for consistency across API responses: - isSearchableSnapshot -> is_searchable_snapshot - remoteStoreIndexShallowCopy -> remote_store_index_shallow_copy - sourceRemoteStoreRepository -> source_remote_store_repository - sourceRemoteTranslogRepository -> source_remote_translog_repository This change aligns with OpenSearch API naming conventions. Signed-off-by: Aradhya Mahajan <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16541 +/- ##
============================================
+ Coverage 72.00% 72.10% +0.10%
- Complexity 65038 65080 +42
============================================
Files 5313 5313
Lines 303454 303454
Branches 43910 43910
============================================
+ Hits 218510 218819 +309
+ Misses 67040 66696 -344
- Partials 17904 17939 +35 ☔ View full report in Codecov by Sentry. |
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 this fix, @Aradhya2708 ! A few things:
- Please add a CHANGELOG entry for this, in the "unreleased 3.0" section since it will not be backported.
- You'll need to update the spec at https://github.com/opensearch-project/opensearch-api-specification/blob/main/spec/schemas/indices.recovery.yaml for the 3.0 tests
@@ -415,10 +415,10 @@ public void addAdditionalFields(XContentBuilder builder, ToXContent.Params param | |||
.field("version", version.toString()) | |||
.field("index", index.getName()) | |||
.field("restoreUUID", restoreUUID) |
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.
Should this one also be changed?
@dbwiddis we might need BWC tests for this change? |
It is by definition not backwards compatible. This is a 3.x-only change. It needs to be documented. |
Note that you'll need to add the entry in https://github.com/opensearch-project/OpenSearch/blob/main/CHANGELOG-3.0.md. (We split the 2.x and 3.0 changelogs a few months ago.) |
This PR is stalled because it has been open for 30 days with no activity. |
Thanks @Aradhya2708!
|
Description
This PR updates field names in the
SnapshotRecoverySource
response to follow snake_case, ensuring consistency across OpenSearch API responses. Specifically, it modifies the following fields:isSearchableSnapshot
->is_searchable_snapshot
remoteStoreIndexShallowCopy
->remote_store_index_shallow_copy
sourceRemoteStoreRepository
->source_remote_store_repository
sourceRemoteTranslogRepository
->source_remote_translog_repository
This update aligns the naming conventions within the API, addressing an inconsistency in the
/{index}/_recovery
API response format.Related Issues
Resolves #16334
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.