-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add ignored_fields to test config #82
Conversation
"ignored_fields": [ | ||
"foobar", | ||
"world", | ||
"hello" | ||
] |
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.
I read through the use case for this PR: elastic/elastic-package#169. My understanding is that there will be some fields in the indexed documents that will have dynamic values - values whose value will be different each time the test is executed. However, these fields' values should still conform to a specific data type and shape.
So I would not recommend that we completely allow certain fields to be ignored. Instead, perhaps we can allow users to specify certain fields in the test config and specify a valid pattern for that field's value. So something like:
"ignored_fields": [ | |
"foobar", | |
"world", | |
"hello" | |
] | |
"dynamic_fields": { | |
"foobar": ".*", | |
"a_numeric_field": "\\d+" | |
} |
I'm not married to the name of this setting; just using dynamic_fields
as a suggestion above.
This way we can allow for dynamic values for specific fields without completely ignoring them. WDYT?
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.
However, these fields' values should still conform to a specific data type and shape.
This is a good argument for dynamic fields.
Instead, perhaps we can allow users to specify certain fields in the test config and specify a valid pattern for that field's value.
We'll need to update the pipeline test runner to make the diff more smarter (consider regular expressions), but I think it's possible.
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.
LGTM.
Issue: elastic/elastic-package#169
This PR adds
ignored_fields
property definition to the test config.