-
Notifications
You must be signed in to change notification settings - Fork 112
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 validation of multi-fields of external fields #1335
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f076aba
Look for field definitions also in multi-fields
jsoriano 9e59989
Add test that reproduces the issue
jsoriano 6093d8e
Inject external fields when creating the validator
jsoriano fa6a4d6
Remove unneeded reference to field dependency manager
jsoriano 403c4a0
Make importField private
jsoriano 62597d2
Keep options provided by caller
jsoriano 72563f3
Update test files
jsoriano 3fbf044
Remove irrelevant data streams
jsoriano d1eaefb
Remove unneeded error handling
jsoriano 6d644a7
Keep printing empty groups from ECS, for backwards compatibility reasons
jsoriano a0d794a
Add godocs to KeepExternal
jsoriano 970e166
Regenerate README
jsoriano 3a378da
Merge remote-tracking branch 'origin/main' into ecs-multi-fields
jsoriano d817ab6
Keep empty fields for fields validation, but not for documentation
jsoriano d80b5fb
Review unit tests
jsoriano ff8b347
Fix inject fields recursion
jsoriano 1131866
Add test case
jsoriano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"@timestamp": "2023-06-27T15:08:06.769Z", | ||
"data_stream": { | ||
"dataset": "mongodb.status", | ||
"namespace": "ep", | ||
"type": "metrics" | ||
}, | ||
"process": { | ||
"name": { | ||
"text": "mongodb" | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This parameter for fields injection can be a bit difficult to follow. Its only purpose is to mimic a collateral behaviour we had with lazy resolution of external fields: In some places we were skipping group fields when they were empty. But this was not happening with external fields, because on these checks the field was still unresolved.
We may argue that this behaviour is unexpected and we should fix it instead, because it treats fields on different ways depending if they are external or not. But fixing this would break CI builds of packages, because it changes what fields are rendered.
This flag helps keeping the old behaviour for rendered documentation: