-
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] Make integration names globally unique #115212
[Fleet] Make integration names globally unique #115212
Conversation
Pinging @elastic/fleet (Team:Fleet) |
1847cd0
to
1dededf
Compare
@elasticmachine merge upstream |
74a21be
to
8eab9fc
Compare
49b60af
to
c10685f
Compare
...ations/fleet/sections/agent_policy/create_package_policy_page/step_define_package_policy.tsx
Outdated
Show resolved
Hide resolved
I think we could have an issue with that feature and preconfigured policy, we generate a package policy name for preconfigured policy and not sure how it will work with that feature |
@nchaulet thanks for pointing it out. How can I test the preconfigured policy? |
@criamico You can add some policies to your kibana config file, like this for example
|
⏳ Build in-progress, with failures
Failed CI StepsHistory
To update your PR or re-run it, just comment with: cc @criamico |
766e9e8
to
50907dc
Compare
c02f5b7
to
565251b
Compare
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @criamico |
The following labels were identified as gaps in your version labels and will be added automatically:
If any of these should not be on your pull request, please manually remove them. |
* [Fleet] Make integration names globally unique * Fix Jest tests * Append (copy) to names of integration packages belonging to duplicated policy * Update current policy maintaining its name * Fix failing tests
* [Fleet] Make integration names globally unique * Fix Jest tests * Append (copy) to names of integration packages belonging to duplicated policy * Update current policy maintaining its name * Fix failing tests
* [Fleet] Make integration names globally unique * Fix Jest tests * Append (copy) to names of integration packages belonging to duplicated policy * Update current policy maintaining its name * Fix failing tests Co-authored-by: Cristina Amico <[email protected]>
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
2 similar comments
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
1 similar comment
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
* [Fleet] Make integration names globally unique * Fix Jest tests * Append (copy) to names of integration packages belonging to duplicated policy * Update current policy maintaining its name * Fix failing tests Co-authored-by: Cristina Amico <[email protected]>
Hi @criamico
We received below error as expected on adding same name integration:
We are able to add integration with a unique name.
Integration names are incremented globally.
No issues are observed on upgrading integration.
Integration name of duplicated policy shows up like system-1 (copy) Build details
Thanks |
Summary
Implements #72948
Closes #116475
Currently, when installing an integration package, the name has to be unique per agent policy. This allows to have several integrations across policies having the same name, which can be confusing for the user.
This PR changes the logic in
PackagePolicyService
to ensure that the name is globally unique and updates the componentstep_define_package_policy
to change the naming displayed in the form to be incremented based on all the package policies.Repro steps
Test case 1 (Adding an integration with an already used name)
policies
tab (app/integrations/detail/apache-1.1.1/policies
), and click onAdd Apache
Test case 2 (Adding an integration with a unique name)
Add Apache
Test case 3 (Pre-filled name increments globally)
Add Apache
Apache-2
it should now beApache-3
:Test case 4 (Upgrading a policy)
Test case 5 (Duplicating an agent policy)
Name (copy)
Checklist
Delete any items that are not applicable to this PR.
For maintainers