-
Couldn't load subscription status.
- Fork 198
[9.1] (backport #9048) ci: build agent from snapshot DRA #9282
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
Conversation
* feat: rework .package-version and mage integration:UpdatePackageVersion to make CI build always from snapshot DRA * feat: incorporate USE_PACKAGE_VERSION in mage * experiment: bump version.go * Revert "experiment: bump version.go" This reverts commit a57ee10. * chore: bump .package-version * feat: allow AGENT_VERSION to be overridden by env var * fix: use named args for all args in integration_tests_tf.ps1 * feat: panic on err of initPackageVersion * fix: don't panic when .package-version file doesn't exist, log it instead * feat: rework fabrication of CI_ELASTIC_AGENT_DOCKER_IMAGE * feat: use os.WriteFile in writePackageVersion * chore: bump to latest snapshot DRA * fix: always DownloadManifest if PackagingFromManifest is set in mage package * fix: check err of filepath.Abs(dropPath) (cherry picked from commit a155660) # Conflicts: # .buildkite/integration.pipeline.yml # .package-version
|
Cherry-pick of a155660 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
first I wanna see how this PR behaves on |
|
ok CI run on main is green and the automation PR looks correct #9283 proceeding with addressing the conflicts |
|
💛 Build succeeded, but was flaky
Failed CI StepsHistory
|





What does this PR do?
This PR reworks the
.package-versionfile format and integrates it into our CI and mage workflows to enable deterministic, snapshot-based builds of Elastic Agent based on published DRA (Downloadable Release Artifacts).Key changes:
.package-versionis now a structured JSON file containing version metadata (version,build_id,stack_build_id,manifest_url, etc.)..package-versionwhenUSE_PACKAGE_VERSION=trueis set.magetargetUpdatePackageVersionreplaces previous logic with a structured update mechanism for.package-version..package-version.Why is it important?
We previously had a fundamental dependency issue in the release flow: to produce a new Elastic Agent DRA, we needed to bump the agent version — but our CI integration tests required that same DRA to already exist in order to pass. This created a timing problem and made the release workflow fragile.
With this PR:
.package-versionwhenUSE_PACKAGE_VERSION=trueis set, allowing packaging and testing to rely on a known-good, previously published DRA..package-version, now become the authoritative source of truth for the Elastic Agent version used in the repo and must be handled with utmost care..package-versionhas been merged.This enables a reproducible and version-pinned CI system while allowing us to automate snapshot bumps in a controlled and testable way.
An experimental version bump under commit
a57ee10verified this flow successfully. The CI run is available here.Checklist
./changelog/fragmentsusing the changelog toolDisruptive User Impact
None expected. Existing workflows are unaffected unless
USE_PACKAGE_VERSION=trueis explicitly set. In that case,.package-versionis required and must be up to date.How to test this PR locally
specify
USE_PACKAGE_VERION=trueand call anymagetarget e.g.Related issues
This is an automatic backport of pull request #9048 done by [Mergify](https://mergify.com).