Repository navigation
[9.4] (backport #16169) [mage] Load .package-version by default only for select targets - #16186
Merged
Merged
Conversation
(cherry picked from commit d1db1df)
mergify
Bot
requested review from
macdewee and
ycombinator
and removed request for
a team
August 13, 2026 10:22
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
swiatekm
previously approved these changes
Aug 13, 2026
swiatekm
enabled auto-merge (squash)
August 13, 2026 10:35
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Add WithPackageVersionOverrides() to Helm.Package so the chart version matches the other snapshot artifacts in the same DRA run. The GHA-triggered Helm chart release workflows disable this via USE_PACKAGE_VERSION=false, since those builds derive the version from the release tag rather than .package-version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
mallendem
approved these changes
Aug 14, 2026
Contributor
TL;DRThis build is failing for two non-PR-code reasons: (1) Remediation
Investigation detailsRoot CauseTwo distinct classes of failure are present:
Evidence
Verification
Follow-up
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Makes reading
.package-versionopt-in per mage target instead of applying it on every settings load.Previously,
LoadSettings()unconditionally applied.package-versionoverrides (manifest URL, versions,Snapshot=true) unlessUSE_PACKAGE_VERSION=falsewas set. Every target saw these values, including ones with no component dependencies, which silently clobbered explicitSNAPSHOT=falseandBEAT_VERSIONsettings (#16026, #15972, #15924).Now the overrides live in
Settings.WithPackageVersionOverrides(), called only by targets that need consistency with the published snapshot build:package(andcloud:image),downloadManifest,ironbank,cloud:load/cloud:push, and the integration test runners. All other targets (helm:package,packageAgentCore, plain builds) never read the file, andUSE_PACKAGE_VERSIONhas no effect on them.Behavior changes:
AGENT_PACKAGE_VERSION,BEAT_VERSION,AGENT_VERSION,AGENT_STACK_VERSION) win over.package-versioninstead of being overwritten.SNAPSHOTvalue that contradicts.package-versionis an error on opt-in targets instead of being silently ignored.MANIFEST_URLalone disables the overrides; combining it with an explicitUSE_PACKAGE_VERSION=trueis an error.MANIFEST_URL=... mage packageno longer requiresUSE_PACKAGE_VERSION=false.packagepasses its resolved settings to dependency targets via context sopackageAgentCorenames the core archive with the same version.BEAT_VERSIONinstead ofUSE_PACKAGE_VERSION, so the inner mage invocation doesn't re-derive values from.package-version.CI cleanup: removed the
helm-charts.shworkaround for #16026 and the now-redundantUSE_PACKAGE_VERSION=falseopt-outs inbuild-agent-core.shandpackage.sh.beats_tests.shkeeps its opt-out, which still applies to the integration runner.Why is it important?
SNAPSHOT=falsewas silently ignored by the Helm chart pipeline, producing snapshot-named artifacts from release tags. The root cause - global overrides that most targets never needed - also produced theBEAT_VERSIONleak in the serverless Beats tests and required scattered opt-outs in CI scripts.Related issues
SNAPSHOT=falseoverridden in Helm packaging step #16026This is an automatic backport of pull request [mage] Load .package-version by default only for select targets #16169 done by Mergify.