-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Ingest Manager] Guard against empty stream.datasource and namespace #18769
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,13 @@ datasources: | |
streams: | ||
- paths: /var/log/mysql/access.log | ||
dataset: dsds | ||
- name: All specified with empty strings | ||
namespace: "" | ||
inputs: | ||
- type: file | ||
streams: | ||
- paths: /var/log/mysql/access.log | ||
dataset: "" | ||
`, | ||
expectedYAML: ` | ||
datasources: | ||
|
@@ -80,6 +87,14 @@ datasources: | |
- paths: /var/log/mysql/access.log | ||
dataset: dsds | ||
index: mytype-dsds-nsns | ||
- name: All specified with empty strings | ||
namespace: "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't the expected now be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is test for injecting index, it does not change existing values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need both. values and index must match. In a follow up we can discuss, if we should even error if it is "". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @michalpristas I also thought the result should be default? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think we can fix it but outside of injectIndex rule, what this should do is injecting index and not modifying anything on top of that. |
||
inputs: | ||
- type: file | ||
streams: | ||
- paths: /var/log/mysql/access.log | ||
dataset: "" | ||
index: mytype-generic-default | ||
`, | ||
rule: &RuleList{ | ||
Rules: []Rule{ | ||
|
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.
double entry?
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.
no i'm just fixing format of previous one