copy entity to user & hosts structs#3791
Merged
chennn1990 merged 8 commits intomainfrom Dec 31, 2025
Merged
Conversation
Contributor
|
This pull request does not have a backport label. Could you fix it @chennn1990? 🙏
|
uri-weisman
approved these changes
Dec 28, 2025
Collaborator
There was a problem hiding this comment.
LGTM 🚀 A few notes:
- Let’s validate this on GCP and Azure before merging.
- We should open a ticket to remove the redundant
entity.*fields for host and user entities once we pivot touser|host.entity.id. This can be tracked as an action item under elastic/kibana#233603. - There are currently no mappings for these fields. we’ll need to add them in the integrations repo:
- Please don't backport to
9.3
| Name: vmProperties.Extended.InstanceView.ComputerName, | ||
| Type: vmProperties.HardwareProfile.VmSize, | ||
| } | ||
| asset.Host.Entity = &asset.Entity |
Collaborator
There was a problem hiding this comment.
Not necessary related to your changes, but I wonder why we don't use the inventory.WithHost utility here.
Contributor
Author
There was a problem hiding this comment.
Seems like a bad practice in this single place.
Do we have a way to enforce those utilities?
Collaborator
There was a problem hiding this comment.
Not with linting or something like that, maybe unit tests can help enforce it, but I'd prefer the tests to be focus on a single class and not on the utilities.
2 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of your changes
Asset Inventory change:
create a nested hierarchy inside User & Host so the entity will be appeared also there instead of a sibling.
Related Issues
[Asset Discovery] Migrate to new nested
*.entity.*schema #3554[Entity Store] Support
*.entity.idfields on transform pivot kibana#233603Checklist