-
Notifications
You must be signed in to change notification settings - Fork 116
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
Tests fail due to ECS expected values #1472
Comments
As discussed today with @andrewkroh and @P1llus, and earlier with @kgeller and @ebeahan. |
Thanks for the detailed description.
By now I would stay on the restrictive side of things. I don't see other packages using In any case, it sounds good to allow to define Also, once elastic/package-spec#558 is done, we can also add support to selectively disable this validation. |
IMHO breaking a build due to a valid though not expected value is something I'd rather opt into than have as default. It's not critical for me now since I found a variation on my earlier workaround that still works. |
Expected values defined for an ECS field, such as for
threat.indicator.type
, are not the only valid values (def, emphasis added):The
expected_values
field was intended to indicate the "SHOULD" requirement level (as defined for RFCs). For this level it may be appropriate to warn about the use of other values, but not to fail a build or test run.Currently, pipeline and system tests will fail if they find values other than the expected ones.
A previous workaround when using ECS dynamic mappings was to override with explicit definitions. That makes tests pass now if those definitions include the full set of values or an empty array (example), but now
elastic-package
will not successfully build a package if it defines its ownexpected_values
, so this workaround no longer works.Some related links:
validate.go
earlier this year, regarding import of the ECS schemathreat.indicator.type
andthreat.indicator.name
(althoughthreat.indicator.name
is a misuse of expected values and will be converted to examples)The text was updated successfully, but these errors were encountered: