-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Display pipelines and mappings sections in the policy editor for input packages #153105
Comments
Pinging @elastic/fleet (Team:Fleet) |
@P1llus I created this based on our conversation earlier 👍 |
@kpollich As you sneaked it into our next sprint, could you please think about what we can pull out? |
@jlind23 - To be honest I think it can fit in next sprint without moving anything else out. @hop-dev has no other assignments in Sprint 9, and the policy secrets technical definition task is nearing completion. Mark would be the targeted engineer to work on this, and he's of the mind that it'd be a fairly low-effort enhancement. |
@kpollich Thanks for the feedback then, much appreciated 😄 |
## Summary Closes #153105 Show the pipelines and mappings editor for input packages. This can be seen when editing an input package integration policy. Previously this was hidden for input packages and any integration package which allowed datastream to be configured. I have tweaked this logic so that we check if the matching index template for a stream exists, if it does then show the editor. <img width="407" alt="Screenshot 2023-03-30 at 17 02 26" src="https://user-images.githubusercontent.com/3315046/228896543-192e5fc5-3dc3-4a0f-a08f-a7ff83555ef3.png"> This allows us to handle an edge case (which will become more common as input packages are rolled out) when integration package which has since been upgraded to an input package, for example: - user installs the custom logs integration package and sets dataset to helloworld - the `logs-helloworld` index template is not created as integration packages only create index templates on install (custom logs creates `logs-log.log`) - there is therefore no ingest pipeline `@custom` or `@package`component template to customize, we do not show the pipeline editor. - The user upgrades to an input package version of custom logs (coming in v2.0.0) there still isn't an index template because we do not create them on upgrade, so we still don't want to show the pipelines and mappings editor - Just checking for input package in this scenario would mean we showed the editor incorrectly I have opted to show the editors even if the stream is owned by another package e.g custom logs data is being sent to an nginx stream. ### Automated tests I have added cypress tests for checking that the mappings pipelines editors are shown for input packages. ### Manual test cases Here is version 2.0.0 of logs which is an input package: [log-2.0.0.zip](https://github.com/elastic/kibana/files/11113579/log-2.0.0.zip) it can be added to a deployment using curl: ``` curl -XPOST -H 'content-type: application/zip' -H 'kbn-xsrf: true' http://localhost:5601/mark/api/fleet/epm/packages -u elastic:changeme --data-binary @/path/to/log-2.0.0.zip ``` - Create a policy for an integration package which does not allow dataset to be configured (e.g Apache) - pipelines & editor should be visible when editing package policy - Create a policy for an integration package which does allow dataset to be configured (e.g custom logs 1.6.1) - pipelines & mappings editor should not be shown if dataset doesn't match the one installed by the package `logs.log` - Upgrade custom logs to the input package version (2.0.0) - pipelines and mappings editor still should not be shown --------- Co-authored-by: kibanamachine <[email protected]>
In #145617 the pipelines and mappings editor is disabled for input packages. Customisation is one of the big advantages of input packages so we should give users a way of easily accessing customisation options.
Open questions
The text was updated successfully, but these errors were encountered: