-
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 compliance tests for 3.1.0 #709
Conversation
2d638f3
to
92dd517
Compare
Scenario: Installer leverages subobjects false | ||
Given the "subobjects_false" package is installed | ||
And a policy is created with "subobjects_false" package | ||
Then index template "metrics-subobjects_false.foo" has a field "foo.object" with "subobjects:false" |
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 is the main reason to stop using the typed API, with this one there is no way to check if a property has the subobjects
property:
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.
It would be great to be able to use the typed API, but it's true that not using it give us more flexibility.
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.
Yes, the typed API is quite nice, but limited for some things, and complicated for dynamic objects in responses.
} | ||
nextProperties, ok := nextPropertiesValue.Interface().(map[string]types.Property) | ||
if !ok { | ||
return nil, fmt.Errorf("property %q not found in index template, cannot convert properties", name) |
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.
Another problem of the typed API is that we ended up relying on reflection for some things.
💚 Build Succeeded
History
cc @jsoriano |
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!
Just a doubt about whether or not set the current next release (3.0.5)
@@ -26,7 +26,8 @@ steps: | |||
EOF | |||
|
|||
# Generate each test we want to do. | |||
compliance_test 8.10.0-SNAPSHOT 2.10.0 | |||
compliance_test 8.13.0-SNAPSHOT 3.1.0 | |||
compliance_test 8.12.0 3.0.4 |
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.
Could it be used a non released spec version here too ? Would it make sense ?
I was thinking of adding here also the current 3.0.5-next
version as a version to comply too (so we have the stable and the next one).
compliance_test 8.12.0 3.0.4 | |
compliance_test 8.12.0 3.0.5-next | |
compliance_test 8.12.0 3.0.4 |
Or just use compliance_test 8.12.0 3.0.5-next
?
It's also true that there is no test package with version 3.0.*
currently
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.
Umm, actually I did some changes to be able to test with unreleased versions, in principle we could have tested 3.0.5 without the next
suffix, as is done with 3.1.0
.
Scenario: Installer leverages subobjects false | ||
Given the "subobjects_false" package is installed | ||
And a policy is created with "subobjects_false" package | ||
Then index template "metrics-subobjects_false.foo" has a field "foo.object" with "subobjects:false" |
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.
It would be great to be able to use the typed API, but it's true that not using it give us more flexibility.
What does this PR do?
Add compliance tests for features added in 3.1.0.
For that I had to migrate to the untyped Elasticsearch API as the typed one doesn't have a way to see if a field is using
subobjects
or not.Why is it important?
To validate if we can increase the max version supported by Kibana.