Skip to content

Conversation

@lukewhiting
Copy link
Contributor

@lukewhiting lukewhiting commented Jul 29, 2025

This PR makes it so that the logs streams feature can only be enabled on a cluster if there are not pre-existing indices called logs or with names starting logs.*.

Fixes ES-12416

@lukewhiting lukewhiting requested a review from Copilot July 29, 2025 10:19
@lukewhiting lukewhiting added :Data Management/Data streams Data streams and their lifecycles v9.2.0 labels Jul 29, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jul 29, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

This comment was marked as outdated.

@elasticsearchmachine
Copy link
Collaborator

Hi @lukewhiting, I've created a changelog YAML for you.

@lukewhiting lukewhiting changed the title New logic to check for conflicting indices before enabling streams pl… Only Allow Enabling Streams If No Conflicting Indices Exist Jul 29, 2025
@lukewhiting lukewhiting requested review from Copilot and szybia August 13, 2025 08:50
Copy link
Contributor

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 prevents enabling logs streams when conflicting indices already exist, addressing issue ES-12416. The implementation adds validation to check for existing indices named "logs" or starting with "logs." before allowing stream enablement.

  • Adds pre-validation to prevent stream enablement conflicts with existing indices
  • Implements comprehensive test coverage for the new validation logic
  • Exports the streams package for broader accessibility

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/src/main/java/module-info.java Exports the streams package to make it accessible
modules/streams/src/yamlRestTest/resources/rest-api-spec/test/streams/logs/10_basic.yml Adds test cases and teardown for conflict validation scenarios
modules/streams/src/main/java/org/elasticsearch/rest/streams/logs/TransportLogsStreamsToggleActivation.java Implements the core validation logic to prevent enabling streams with conflicting indices
modules/streams/build.gradle Minor quote style fix for consistency
docs/changelog/132064.yaml Documents the enhancement for release notes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lukewhiting lukewhiting enabled auto-merge (squash) August 13, 2025 12:13
@lukewhiting lukewhiting merged commit 6508617 into elastic:main Aug 13, 2025
33 checks passed
@lukewhiting lukewhiting deleted the es-12416-streams-enable-check-for-indices branch August 14, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Data streams Data streams and their lifecycles >enhancement Team:Data Management Meta label for data/management team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants