Skip to content

[9.3] (backport #15924) [ci] Prevent Agent version leaking when triggering serverless Beats tests - #15974

Merged
swiatekm merged 3 commits into
9.3from
mergify/bp/9.3/pr-15924
Aug 10, 2026
Merged

swiatekm merged 3 commits into
9.3from
mergify/bp/9.3/pr-15924

Conversation

@mergify

@mergify mergify Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

On a version bump PRs like #15426, version/version.go is changed to the next patch (p) while Beats main is still the previous patch ( p - 1 ).

Based on the Elastic Agent version, BEAT_VERSION sets to p. That leaks into the Beats mage package call, producing filebeat-p-SNAPSHOT, but the runner still expects (p -1)-SNAPSHOT from the Beats checkout.


This is an automatic backport of pull request #15924 done by Mergify.

@mergify mergify Bot added the backport label Aug 3, 2026
@mergify
mergify Bot requested review from a team as code owners August 3, 2026 19:25
@mergify
mergify Bot requested review from blakerouse and lorienhu and removed request for a team August 3, 2026 19:25
@mergify mergify Bot assigned ebeahan Aug 3, 2026
@mergify mergify Bot added the backport label Aug 3, 2026
@github-actions

This comment has been minimized.

@mergify

mergify Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

This pull request has not been merged yet. Could you please review and merge it @ebeahan? 🙏

…ble local package metadata

The script was always cloning beats main, so the beats build version
would diverge from what the integration runner expects on maintenance
branches (9.3, 9.4, 9.5) where beats main has moved ahead.

Use the Buildkite-provided branch name directly: the PR base branch
when running in PR context, otherwise the current branch. Branch names
are kept in sync between elastic-agent and beats.

Also disable reading from .package-version in these tests to prevent
local metadata from leaking into the Beats build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

⏳ Build in-progress, with failures

Failed CI Steps

History

cc @ebeahan

@swiatekm
swiatekm enabled auto-merge (squash) August 10, 2026 11:54
@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

check-ci failed because the repo ended the step with the beats submodule at a different commit than the superproject expects, so the no-changes guard tripped. Immediate action: re-run the build; if it repeats, force-reset the submodule to the recorded commit before check-no-changes.

Remediation

  • Re-run Buildkite build 44563 first (this failure pattern is consistent with a checkout/submodule state drift, not a code regression in this PR diff).
  • If it reproduces, add a submodule resync immediately before check-no-changes in CI bootstrap (for example git submodule update --init --no-fetch -- beats) so git diff-index runs against a clean tree.
Investigation details

Root Cause

The failing step is check-ci, which ends in the check-no-changes guard (Makefile check-ci target invokes check-no-changes at Makefile:51; check-no-changes runs git diff-index --exit-code HEAD -- at Makefile:79).

The log shows only one modified path: the submodule pointer beats changed from e1ba350... to 549d56c..., which causes the guard to fail even though this PR’s changed files are only:

  • .buildkite/pipeline.yml
  • .buildkite/scripts/steps/beats_tests.sh

So this specific failure is not from a direct code/test assertion failure in this PR diff; it is a submodule state mismatch at runtime.

Evidence

diff --git a/beats b/beats
index e1ba350684..549d56c085 160000
--- a/beats
+++ b/beats
@@ -1 +1 @@
-Subproject commit e1ba35068448c79653ae3fd527d5c18fff96b63f
+Subproject commit 549d56c0857dcd67d28b8c0590b813a63daf224e
Error: some files are not up-to-date ... Modified: [beats]

Verification

  • Not run locally (Buildkite checkout/submodule state is CI-environment specific).

Follow-up

No matching open flaky-test issue was found for this failure signature (repo:elastic/elastic-agent label:flaky-test with check-ci/beats submodule terms).


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@swiatekm
swiatekm merged commit cfdaf73 into 9.3 Aug 10, 2026
16 checks passed
@swiatekm
swiatekm deleted the mergify/bp/9.3/pr-15924 branch August 10, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants