Skip to content

[9.6](backport #51831) ci(ff): support feature freeze automation - #54884

Merged
fr4nc1sc0-r4m0n merged 2 commits into
9.6from
mergify/bp/9.6/pr-51831
Nov 25, 2026
Merged

fr4nc1sc0-r4m0n merged 2 commits into
9.6from
mergify/bp/9.6/pr-51831

Conversation

@mergify

@mergify mergify Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Update (git CLI push + smoke staging)

Same staging as elastic-agent (#17397, #17393):

  • Release Push uses the git CLI (not go-git) with Basic x-access-token auth and a push timeout, so Buildkite --reference clones can pack and upload.
  • SSH remotes are rewritten to HTTPS before push.
  • Version-bump stays on ingest-dev triggers — this PR does not run mage release:* from the product version-bump pipeline yet.
  • Pre-merge validation: ingest-release-smoke builds #16 (elastic-agent), #19 (beats), #18 (fleet-server).

Update (align with ingest-dev#10200)

Patch runPatch now matches the ingest-dev contract:

  • CURRENT_RELEASE is the version to land (NEW_VERSION from version-bump)
  • Opens one bump PR (update-version-*: version + test-env); no docs PR
  • Release branch must already be at the previous patch on the same line
  • Feature freeze still does not open next-patch bumps (3 PRs: A/B/C only)

Older sections below that describe PR-D on FF or patch docs / bump-to-NEXT are outdated.

Summary

  • Mage-based Beats release automation under dev-tools/mage/release/, migrated from ingest-dev beats.mak.
  • mage release:runMajorMinor runs the full feature-freeze flow: push the release branch and open 4 merge-ordered PRs, matching former makefile / elasticmachine outputs.
  • mage release:runPatch covers prepare-patch-release + prepare-next-release as 2 merge-ordered PRs on the release branch: docs only before build; next-patch version + test-env after release (aligned with former bot PRs such as #50567/#50568/#50569).
  • Both workflows finish with a best-effort mage release:ensureIssueTracker step: create or update a Beats issue titled [RELEASE <CURRENT_RELEASE>] Instructions & Checklist, linking ingest-dev#8866, and idempotently listing related Beats PRs with label release for that version. Tracker failures are logged as warnings and do not fail runMajorMinor / runPatch; standalone mage release:ensureIssueTracker still returns errors.
  • CURRENT_RELEASE must already match libbeat/version/version.go on:
    • BASE_BRANCH for runMajorMinor (before cutting the release branch)
    • the release branch for runPatch
      Both workflows fail fast on mismatch (avoids off-by-one double bumps).
  • All release PR titles/bodies use a [Release <CURRENT_RELEASE>] header and explicit merge timing.
  • Each release PR is labeled with merge timing (merge:1-ff-day … merge:4-after-release for FF; merge:1-before-build / merge:4-after-release for patch); missing merge:* labels are created automatically.
  • Idempotent re-runs (reuse branches, skip empty commits, reuse open PRs / issue tracker updates).

Feature freeze — runMajorMinor (4 grouped PRs)

Example: CURRENT_RELEASE=9.4.0 must already be in version.go on BASE_BRANCH → branch 9.4, next minor 9.5.0, next patch 9.4.1.

Step Target Branch Merge label Former makefile outputs What changes
0 — 9.4 — 1 branch push Direct push from BASE_BRANCH
PR-A main ff-prep-main-9.4.0 merge:1-ff-day #49991 + #49994 .mergify.yml, libbeat/version/version.go → 9.5.0
PR-B 9.4 ff-release-9.4.0 merge:2-after-branch #49990 update-docs (README + asciidoc + metricbeat/filebeat/auditbeat k8s) → test-env → make update (modules.d + heartbeat when needed)
PR-C main ff-prep-main-docs-env-9.5.0 merge:3-after-images #49995 + #49996 docs with BASE=RELEASE=main (3 k8s + asciidoc; no README rewrite) + test-env; no make update
PR-D 9.4 ff-prep-next-patch-9.4.1 merge:4-after-release #49992 + #49993 version.go → 9.4.1 + make update (usually no-op) + test-env; no UpdateStackVersion

Example titles: [Release 9.4.0] Prepare main for 9.5.0 and mergify backport-9.4, [Release 9.4.0] Update docs and test environment for 9.5.0, [Release 9.4.0] Update version to 9.4.1 and test environments.

RM merge order: push branch → PR-A on main → PR-B on release branch → PR-C on main → PR-D on release branch (after release day).

Final step (best-effort): ensure/update the Beats release checklist issue for CURRENT_RELEASE (warnings only on failure).

Note: #48158 (“Update docs for the 9.4.0 release” on main) is the previous cycle’s next-dev docs PR (when next minor was 9.4.0), not an extra PR of the 9.4.0 FF itself. The matching PR-C for this cycle is #49995+#49996.

Parity notes (latest)

Topic Decision
Heartbeat k8s Not in FF update-docs; comes from make update on PR-B only (matches elasticmachine). Patch docs PR does include heartbeat (matches former docs PRs).
PR-C README RELEASE=main → /main/ → /main/ no-op (matches prepare-next-dev-minor)
PR-D stack-version Not bumped (matches prepare-next-release / #51810)
Stale PR re-make update Out of scope — lifecycle remediation when base drifts, not initial automation

Patch release — runPatch (2 grouped PRs)

Example: releasing 9.4.1 → CURRENT_RELEASE=9.4.1 on branch 9.4 where version.go is already 9.4.1 (from the previous cycle's prepare-next-release). Next patch is 9.4.2.

Step Target Branch Merge label Former outputs What changes
PR-A 9.4 patch-release-9.4.1 merge:1-before-build #50567 / #49435 docs + K8s (incl. heartbeat) → CURRENT only; no version.go / test-env bump
PR-B 9.4 ff-prep-next-patch-9.4.2 merge:4-after-release #50568+#50569 / #49438+#49439 version.go → NEXT + test-env tags → CURRENT

RM merge order: merge PR-A before the final release build → merge PR-B after release day.

Titles look like [Release 9.4.1] Update docs versions 9.4.1 and [Release 9.4.1] Update version to 9.4.2 and test environments.

Labels on PR-A: docs, in progress, release, Team:Automation, skip-changelog, merge:1-before-build. PR-B: release, Team:Automation, skip-changelog, merge:4-after-release.

Final step (best-effort): ensure/update the Beats release checklist issue for CURRENT_RELEASE (warnings only on failure).

Release notes remain on .github/workflows/release-notes.yml (not mage).

Other workflows

Mage target Role
mage release:ensureIssueTracker Create/update [RELEASE X.Y.Z] Instructions & Checklist in Beats; discover same-version label:release PRs; link ingest-dev#8866. Non-blocking when run from runMajorMinor/runPatch; standalone still errors on failure
mage release:updateVersion / updateDocs / updateTestEnv / updateMergify Building blocks

Checklist

  • 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 (use skip-changelog if applicable)

Disruptive User Impact

None for end users. Release/CI automation for maintainers.

How to test this PR locally

CURRENT_RELEASE must be plain major.minor.patch (e.g. 9.6.0). No prerelease suffixes.

Required: PROJECT_OWNER, DRY_RUN, CURRENT_RELEASE, and either mage release:runMajorMinor or mage release:runPatch.

Feature freeze (runMajorMinor)

export PROJECT_OWNER="your-user"
export GITHUB_TOKEN=$(gh auth token)
export DRY_RUN=true
export CURRENT_RELEASE="9.6.0"

# BASE_BRANCH version.go must already equal CURRENT_RELEASE
mage release:runMajorMinor

# Expect local branches:
#   9.6, ff-prep-main-9.6.0, ff-release-9.6.0,
#   ff-prep-main-docs-env-9.7.0, ff-prep-next-patch-9.6.1

Patch (runPatch)

export PROJECT_OWNER="your-user"
export GITHUB_TOKEN=$(gh auth token)
export DRY_RUN=true
export CURRENT_RELEASE="9.5.1"

# Release branch must exist locally and version.go must already equal CURRENT_RELEASE
git fetch origin 9.5:9.5

mage release:runPatch

# Expect local branches:
#   patch-release-9.5.1, ff-prep-next-patch-9.5.2
# PR-A: docs only; PR-B: version → 9.5.2 + test-env → 9.5.1

Issue tracker only (ensureIssueTracker)

export PROJECT_OWNER="elastic"
export PROJECT_REPO="beats"
export GITHUB_TOKEN=$(gh auth token)
export CURRENT_RELEASE="9.4.1"
mage release:ensureIssueTracker
go test ./dev-tools/mage/release/... -count=1

Discard workflow artifacts after review with git reset --hard HEAD / branch cleanup.

Related issues

Related issue: https://github.com/elastic/observability-robots/issues/3404

Ingest release smoke

Passed on observability-robots-ingest-release-smoke (harness observability-robots#5403):

Product Build SOURCE_SHA
elastic-agent #16 7d35ab454994
beats #19 668758abf036
fleet-server #18 d456d7ce26f2

Validations

Minor releases

runMajorMinor opens 3 PRs (PR-A/B/C). Next-patch bumps stay on mage release:runPatch (no FF PR-D).

Current (grouped) Former (elastic/beats) Role Status
fr4nc1sc0-r4m0n#77 #49991 + #49994 PR-A: backport rule + next minor version on main ✅ re-run 9.7.0
fr4nc1sc0-r4m0n#78 #49990 / #51808 PR-B: ff-release on release branch ✅
fr4nc1sc0-r4m0n#79 #49995 + #49996 PR-C: next-dev docs + test-env on main ✅

Patch releases

Aligned with ingest-dev#10200: one post-release update-version-* PR to land CURRENT_RELEASE (NEW_VERSION) while the release branch is still at the previous patch. Docs stay off this path.

Current (grouped) Former (elastic/beats) Role Status
fr4nc1sc0-r4m0n#80 #50813 + #50814 version + test-env bump to CURRENT_RELEASE ✅ re-run 9.4.9 → 9.4.10

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

(cherry picked from commit b159139)

# Conflicts:
#	go.sum
@mergify
mergify Bot requested a review from a team as a code owner November 23, 2026 16:24
@mergify mergify Bot added the backport label Nov 23, 2026
@mergify
mergify Bot requested a review from a team as a code owner November 23, 2026 16:24
@mergify mergify Bot added the conflicts There is a conflict in the backported pull request label Nov 23, 2026
@mergify
mergify Bot requested a review from a team as a code owner November 23, 2026 16:24
@mergify
mergify Bot requested review from orestisfl and removed request for a team November 23, 2026 16:24
@mergify

mergify Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of b159139 has failed:

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

You are currently cherry-picking commit b159139.
  (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:   .github/workflows/check-dev-tools.yml
	modified:   NOTICE.txt
	new file:   RELEASE.md
	new file:   dev-tools/mage/release/README.md
	new file:   dev-tools/mage/release/config.go
	new file:   dev-tools/mage/release/config_test.go
	new file:   dev-tools/mage/release/git.go
	new file:   dev-tools/mage/release/git_test.go
	new file:   dev-tools/mage/release/github.go
	new file:   dev-tools/mage/release/github_test.go
	new file:   dev-tools/mage/release/issue.go
	new file:   dev-tools/mage/release/issue_test.go
	new file:   dev-tools/mage/release/mergify.go
	new file:   dev-tools/mage/release/mergify_test.go
	new file:   dev-tools/mage/release/release.go
	new file:   dev-tools/mage/release/release_test.go
	new file:   dev-tools/mage/release/version.go
	new file:   dev-tools/mage/release/version_test.go
	new file:   dev-tools/mage/release/workflows.go
	new file:   dev-tools/mage/release/workflows_test.go
	new file:   dev-tools/mage/release_settings.go
	new file:   dev-tools/mage/release_settings_test.go
	modified:   dev-tools/mage/settings.go
	modified:   go.mod
	modified:   magefile.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   go.sum

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

@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 23, 2026
@botelastic

botelastic Bot commented Nov 23, 2026

Copy link
Copy Markdown

This pull request doesn't have a Team:<team> label.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@mergify mergify Bot mentioned this pull request Nov 23, 2026
3 of 6 tasks
@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod Bot added skip-ci Skip the build in the CI but linting skip-changelog labels Nov 23, 2026
@mergify

mergify Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is merged.

@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

All 34 failed Buildkite jobs share one root cause: unresolved merge-conflict markers were committed in go.sum (go.sum:500-514), so both make ... check update and pre-commit fail immediately. Resolve the go.sum conflict block, then re-run /test.

Remediation

  • Resolve go.sum conflict markers (<<<<<<<, =======, >>>>>>>) around line ~500 and keep the intended dependency entries for this backport.
  • Re-run validation: pre-commit run --all-files and make -C libbeat check update && make check-no-changes (or trigger /test for full Buildkite).
Investigation details

Root Cause

Classification: Configuration / dependency metadata conflict.

The backport commit explicitly reports a conflict in its message (# Conflicts: go.sum), and the committed go.sum patch contains unresolved conflict markers. This breaks Go module parsing and triggers pre-commit’s merge-conflict hook.

Evidence

  • Build: https://buildkite.com/elastic/beats/builds/56795
  • Representative failed steps:
    • Libbeat: Run check/update
    • Libbeat: Run pre-commit
  • Key log excerpts:
    • /tmp/gh-aw/buildkite-logs/beats-libbeat-libbeat-run-checkupdate.txt:121
      /buildkite/.../go.sum:500: wrong number of fields 2
    • /tmp/gh-aw/buildkite-logs/beats-libbeat-libbeat-run-pre-commit.txt:137
      go.sum:500: Merge conflict string '<<<<<<<' found
    • /tmp/gh-aw/buildkite-logs/beats-libbeat-libbeat-run-pre-commit.txt:139
      go.sum:503: Merge conflict string '=======' found
    • /tmp/gh-aw/buildkite-logs/beats-libbeat-libbeat-run-pre-commit.txt:141
      go.sum:514: Merge conflict string '>>>>>>>' found
  • Commit evidence:
    • 25b70df01a8d85b1baf4b42e7f5a3808820501ad message includes # Conflicts: go.sum
    • Commit patch for go.sum includes unresolved conflict markers in that same region.

Verification

  • I did not run repo tests locally; the failure is deterministic from logs and commit diff evidence.
  • Pattern confirmed across all listed failed jobs/logs (go.sum:500 parse/merge-conflict errors).

Follow-up

  • I attempted to check for an existing related flaky-test issue in repo metadata, but issue data visibility is integrity-filtered in this environment.

What is this? | From workflow: Observability Agentic Workflow — Status

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

Mergify left unresolved conflict markers in go.sum, which broke
pre-commit, check, lint, and unit tests on the 9.6 backport.

Assisted-By: Cursor
@fr4nc1sc0-r4m0n

Copy link
Copy Markdown
Contributor

/test

@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n enabled auto-merge (squash) November 25, 2026 18:27
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n merged commit fdabb55 into 9.6 Nov 25, 2026
319 of 326 checks passed
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n deleted the mergify/bp/9.6/pr-51831 branch November 25, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport conflicts There is a conflict in the backported pull request needs_team Indicates that the issue/PR needs a Team:* label skip-changelog skip-ci Skip the build in the CI but linting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants