Skip to content

Conversation

lukewhiting
Copy link
Contributor

@lukewhiting lukewhiting commented Sep 4, 2025

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

Copy link
Contributor

@Copilot Copilot AI left a 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.

Copy link
Contributor

github-actions bot commented Sep 5, 2025

Following you can find the validation changes against the target branch for the APIs.

API Status Request Response
streams.logs_disable 🟠 → ⚪ Missing type → Missing test Missing type → Missing test
streams.logs_enable 🟠 → ⚪ Missing type → Missing test Missing type → Missing test
streams.status 🟠 → ⚪ Missing type → Missing test Missing type → Missing test

You can validate these APIs yourself by using the make validate target.

Copy link
Member

@pquentin pquentin left a 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?

@lukewhiting
Copy link
Contributor Author

Following you can find the validation changes against the target branch for the APIs.

API Status Request Response
streams.logs_disable 🟠 → ⚪ Missing type → Missing test Missing type → Missing test
streams.logs_enable 🟠 → ⚪ Missing type → Missing test Missing type → Missing test
streams.status 🟠 → ⚪ Missing type → Missing test Missing type → Missing test
You can validate these APIs yourself by using the make validate target.

@pquentin Do I need to do anything about this? Are there any docs on writing these tests?

@lukewhiting
Copy link
Contributor Author

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?

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!

Copy link
Member

@pquentin pquentin left a 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.

@pquentin pquentin merged commit 995d686 into main Sep 17, 2025
8 checks passed
@pquentin pquentin deleted the streams-logs-endpoints branch September 17, 2025 07:02
Copy link
Contributor

The backport to 8.19 failed:

The process '/usr/bin/git' failed with exit code 1

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 base branch is 8.19 and the compare/head branch is backport-5258-to-8.19.

github-actions bot pushed a commit that referenced this pull request Sep 17, 2025
* 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)
pquentin pushed a commit that referenced this pull request Sep 17, 2025
* 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
@pquentin
Copy link
Member

💚 All backports created successfully

Status Branch Result
8.19

Questions ?

Please refer to the Backport tool documentation

pquentin added a commit that referenced this pull request Sep 17, 2025
* 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]>
pquentin added a commit that referenced this pull request Sep 19, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants