-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Fix - Increment system package name when adding agent policy with monitoring #118403
Conversation
5d2d836
to
6361447
Compare
Pinging @elastic/fleet (Team:Fleet) |
? systemPackagePolicyData.items | ||
.filter((ds) => Boolean(ds.name.match(pkgPoliciesNamePattern))) | ||
.map((ds) => parseInt(ds.name.match(pkgPoliciesNamePattern)![1], 10)) | ||
.sort((a, b) => a - b) |
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.
nit: I don't think the sort implementation is necessary?
.sort((a, b) => a - b) | |
.sort() |
6361447
to
7a80b79
Compare
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 w/ one minor nit
7a80b79
to
081230c
Compare
💚 Build Succeeded
Metrics [docs]
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. |
…with monitoring (#118403)
Closes #118357
Summary
Adding an agent policy with "Collect system logs and metric" checkbox enabled triggers the error
There is already a package with the same name
This bug was caused by the unique names PR: when we add a new agent policy with the system monitoring enabled we automatically install the
system
package, but the name given to the integration was always the same (system-1
). Since we are now checking that all the integration packages have a unique name, the installation fails with the above error.In this PR I'm adding a function that fetches all the
system
integrations already installed and increment the name, like it was done in the previous PR.Steps to reproduce:
system
integration with incremental name format (something likesystem-1
,system-2
...)Checklist
For maintainers