-
Notifications
You must be signed in to change notification settings - Fork 25.6k
add get all action for sampling configs #137065
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 adds a new GET endpoint /_sample/config to retrieve all sampling configurations across the cluster. The endpoint returns an array of objects containing index names and their associated sampling configurations.
Key changes:
- Introduced
GetAllSampleConfigurationActionwith request/response classes supporting cluster-wide configuration retrieval - Added transport and REST handlers for the new action
- Implemented comprehensive test coverage including unit, integration, and YAML REST tests
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
GetAllSampleConfigurationAction.java |
Defines the action type, request/response classes with serialization and XContent support |
TransportGetAllSampleConfigurationAction.java |
Implements transport layer logic to retrieve all sampling configurations from cluster metadata |
RestGetAllSampleConfigurationAction.java |
REST handler mapping GET /_sample/config to the transport action |
ActionModule.java |
Registers the new action and REST handler |
Constants.java |
Adds the new action privilege string |
GetAllSampleConfigurationActionRequestTests.java |
Unit tests for request serialization and task creation |
GetAllSampleConfigurationActionResponseTests.java |
Unit tests for response serialization with mutation testing |
GetAllSampleConfigurationActionIT.java |
Integration tests covering various scenarios |
10_basic.yml |
YAML REST API tests |
indices.get_all_sample_configuration.json |
REST API specification |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...ava/org/elasticsearch/action/admin/indices/sampling/RestGetAllSampleConfigurationAction.java
Show resolved
Hide resolved
...in/java/org/elasticsearch/action/admin/indices/sampling/GetAllSampleConfigurationAction.java
Outdated
Show resolved
Hide resolved
…mpling/GetAllSampleConfigurationAction.java Co-authored-by: Copilot <[email protected]>
|
Pinging @elastic/es-data-management (Team:Data Management) |
|
Looks like the yaml rest tests are all getting "connection refused" for some reason, not sure what that's about but seems like it must be a wider problem since all of the yaml tests i didnt touch are getting it |
...elasticsearch/action/admin/indices/sampling/GetAllSampleConfigurationActionRequestTests.java
Outdated
Show resolved
Hide resolved
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.
Looks good to me, with the exception of the unreachable test code I commented on.
adds the get endpoint for all sampling configs; e.g.