ci(ff): support feature freeze automation#7339
Conversation
Resolve go.mod/go.sum conflicts by keeping main dependency versions and retaining go-git/go-github deps required for release automation.
|
| Status | Scan Engine | Total (0) | ||||
|---|---|---|---|---|---|---|
| Open Source Security | 0 | 0 | 0 | 0 | See details | |
| Licenses | 0 | 0 | 0 | 0 | See details |
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.
|
This pull request does not have a backport label. Could you fix it @fr4nc1sc0-r4m0n? 🙏
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Allow release workflows to be safely retriggered by no-oping when the target version is already applied, reusing existing branches and open PRs, and skipping empty commits.
Move release workflow logic into a dedicated package aligned with elastic-agent and beats, leaving thin mage release:* wrappers in magefile.go.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Enable gomoddirectives replace-local so the dev-tools submodule replace required by mage release imports passes golangci-lint.
The root go.mod replaces dev-tools with a local path. Docker layer caching must include dev-tools/go.mod and go.sum so go mod download can resolve the replaced module.
|
This pull request is now in conflicts. Could you fix it @fr4nc1sc0-r4m0n? 🙏 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reorganize dev-tools/mage/release into config, workflows, mergify, git, and github packages matching beats and elastic-agent. Workflows now produce the same branches, PRs, labels, and file updates as the former Makefile-based release process.
This comment has been minimized.
This comment has been minimized.
|
This pull request is now in conflicts. Could you fix it @fr4nc1sc0-r4m0n? 🙏 |
Adopt the shared nested-module release tooling, merge-timing labels, version guards, and issue tracker. Feature freeze opens PR-A/B/D (omit PR-C; no docs/test-env), remove runNextRelease, and keep fleet-server file updates limited to version.go and mergify.
This comment has been minimized.
This comment has been minimized.
# Conflicts: # NOTICE-fips.txt # NOTICE.txt
TL;DR
Remediation
Investigation detailsRoot CauseThe PR changes both generated NOTICE files by replacing portable Evidence
Verification
Follow-upNo matching What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
fleet-server publishes version tags but no GitHub Releases, so runMajorMinor failed resolving LatestRelease for minor versions.
Test MinorClick here to expandDRY_RUN=false CURRENT_RELEASE="9.6.0" mage release:runMajorMinor
=== Starting Major/Minor Release Workflow ===
Resolved LatestRelease from elastic/fleet-server: 9.4.4
Checked out branch: main
Verified CURRENT_RELEASE=9.6.0 matches 9.6.0 on branch main
Creating release branch: 9.6
Already on branch: main
Created branch: 9.6
Checked out branch: 9.6
--- Preparing PR-A: backport rule + version 9.7.0 on main ---
Checked out branch: main
Created branch: ff-prep-main-9.6.0
Checked out branch: ff-prep-main-9.6.0
Added backport rule for 9.6 to .mergify.yml
Updated version to 9.7.0 in version/version.go
Created commit: c0b0a7f275a902c7fc6961504e0468b054d187ba
--- Preparing PR-B: ff-release 9.6.0 on 9.6 ---
Checked out branch: 9.6
Created branch: ff-release-9.6.0
Checked out branch: ff-release-9.6.0
Version already set to 9.6.0 in version/version.go
No changes to commit
--- Preparing PR-D: next patch 9.6.1 on 9.6 ---
Checked out branch: 9.6
Created branch: ff-prep-next-patch-9.6.1
Checked out branch: ff-prep-next-patch-9.6.1
Updated version to 9.6.1 in version/version.go
Created commit: 5ba76c11eeff9dc1c0cf34b6f44925158a5ac19a
Checked out branch: 9.6
Pushed branch 9.6 to remote: origin
Checked out branch: ff-prep-main-9.6.0
Pushed branch ff-prep-main-9.6.0 to remote: origin
Created label "merge:1-ff-day"
Added labels to #2: [release impact:critical backport-9.6 skip-changelog Team:Automation merge:1-ff-day]
Created PR #2: https://github.com/fr4nc1sc0-r4m0n/fleet-server/pull/2
Checked out branch: ff-release-9.6.0
No new commits on ff-release-9.6.0 compared to 9.6; skipping push and PR creation
Checked out branch: ff-prep-next-patch-9.6.1
Pushed branch ff-prep-next-patch-9.6.1 to remote: origin
Created label "merge:4-after-release"
Added labels to #3: [release Team:Automation skip-changelog merge:4-after-release]
Created PR #3: https://github.com/fr4nc1sc0-r4m0n/fleet-server/pull/3
=== Major/Minor Release Workflow Complete ===
Release branch created: 9.6
PR 1: https://github.com/fr4nc1sc0-r4m0n/fleet-server/pull/2 (open)
PR 2: skipped (no related open/merged PR for ff-release-9.6.0 → 9.6)
PR 3: https://github.com/fr4nc1sc0-r4m0n/fleet-server/pull/3 (open)
Note: PR-C (main docs) is omitted for fleet-server (no docs/test-env updates)PR ComparisonFormer bot flow opened 3 PRs per minor FF (version bump + backport rule + next patch). The new
|
Test PatchClick here to expand$ DRY_RUN=false CURRENT_RELEASE="9.4.5" mage release:runPatch
=== Starting Patch Release Workflow ===
Checked out branch: 9.4
Verified CURRENT_RELEASE=9.4.5 matches 9.4.5 on branch 9.4
--- Preparing PR-A: ensure version 9.4.5 on 9.4 ---
Already on branch: 9.4
Checked out branch: patch-release-9.4.5
Version already set to 9.4.5 in version/version.go
No changes to commit
--- Preparing PR-D: next patch 9.4.6 on 9.4 ---
Checked out branch: 9.4
Checked out branch: ff-prep-next-patch-9.4.6
Version already set to 9.4.6 in version/version.go
No changes to commit
Checked out branch: patch-release-9.4.5
No new commits on patch-release-9.4.5 compared to 9.4; skipping push and PR creation
Checked out branch: ff-prep-next-patch-9.4.6
Pushed branch ff-prep-next-patch-9.4.6 to remote: origin
Added labels to #4: [release Team:Automation skip-changelog merge:4-after-release]
Created PR #4: https://github.com/fr4nc1sc0-r4m0n/fleet-server/pull/4
=== Patch Release Workflow Complete ===
PR 1: skipped (no related open/merged PR for patch-release-9.4.5 → 9.4)
PR 2: https://github.com/fr4nc1sc0-r4m0n/fleet-server/pull/4 (open)PR ComparisonFormer bot flow opened 1 PR per patch (next-patch version bump only; fleet-server has no docs/manifests patch PR). The new
|
What is the problem this PR solves?
Fleet Server release automation still relies on Makefile-based scripts and external CLI tools. This PR migrates the feature-freeze and patch release workflows to pure Go Mage targets so release steps can run without depending on hub, gh, sed, yq, or Python.
This continues the work from #6584 and aligns the process with beats (#51831) and elastic-agent (#15433).
How does this PR solve the problem?
dev-tools/mage/release/withcmd/fleet-releaseCLI sogo-git/go-githubstay out of the rootgo.mod/NOTICE.txtmage release:*wrappers invoke the nested CLIrunNextRelease(next-patch prep is PR-D / patch PR-B)DRY_RUN=truemode for safe local testingRELEASE.mdanddev-tools/mage/release/README.mdWorkflow alignment
fleet-server.mak)prepare-major-minor-release+create-branch-major-minor-release(+ next-release steps)mage release:runMajorMinorX.Y; PR-A (main: mergify + next minor); PR-D (release branch: next patch)prepare-patch-release+create-prs-patch-releasemage release:runPatchFeature freeze (
CURRENT_RELEASEalready onmain)X.Yfrommainff-prep-main-{CURRENT}→mainmerge:1-ff-dayff-prep-next-patch-{NEXT}→X.Ymerge:4-after-releasePatch (
CURRENT_RELEASEalready on release branch)ff-prep-next-patch-{NEXT}→X.Ymerge:4-after-releaseFiles updated
version/version.go—DefaultVersion.mergify.yml— backport rule (PR-A)Idempotency
UpdateVersionUpdateMergifyCommitAllCreatePRHow to test this PR locally
Discard local workflow changes after review with
git reset --hard HEAD.Checklist
./changelog/fragmentsusing the changelog toolRelated issue: https://github.com/elastic/observability-robots/issues/3404