-
Notifications
You must be signed in to change notification settings - Fork 112
Add spec and docs for new logs streams endpoints #5258
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 the new logs streams endpoints to the Elasticsearch specification, including API definitions for enabling, disabling, and checking the status of logs streams functionality.
- Adds TypeScript interface definitions for three new logs streams endpoints
- Includes comprehensive example files for requests and responses with various status codes
- Updates the tsconfig.json to include the new streams module path mapping
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
specification/tsconfig.json | Adds path mapping for the new @streams/* module |
specification/streams/status/StreamsStatusRequest.ts | Defines the GET _streams/status endpoint interface |
specification/streams/status/StreamsStatusResponse.ts | Defines response structure for streams status endpoint |
specification/streams/logs_enable/StreamsLogsEnableRequest.ts | Defines the POST _streams/logs/_enable endpoint interface |
specification/streams/logs_enable/StreamsLogsEnableResponse.ts | Defines response structure for logs enable endpoint |
specification/streams/logs_disable/StreamsLogsDisableRequest.ts | Defines the POST _streams/logs/_disable endpoint interface |
specification/streams/logs_disable/StreamsLogsDisableResponse.ts | Defines response structure for logs disable endpoint |
Various example files | Provides request/response examples for all endpoints including error cases |
docs/add-new-api.md | Minor grammar improvement in documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
specification/streams/status/examples/200_response/GetStreamsStatusResponseExample1.yaml
Outdated
Show resolved
Hide resolved
…tatusResponseExample1.yaml Co-authored-by: Copilot <[email protected]>
Co-authored-by: Quentin Pradet <[email protected]>
Following you can find the validation changes against the target branch for the APIs.
You can validate these APIs yourself by using the |
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! This looks good. Sorry that reviewing took this long.
By the way, since elastic/elasticsearch#129474 has been backported to 8.19 too, I've added the 8.19 backport label. Is that fine?
@pquentin Do I need to do anything about this? Are there any docs on writing these tests? |
No that's fine :-) I have been off all last week so no rush. I totally forget it got backported to 8.19... Thanks for adding that! |
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! LGTM.
@pquentin Do I need to do anything about this? Are there any docs on writing these tests?
These are actaully the Elasticsearch YAML tests: we run them, record the requests and responses, and see if they match the specification. We need to add them module by module. I've just opened elastic/elasticsearch#134869 for this purpose. But it isn't blocking, so I'm merging.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.19 8.19
# Navigate to the new working tree
cd .worktrees/backport-8.19
# Create a new branch
git switch --create backport-5258-to-8.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 995d6861198f6e1b3633ad63348a55ff572734d2
# Push it to GitHub
git push --set-upstream origin backport-5258-to-8.19
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.19 Then, create a pull request where the |
* Add spec and docs for new logs streams endpoints * Add @codegen name to Acked responses * Linting fix * Update specification/streams/status/examples/200_response/GetStreamsStatusResponseExample1.yaml Co-authored-by: Copilot <[email protected]> * Correct feature flag * Add doc-ids * Fix doc-ids * Update specification/_doc_ids/table.csv Co-authored-by: Quentin Pradet <[email protected]> * Update specification/_doc_ids/table.csv Co-authored-by: Quentin Pradet <[email protected]> * Add default timeouts --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit 995d686)
* Add spec and docs for new logs streams endpoints * Add @codegen name to Acked responses * Linting fix * Update specification/streams/status/examples/200_response/GetStreamsStatusResponseExample1.yaml Co-authored-by: Copilot <[email protected]> * Correct feature flag * Add doc-ids * Fix doc-ids * Update specification/_doc_ids/table.csv Co-authored-by: Quentin Pradet <[email protected]> * Update specification/_doc_ids/table.csv Co-authored-by: Quentin Pradet <[email protected]> * Add default timeouts --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit 995d686) # Conflicts: # specification/_doc_ids/table.csv
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
* Add spec and docs for new logs streams endpoints * Add @codegen name to Acked responses * Linting fix * Update specification/streams/status/examples/200_response/GetStreamsStatusResponseExample1.yaml * Correct feature flag * Add doc-ids * Fix doc-ids * Update specification/_doc_ids/table.csv * Update specification/_doc_ids/table.csv * Add default timeouts --------- (cherry picked from commit 995d686) Co-authored-by: Luke Whiting <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Quentin Pradet <[email protected]>
* Add spec and docs for new logs streams endpoints (#5258) * Add spec and docs for new logs streams endpoints * Add @codegen name to Acked responses * Linting fix * Update specification/streams/status/examples/200_response/GetStreamsStatusResponseExample1.yaml Co-authored-by: Copilot <[email protected]> * Correct feature flag * Add doc-ids * Fix doc-ids * Update specification/_doc_ids/table.csv Co-authored-by: Quentin Pradet <[email protected]> * Update specification/_doc_ids/table.csv Co-authored-by: Quentin Pradet <[email protected]> * Add default timeouts --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit 995d686) # Conflicts: # specification/_doc_ids/table.csv * Edit logs streams endpoints * Regenerate output --------- Co-authored-by: Luke Whiting <[email protected]> Co-authored-by: lcawl <[email protected]>
This adds the new logs streams endpoints to the spec.
This will need backporting to 9.1 as that's when these endpoints were added.
Elasticsearch PR: elastic/elasticsearch#129474