-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[Sampling] update sampling config get all response to fit elastic standards #137290
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
Conversation
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.
Pull Request Overview
This PR updates the get_all_sample_configuration API response format to conform with Elastic API standards by wrapping the array of configurations in a named object property. Previously, the API returned a raw array, but now it returns an object with a "configurations" property containing the array.
- Updated the response structure to wrap the configuration array in a named "configurations" property
- Modified all corresponding test assertions to reference the new nested structure
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| GetAllSampleConfigurationAction.java | Updated toXContent method to wrap the configurations array in an object with "configurations" property |
| 10_basic.yml | Updated all test assertions to reference the new "configurations" property instead of accessing the raw array |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Pinging @elastic/es-data-management (Team:Data Management) |
masseyke
left a comment
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.
LGTM
…7301) I failed to merge in main before merging elastic#137271 so I didn't pick up the changes in elastic#137290. This accounts for them.
When attempting to create the rest api spec for the new sampling config APIs, i encountered an error due to the get_all_sample_configuration response's array not being named.
This PR updates the get_all_sample_configuration response to name the returned array in order to conform with elastic API standards.