Skip to content
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

Cherry-pick #5808 to 6.1: Fix isolation of modules when merging local and global field settings. #5825

Merged
merged 1 commit into from
Dec 8, 2017

Conversation

urso
Copy link

@urso urso commented Dec 6, 2017

Cherry-pick of PR #5808 to 6.1 branch. Original message:

Resolves: #5795

The user global and local fields configurations must be merged
on pipeline setup. The DeepUpdate method did only keep references to the
globally shared fields, such that local fields settings do overwrite
the shared global state. If more then one beat.Client instance did set
local fields, the global state (and all fields added to an event) will
be given by the last client being instantiated.

The fix Clones the global fields before merging, such that the
beat.Client fields operate fully in isolation.

@ruflin
Copy link
Contributor

ruflin commented Dec 7, 2017

@urso Needs rebase because of the CHANGELOG.

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

WFR (waiting for rebase)

elastic#5808)

The user global and local fields configurations must be merged
on pipeline setup. The DeepUpdate method did only keep references to the
globally shared fields, such that local fields settings do overwrite
the shared global state. If more then one beat.Client instance did set
local fields, the global state (and all fields added to an event) will
be given by the last client being instantiated.

The fix Clones the global fields before merging, such that the
beat.Client fields operate fully in isolation.

(cherry picked from commit 08eb2f5)
@urso urso force-pushed the backport_5808_6.1 branch from 4ed5a25 to d6fef59 Compare December 7, 2017 14:18
@urso
Copy link
Author

urso commented Dec 7, 2017

rebased

@ruflin ruflin merged commit 436adb9 into elastic:6.1 Dec 8, 2017
@urso urso deleted the backport_5808_6.1 branch February 19, 2019 18:41
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
elastic#5808) (elastic#5825)

The user global and local fields configurations must be merged
on pipeline setup. The DeepUpdate method did only keep references to the
globally shared fields, such that local fields settings do overwrite
the shared global state. If more then one beat.Client instance did set
local fields, the global state (and all fields added to an event) will
be given by the last client being instantiated.

The fix Clones the global fields before merging, such that the
beat.Client fields operate fully in isolation.

(cherry picked from commit a16dc30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants