-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix: logs pipelines: ensure special characters in pipeline identifiers don't result in bad collector config names #6259
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
Fix: logs pipelines: ensure special characters in pipeline identifiers don't result in bad collector config names #6259
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.
👍 Looks good to me! Reviewed everything up to 6f78c27 in 11 seconds
More details
- Looked at
98
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/logparsingpipeline/pipelineBuilder.go:23
- Draft comment:
The regex pattern used here effectively replaces all non-alphanumeric characters and hyphens with a hyphen, ensuring valid collector config names. This addresses the issue of invalid characters in pipeline aliases. - Reason this comment was not posted:
Confidence changes required:0%
The PR introduces a regex to replace invalid characters in pipeline aliases with a hyphen. This ensures that the generated collector config names are valid. The test added verifies this behavior by checking that a pipeline alias with a pipe character does not break the collector config. The implementation seems correct and addresses the issue described in the PR.
2. pkg/query-service/app/logparsingpipeline/pipelineBuilder.go:23
- Draft comment:
The regex[^a-zA-Z0-9-]
ensures that only valid characters are used in collector config names, resolving the issue with special characters in pipeline aliases. - Reason this comment was not posted:
Confidence changes required:0%
The code uses a regex to replace invalid characters in pipeline aliases, which resolves the issue of invalid characters in collector config names.
Workflow ID: wflow_2uTYWW44HbayWfR3
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
6f78c27
to
05df623
Compare
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! Reviewed everything up to 05df623 in 9 seconds
More details
- Looked at
98
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/logparsingpipeline/pipelineBuilder.go:23
- Draft comment:
The regex pattern used inbadCharsForCollectorConfName
correctly replaces non-alphanumeric characters with-
, ensuring valid collector config names. - Reason this comment was not posted:
Confidence changes required:0%
The regex pattern used inbadCharsForCollectorConfName
is correct for replacing non-alphanumeric characters with-
. This ensures that the pipeline identifiers are normalized as intended.
2. pkg/query-service/app/logparsingpipeline/pipelineBuilder.go:25
- Draft comment:
The functionCollectorConfProcessorName
correctly normalizes the alias by replacing non-alphanumeric characters with-
. This resolves the issue of invalid collector config names due to special characters. - Reason this comment was not posted:
Confidence changes required:0%
The functionCollectorConfProcessorName
correctly normalizes the alias by replacing non-alphanumeric characters with-
. This resolves the issue of invalid collector config names due to special characters.
Workflow ID: wflow_qDD8nJtMnBPkK3KK
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary
ensures special characters in pipeline identifiers don't result in bad collector config names
Fixes #6253
Important
Normalize pipeline identifiers to ensure valid collector config names despite special characters.
CollectorConfProcessorName
inpipelineBuilder.go
by replacing non-alphanumeric characters with-
.TestPipeCharInAliasDoesntBreakCollectorConfig
incollector_config_test.go
to verify special characters in pipeline aliases do not break collector config generation.This description was created by
for 05df623. It will automatically update as commits are pushed.