-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
elastic/elastic-package
#3163Labels
discussIssue needs discussionIssue needs discussion
Description
Packages have two ways of defining Kibana tags:
- Directly as a saved object under
kibana/tag. These are used for package-specific tags. - Using the
kibana/tags.ymlfile, that is intended for shared tags, and includes rules about what saved objects to reference with this tag. It is created when needed if it doesn't exist yet.
Packages can currently define the same tag using both methods, what leads to having the same tag multiple times, for example for Crowdstrike:
- Defined as a package-specific tag (what manages
crowdstrike-security-solution-default): https://github.com/elastic/integrations/blob/7414f0cee3cdb60cdbef9f5895556640fe57f916/packages/crowdstrike/kibana/tag/crowdstrike-security-solution-default.json#L5 - Defined in
kibana/tags.yml(what manages the tagging of saved objects withsecurity-solution-default: https://github.com/elastic/integrations/blob/7414f0cee3cdb60cdbef9f5895556640fe57f916/packages/crowdstrike/kibana/tags.yml#L1
Not sure, but it might be also possible to duplicate a tag if defined twice with the same name but different ids under kibana/tag.
Some tasks here:
- Add a validation rule that ensures that each tag is defined only once in each package. Two tags are the same when defined in a package if they have the same name, even if they have different ids.
Shared tags should have preference, so if a package is defined underkibana/tagandtags.yml, the error should point to the definition inkibana/tag. - When exporting resources with
elastic-package, avoid creating tags underkibana/tagif they already exist inkibana/tags.yml, update if needed to include ids.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
discussIssue needs discussionIssue needs discussion