Add --agent-version flag for flexible Elastic Agent version configuration#3054
Conversation
--agent-version flag for flexible Elastic Agent version configuration
…rameter names for consistency
…pdate parameter names for consistency" This reverts commit 6140db3.
…onfig as stack version
jsoriano
left a comment
There was a problem hiding this comment.
Looks good 👍 Would it be possible to add a test for this?
💚 Build Succeeded
History
|
mrodm
left a comment
There was a problem hiding this comment.
LGTM!
Being able to override the agent version now, I wonder if it would be good to add a new system test configuration to allow override the agent version for each system test. Thereby, each system test could run, if defined, with different Elastic Agent versions. WDYT ? @jsoriano @teresaromero
As discussed offline, we could create a follow-up issue covering the options to:
|
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