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

[Testing] Add test coverage for configuration loading #3516

Closed
kpollich opened this issue May 2, 2024 · 0 comments · Fixed by #3728
Closed

[Testing] Add test coverage for configuration loading #3516

kpollich opened this issue May 2, 2024 · 0 comments · Fixed by #3728
Assignees
Labels
Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@kpollich
Copy link
Member

kpollich commented May 2, 2024

In #3328, we discovered an issue with Fleet Server's configuration reloading, specifically around the APM config:

if expAPMCFG := expInput.APMConfig; expAPMCFG != nil {
instrumentationCfg, err := apmConfigToInstrumentation(expAPMCFG)
if err != nil {
zerolog.Ctx(ctx).Warn().Err(err).Msg("Unable to parse expected APM config as instrumentation config")
} else {
obj := map[string]interface{}{
"inputs": []interface{}{map[string]interface{}{
"server": map[string]interface{}{
"instrumentation": instrumentationCfg,
},
},
}}
err = cfgData.Merge(obj, config.DefaultOptions...)
if err != nil {
zerolog.Ctx(ctx).Warn().Err(err).Msg("Failed to merge APM config into cfgData")
}
}
}

Related PR: #3277

We should add some integration test coverage for different types of configuration to ensure Fleet Server loads all configurations as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants