Skip to content

Fix bug with subsets and reusable fields#753

Merged
webmat merged 4 commits into
elastic:masterfrom
marshallmain:fix-subset-bug
Apr 7, 2020
Merged

Fix bug with subsets and reusable fields#753
webmat merged 4 commits into
elastic:masterfrom
marshallmain:fix-subset-bug

Conversation

@marshallmain

Copy link
Copy Markdown
Contributor

Subset operation needs to be done after reusables are dropped in place, otherwise reusables could be incorrectly removed by the subset operation. i.e. if hash is not included in the subset at the top level, then it won't show up at process.hash even if process.* is included in the subset.

@marshallmain

Copy link
Copy Markdown
Contributor Author

This needs to be updated to fix a related bug - now if you apply a subset operation to reusables in one place then the reusable is modified in all places. I think the right solution is to allow reusables to be subsetted independently in each location where they are reused, which means doing the subset operation after the reusables are converted from references to copies in the intermediate structure. I'll update the PR and remove the in progress label when that's done.

@webmat webmat self-requested a review April 6, 2020 20:29

@webmat webmat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@webmat webmat merged commit 3343b7f into elastic:master Apr 7, 2020
webmat pushed a commit to webmat/ecs that referenced this pull request Apr 7, 2020
dcode pushed a commit to dcode/ecs that referenced this pull request Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants