Skip to content
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

Forbid - in namespace in reroute processor #113218

Closed

Conversation

carsonip
Copy link
Member

@carsonip carsonip commented Sep 19, 2024

- character is not allowed in ECS data_stream.namespace spec.

Fixes #112936

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

`-` character is not allowed in ECS data_stream.namespace spec.

Fixes #112936
@carsonip carsonip force-pushed the fix-reroute-namespace-sanitization branch from 142d79b to 7d43ce9 Compare September 19, 2024 20:33
@carsonip carsonip marked this pull request as ready for review September 19, 2024 20:34
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Sep 19, 2024
pr: 113218
summary: Forbid - in namespace in reroute processor
area: Ingest Node
type: bug
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if "bug" is the best description. This is going to break use cases where people are using non-compliant namespace with - in it.

Copy link
Member Author

@carsonip carsonip Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattc58 should it be something other than "bug"?

@carsonip carsonip added the :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP label Sep 19, 2024
@elasticsearchmachine elasticsearchmachine added Team:Data Management Meta label for data/management team and removed needs:triage Requires assignment of a team area label labels Sep 19, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@carsonip carsonip added the >bug label Sep 19, 2024
@mattc58
Copy link
Contributor

mattc58 commented Sep 19, 2024

Thanks @carsonip. Wouldn't this be a breaking change though? If a user has successfully used this in pipelines to create namespaces with the - character wouldn't this now break them?

@carsonip
Copy link
Member Author

carsonip commented Sep 20, 2024

Thanks @carsonip. Wouldn't this be a breaking change though? If a user has successfully used this in pipelines to create namespaces with the - character wouldn't this now break them?

Correct. That is also why I left the above comment about breaking use cases where people rely on the bug.

There are 2 parts to this change, one part at factory and another at runtime. The factory part does worry me a bit as valid processor will become invalid on upgrade. I don't know whether it will fail the upgrade, stop ingestion, or make ES fail to start. (If you actually have the answer to that, I'll be interested to know.) Now that I think more about the implications, I'm more inclined to ship it in 9.0 with no backports.

On the apm-server end, we are likely going to ship it as a bugfix in 8.16 where we change from no sanitization to replacing all invalid chars, but the impact surface will be limited to use cases where user specifically configured data stream routing attributes in OpenTelemetry (see elastic/apm-server#14043), and it will just index documents to a different data stream at max.

@carsonip carsonip removed the v8.16.0 label Sep 20, 2024
@carsonip
Copy link
Member Author

Would be good to get @felixbarny 's eyes on this as it is initially written explicitly in a way that allows - in namespace but not dataset.

@carsonip carsonip marked this pull request as draft September 25, 2024 10:28
@carsonip
Copy link
Member Author

Closing this PR as we may approach the issue #112936 with an opposite fix.

@carsonip carsonip closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reroute processor sanitization inconsistent with spec
3 participants