-
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 some vars from preconfiguration not being added to package policies #113204
Conversation
Pinging @elastic/fleet (Team:Fleet) |
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: cc @jen-huang |
LGTM |
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.
Change LGTM. Can we open an issue for adding test coverage for this?
Created #113248 to capture test coverage. I will take this on. |
Hi @kpollich We have validated this PR And found this PR is fixed now in 8.0 snapshot, 7.15.1 snapshot and 7.16 snapshot build.
Hence, it is working fine now. Thanks |
Summary
Resolves elastic/fleet-server#742.
This PR fixes an issue where some variables defined in
xpack.fleet.agentPolicies
were not having their values correctly applied to the final package policies. This is seen on 7.15 Cloud deployments where the Fleet Server policies is missing values formax_connections
andcustom
, even though they are specified in the preconfiguration setup.This is due to a mistake in the ordering of objects that are merged in the helper function
deepMergeVars
. The override value should get merged last as, well, it is meant to override ;)Testing
With Postman or cURL, send the below request to set up some preconfigured policy (I am using the exact Cloud setup in this case) prior to this PR. Observe the policy in Fleet UI, notice the empty fields:
After applying this PR, run the request again after incrementing the
id
. The new policy should have the fields correctly filled out: