-
Notifications
You must be signed in to change notification settings - Fork 129
Add --agent-version flag for flexible Elastic Agent version configuration
#3054
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
base: main
Are you sure you want to change the base?
Conversation
| DataStreamRootPath: dataStreamPath, | ||
| Variant: variantFlag, | ||
| StackVersion: stackVersion.Version(), | ||
| AgentVersion: stackVersion.Version(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service cmd needs an agent version definition? or the default (same as stack) is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess deployers that manage their own agents could use this version, though not sure if we need a different setting for stack and agent version 🤔
In any case this is internal by now, right? No change for users.
⏳ Build in-progress, with failures
Failed CI StepsHistory
|
--agent-version flag for flexible Elastic Agent version configuration
| if url, ok := config.Parameters[stack.ParamServerlessFleetURL]; ok { | ||
| fleetURL = url | ||
| } | ||
| if version, ok := config.Parameters[stack.ParamServerlessLocalStackVersion]; ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the flag value will be overriden by the config file one
I think it should be the other way around, if a user is setting a flag in the command line, this value should be prioritized over the one in config files.
This PR introduces a new --agent-version flag that allows users to specify a different Elastic Agent version from the stack version when running tests and booting up the stack.
What changed
Added --agent-version flag to stack up, stack update, and test system commands
The flag defaults to the stack version if not specified, maintaining backward compatibility
Environment variables (ELASTIC_AGENT_IMAGE_REF_OVERRIDE) and configuration file settings (stack.image_ref_overrides.elastic-agent) still take precedence over the flag
System tests now support running with different agent versions, making it easier to test compatibility with older agent versions
Why
With the new agent.version condition being introduced in package manifests to specify minimum compatible Elastic Agent versions, we need an easier way to test packages against different agent versions. Previously, you had to use environment variables or modify the config file. Now you can just pass --agent-version 8.10.0 to quickly test with a specific agent version.
This is especially useful for ensuring packages maintain compatibility with older agent versions without breaking changes.
Resolves #2852