Skip to content

Conversation

pkoutsovasilis
Copy link
Contributor

@pkoutsovasilis pkoutsovasilis 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

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick action! So far, I am leaving a comment only as this is a draft, and will follow with an LGTM once the CI run is green.

We'll need to be careful with the backports of this PR!

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @pkoutsovasilis

@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review June 30, 2025 11:40
@pkoutsovasilis pkoutsovasilis requested review from a team as code owners June 30, 2025 11:40
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link
Member

@pchila pchila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small correction on a comment. Not blocking for merge.
Thank you for the prompt action.
LGTM

@dliappis dliappis self-requested a review June 30, 2025 12:21
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pkoutsovasilis pkoutsovasilis merged commit 5c5b174 into elastic:main Jun 30, 2025
19 checks passed
@pkoutsovasilis pkoutsovasilis added backport-8.17 Automated backport with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch and removed backport-skip labels Jun 30, 2025
mergify bot pushed a commit that referenced this pull request Jun 30, 2025
* 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 bot pushed a commit that referenced this pull request Jun 30, 2025
* 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/scripts/buildkite-integration-tests.sh #	magefile.go
mergify bot pushed a commit that referenced this pull request Jun 30, 2025
* 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/scripts/buildkite-integration-tests.sh #	magefile.go
pkoutsovasilis added a commit that referenced this pull request Jun 30, 2025
* ci: pin elastic-agent version (#8736) * 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/scripts/buildkite-integration-tests.sh #	magefile.go * fix: resolve conflicts --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis added a commit that referenced this pull request Jun 30, 2025
* ci: pin elastic-agent version (#8736) * 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/scripts/buildkite-integration-tests.sh #	magefile.go * fix: resolve conflicts * fix: correct 9.0.3 agent version --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis added a commit that referenced this pull request Jun 30, 2025
* ci: pin elastic-agent version (#8736) * 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 * fix: resolve conflicts * fix: pin at 8.17.8 --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis added a commit to pkoutsovasilis/elastic-agent that referenced this pull request Jun 30, 2025
pkoutsovasilis added a commit that referenced this pull request Jul 3, 2025
* revert: pin elastic-agent version * bump: ESS stack version * bump: beats dependency
v1v added a commit to v1v/elastic-agent that referenced this pull request Jul 6, 2025
…ng-oblt-cli * upstream: (37 commits) [AutoOps] Add `autoops-es.yml` to Packages (elastic#8728) EDOT collector: include the forward connector. (elastic#8753) Revert "ci: pin elastic-agent version (elastic#8736)" (elastic#8754) bk: retry Start ESS stack for integration tests (elastic#8553) Re-enable TestStandaloneUpgradeRollbackOnRestarts on windows (elastic#8718) removed reviewers from dependabot.yml (elastic#8709) Pass `--header` enrollment option to fleet-server (elastic#8071) Add ability for local output configuration to add to policy configuration (elastic#8766) Bump up github.com/go-viper/mapstructure/v2 dependency (elastic#8764) [Synthetics] Upgrade node to latest lts v20 (elastic#8712) [CI] BK Vault plugin for EC access (elastic#8377) feat: singleTest mage target for each integration test package (elastic#8691) ci: always include 8.19 LTS release branch in snapshots of test versions (elastic#8761) build(deps): bump github.com/elastic/mito from 1.19.0 to 1.20.0 (elastic#8755) chore: fix elastic-agent helm chart examples (elastic#8765) feat: support onboarding-id for kubernetes (elastic#8692) [main][Automation] Bump VM Image version to 1751072471 (elastic#8734) ci: revert deployment_csp_configuration.yaml to create_deployment_csp_configuration.yaml (elastic#8746) kustomize: pin kube-state-metrics version (elastic#8739) ci: pin elastic-agent version (elastic#8736) ...
v1v added a commit that referenced this pull request Jul 6, 2025
* upstream: (39 commits) Fix otel extension status reporting (#8696) Refactor user change on service (#8347) [AutoOps] Add `autoops-es.yml` to Packages (#8728) EDOT collector: include the forward connector. (#8753) Revert "ci: pin elastic-agent version (#8736)" (#8754) bk: retry Start ESS stack for integration tests (#8553) Re-enable TestStandaloneUpgradeRollbackOnRestarts on windows (#8718) removed reviewers from dependabot.yml (#8709) Pass `--header` enrollment option to fleet-server (#8071) Add ability for local output configuration to add to policy configuration (#8766) Bump up github.com/go-viper/mapstructure/v2 dependency (#8764) [Synthetics] Upgrade node to latest lts v20 (#8712) [CI] BK Vault plugin for EC access (#8377) feat: singleTest mage target for each integration test package (#8691) ci: always include 8.19 LTS release branch in snapshots of test versions (#8761) build(deps): bump github.com/elastic/mito from 1.19.0 to 1.20.0 (#8755) chore: fix elastic-agent helm chart examples (#8765) feat: support onboarding-id for kubernetes (#8692) [main][Automation] Bump VM Image version to 1751072471 (#8734) ci: revert deployment_csp_configuration.yaml to create_deployment_csp_configuration.yaml (#8746) ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.17 Automated backport with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

5 participants