-
Notifications
You must be signed in to change notification settings - Fork 2.4k
rename fields to snake case #17123
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
base: main
Are you sure you want to change the base?
rename fields to snake case #17123
Conversation
❌ Gradle check result for c4ef85b: 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? |
.field("remoteStoreIndexShallowCopy", remoteStoreIndexShallowCopy) | ||
.field("sourceRemoteStoreRepository", sourceRemoteStoreRepository) | ||
.field("sourceRemoteTranslogRepository", sourceRemoteTranslogRepository); | ||
.field("is_searchable_snapshot", is_searchable_snapshot) |
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.
Java variables should follow the lowerCamelCase convention, but when serialized in toXContent
(as done on the left side of this line), these can be converted to lower_snake_case.
As @gbbafna pointed out here, since this is a change in API its considered a breaking change and would have to be targeted for OpenSearch 3.0. At the moment, OpenSearch 3.0 is the next planned release after OpenSearch 2.19.
This PR is stalled because it has been open for 30 days with no activity. |
Hi! I’m interested in working on this issue. Is it still available? |
@ceocharan Thanks for the interest. Given its late for 3.0 and too early for 4.0, this needs to wait for now. I'm adding 4.0 label so that we can revisit this when we are near 4.0 release. |
This pull request addresses issue #16334 by renaming the following fields in the SnapshotRecoverySource class to follow a standard snake_case naming convention:
isSearchableSnapshot → is_searchable_snapshot
remoteStoreIndexShallowCopy → remote_store_index_shallow_copy
sourceRemoteStoreRepository → source_remote_store_repository
sourceRemoteTranslogRepository → source_remote_translog_repository
The changes ensure consistency in field naming, improving clarity and alignment with API standards. All affected methods, constructors, and serialization logic have been updated accordingly.
Related Issues
Resolves #16334
Check List
Functionality includes testing: Updated relevant unit tests to reflect the changes.
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.