-
Notifications
You must be signed in to change notification settings - Fork 75
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
Make tags.yml print a warning instead of failing #577
Make tags.yml print a warning instead of failing #577
Conversation
e6904c7
to
4dae82a
Compare
4dae82a
to
a6bf34b
Compare
The problem can be, that users may want to add the saved object tags, but they would silently be ignored in older versions, and this may be unexpected. I think this was the main reason to add this check. |
I think this was our initial assumption of how this would work based on elastic/integrations#7483. In any case it is for sure up for discussion cc @narph |
I think since the tags never existed in the old versions, and the creation of those tags is managed by fleet, they are free to create tags with the same names manually, but they should not really be deleted or taken over by fleet either way. I was hoping to not have the version restriction, but let's see if there is any other opinions as well 👍 |
I agree with @jsoriano . This validation was added to avoid users/developers adding those tag files ( |
@jsoriano @mrodm Unfortunately this one is a fairly significant blocker for us. We are planning on deploying this on every integration owned by SEI, but it would be fairly significant impact for us to bump the version on all our integrations, seeing that we cannot provide hotfixes anymore to older versions then. These tags are also required for our UI in Serverless. |
There is a way of doing hotfixes in-place for integrations repository, here are the docs: An option it would be to change this to just a warning in package-spec, but this warning would be just shown while the package is built or checked using If it is done so, probably description of this tags file should be also updated to include something similar to "They are just installed when Kibana >= 8.10". And it could be added the warning, as it was done in this validation rule to be able to test it: package-spec/code/go/internal/validator/semantic/validate_visualizations_used_by_value.go Line 31 in 037631b
Here it is the test to validate warnings:
@jsoriano WDYT ? |
Would be really appreciated if this could be possible! A bit unsure why the end users would be the main focus there, as there is no UI saying that these tags will be added right? Or documentation that mentions the tags are created? |
Sounds good.
It would be users, package developers, support... these tags will be silently ignored on installation on older versions, what can be unexpected when the tags are actually defined in the packages. Probably not a big issue in any case to miss some tags, but unexpected. |
@jsoriano @marc-gr let's add a comment at the top of the tags.yml file explaining that these will be applied to 8.10+ users only, just to prevent users seeing our tag files and might get confused? |
It would be nice to also change the errors by warnings following the example of the validation rule shown in #577 (comment) package-spec/code/go/internal/validator/semantic/validate_visualizations_used_by_value.go Lines 31 to 32 in 037631b
package-spec/code/go/internal/validator/semantic/validate_visualizations_used_by_value.go Lines 61 to 66 in 037631b
That validation rule will just show a warning message when building time, but when testing package-spec (running |
I will update the PR to include that then 👍 |
💚 Build Succeeded
History
|
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.
👍
Just as a note, packages will need to be updated to a spec version >= 2.11.0 (to be released) in order to be able to define kibana/tags.yml
What does this PR do?
Changes validation error for Kibana version when using
tags.yaml
to a warning.Why is it important?
If we want to add this file to all integrations, this would require to bump minimum kibana version for all of them.
Since having this file, even when not used, when targeting lower stack versions is not harmful, removing the error allows us to add
tags.yml
to all integrations. Users on stacks >= 8.10 would benefit from it automatically, and for the rest nothing would change.Checklist
- [ ] I have added test packages totest/packages
that prove my change is effective.spec/changelog.yml
.Related issues