Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jun 30, 2025

What does this PR do?

This PR temporarily pins AGENT_VERSION and BEAT_VERSION (probably for historical reasons we need both, ty for the BEAT_VERSION hint @pchila ) to 9.1.0-SNAPSHOT in CI pipelines. This is an effort to mitigate breakages caused by the recent version bump to 9.2.0 which point to unavailable snapshot artifacts for 9.2.0-SNAPSHOT in the unified release.

In particular, this patch:

  • Pins AGENT_VERSION, AGENT_PACKAGE_VERSION, and BEAT_VERSION across all affected pipelines.
  • Skips upgrade_broken_package_test.go since it fails due to the version mismatch until the pinning is removed.
  • Wraps the parsing logic of version.go in Bash and PowerShell scripts to only run when the AGENT_VERSION is not explicitly set.
  • Updates cloud:push and cloud:load mage targets to respect the pinned AGENT_VERSION, replacing previously hardcoded fallback to version.go.

Why is it important?

Pinning the version ensures a consistent and known state for the CI runs until the 9.2.0 snapshot artifacts are fully available via DRA and unified stack release.

In addition, there's another issue introduced by #8352, which pins the ESS stack version used in CI to the latest stable version. This means that even if the 9.2.0 DRA snapshot was published, the CI would still be failing due to version incompatibility between the provisioned ESS stack and the elastic-agent binary under test, until the pinned ESS version point to a 9.2.0 stack.

Also, the cloud:push and cloud:load mage targets - introduced by #8035 - did not originally respect version overrides and required additional code changes to support environment-based overrides, similar to the rest of the codebase.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None expected. These changes only affect CI behavior and not end-user installations or interactions.

How to test this PR locally

This changes regard only CI pipelines

Related issues

N/A


This is an automatic backport of pull request #8736 done by [Mergify](https://mergify.com).

* ci: pin elastic-agent version

* ci: override BEAT_VERSION

* ci: fix mage cloud:load and cloud:push

(cherry picked from commit 5c5b174)

# Conflicts:
#	.buildkite/bk.integration-fips.pipeline.yml
#	.buildkite/bk.integration.pipeline.yml
#	.buildkite/scripts/buildkite-integration-tests.sh
#	magefile.go
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jun 30, 2025
@mergify mergify bot requested review from a team as code owners June 30, 2025 17:20
@mergify mergify bot added conflicts There is a conflict in the backported pull request backport labels Jun 30, 2025
@mergify mergify bot removed the request for review from a team June 30, 2025 17:20
@mergify mergify bot requested review from michalpristas and ycombinator June 30, 2025 17:20
@mergify
Copy link
Contributor Author

mergify bot commented Jun 30, 2025

Cherry-pick of 5c5b174 has failed:

On branch mergify/bp/8.17/pr-8736
Your branch is up to date with 'origin/8.17'.

You are currently cherry-picking commit 5c5b174ae.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .buildkite/integration.pipeline.yml
	modified:   .buildkite/scripts/buildkite-integration-tests.ps1
	modified:   .buildkite/scripts/common.sh
	modified:   testing/integration/upgrade_broken_package_test.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   .buildkite/bk.integration-fips.pipeline.yml
	both modified:   .buildkite/bk.integration.pipeline.yml
	both modified:   .buildkite/scripts/buildkite-integration-tests.sh
	both modified:   magefile.go

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

@pkoutsovasilis pkoutsovasilis removed the conflicts There is a conflict in the backported pull request label Jun 30, 2025
@elastic-sonarqube
Copy link

@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @pkoutsovasilis

@pkoutsovasilis pkoutsovasilis merged commit f18a91e into 8.17 Jun 30, 2025
19 checks passed
@pkoutsovasilis pkoutsovasilis deleted the mergify/bp/8.17/pr-8736 branch June 30, 2025 21:00
@pkoutsovasilis pkoutsovasilis mentioned this pull request Jul 3, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants