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

Fix/panic with composable renderer #823

Merged
merged 5 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
- Allow the / char in variable names in eql and transpiler. {issue}715[715] {pull}718[718]
- Fix data duplication for standalone agent on Kubernetes using the default manifest {issue-beats}31512[31512] {pull}742[742]
- Agent updates will clean up unneeded artifacts. {issue}693[693] {issue}694[694] {pull}752[752]
- Fix a panic cause by a race condition when installing the Elastic Agent. {issues}806[806]
ph marked this conversation as resolved.
Show resolved Hide resolved

==== New features

Expand Down
6 changes: 6 additions & 0 deletions internal/pkg/agent/install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,15 @@ func applyDynamics(ctx context.Context, log *logger.Logger, cfg *config.Config)
varsArray := make([]*transpiler.Vars, 0)
var wg sync.WaitGroup
wg.Add(1)

ctx, cancel := context.WithCancel(ctx)

ph marked this conversation as resolved.
Show resolved Hide resolved
// The composable system will continuously run, we are only interested in the first run on of the
// renderer to collect the variables we should stop the execution.
varsCallback := func(vv []*transpiler.Vars) {
varsArray = vv
wg.Done()
cancel()
ph marked this conversation as resolved.
Show resolved Hide resolved
}

ctrl, err := composable.New(log, cfg)
Expand Down