Skip to content

[8.6] [Fleet] added a logic to use destinationId when tagging imported SOs (#147439)#147528

Merged
kibanamachine merged 1 commit intoelastic:8.6from
kibanamachine:backport/8.6/pr-147439
Dec 14, 2022
Merged

[8.6] [Fleet] added a logic to use destinationId when tagging imported SOs (#147439)#147528
kibanamachine merged 1 commit intoelastic:8.6from
kibanamachine:backport/8.6/pr-147439

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.6:

Questions ?

Please refer to the Backport tool documentation

elastic#147439)

## Summary

Fixes elastic#147364

When installing an integration, and some assets already exist in Kibana,
the imported SOs will recieve a newly generated ID. This caused a
problem previously when the tagging logic didn't find the SOs with their
original ID.
The fix takes the new `destinationId` of those SOs, so the tagging can
complete successfully.

**Steps to verify**
1. Add system integration in default space
2. Enroll an agent and wait for system metrics to be ingested
3. Create an Admin space
4. Remove the system package policy, and uninstall the system package
from Default space
5. Go to Admin space and add system integration again
6. Verify that the integration is added successfully, assets are created
in Admin space and assets are tagged with Managed and System tags.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 7cee9ff)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Dec 14, 2022
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 14, 2022
@kibanamachine kibanamachine enabled auto-merge (squash) December 14, 2022 14:15
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibanamachine kibanamachine merged commit 690e4a1 into elastic:8.6 Dec 14, 2022
@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @juliaElastic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants