You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[9.6](backport #7339) ci(ff): support feature freeze automation - #8329
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-*); no docs / ensure-version PR-A
Release branch must already be at the previous patch on the same line
Feature freeze still does not open next-patch bumps (PR-A/B only; no PR-D)
Older sections below that describe FF PR-D or patch bump-to-NEXT are outdated.
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?
Root-module package under dev-tools/mage/release/ (settings via dev-tools/mage); mage release:* calls package functions directly
Shared process shape with beats/elastic-agent: version guards, merge-timing labels, idempotent branches/PRs, release issue tracker
Feature freeze opens PR-A and PR-B (no docs/test-env PR; no next-patch PR-D)
Removes runNextRelease (next-patch bumps stay in mage release:runPatch)
DRY_RUN=true mode for safe local testing
Docs in RELEASE.md and dev-tools/mage/release/README.md
runMajorMinor opens PR-A on main (next minor + mergify backport). PR-B (ff-release) is skipped when the release branch already has the correct version (no commits). Next-patch bumps are not opened here; use mage release:runPatch.
PR-B: ff-release no-op when version already on release branch
✅
Patch releases
Former bot flow opened 1 PR per patch (version bump only). The aligned runPatch opens one update-version-* PR to land CURRENT_RELEASE (NEW_VERSION) while the release branch is still at the previous patch.
* ci(ff): support feature freeze automation phase 1
* ci(ff): support feature freeze automation phase 2
* update
* fix linting
* go mod tidy
* fix(ci): update magefile_test.go license header to Elastic License 2.0
* Make release automation idempotent on re-run
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.
* refactor(release): extract FF automation to dev-tools/mage/release
Move release workflow logic into a dedicated package aligned with
elastic-agent and beats, leaving thin mage release:* wrappers in
magefile.go.
* fix(ci): allow local go.mod replace for dev-tools module
Enable gomoddirectives replace-local so the dev-tools submodule
replace required by mage release imports passes golangci-lint.
* fix(docker): copy dev-tools go.mod before go mod download
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.
* Align fleet-server release automation with ingest-dev fleet-server.mak
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.
* ci(ff): align release automation with beats and elastic-agent
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.
* fix(release): fall back to git tags when GitHub Releases are empty
fleet-server publishes version tags but no GitHub Releases, so
runMajorMinor failed resolving LatestRelease for minor versions.
* ci: wire version-bump pipeline to mage release targets
* fix(release): harden FF automation from Copilot review
Correct team reviewer assignment, exact Mergify rule matching, and
remote-only branch checkout so release workflows work reliably in CI.
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(release): address open review findings for FF automation
Validate semver before rewriting version.go, drop the unused
EnsureLatestRelease hard gate, reuse remote prep branches in
EnsureBranchFrom, and align the nested module Go version.
* fix(api): regenerate OpenAPI Valid() for UNINSTALL
check-ci fails after merging main because ActionType.Valid() omitted
the UNINSTALL case introduced in #7895.
---------
Co-authored-by: Victor Martinez <VictorMartinezRubio@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit ef9e2cb)
# Conflicts:
# go.mod
# go.sum
On branch mergify/bp/9.6/pr-7339
Your branch is up to date with 'origin/9.6'.
You are currently cherry-picking commit ef9e2cb.
(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: .ci/bump-golang.yml
modified: .golangci.yml
modified: Dockerfile
modified: Dockerfile.build
modified: Dockerfile.fips
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/out.go
new file: dev-tools/mage/release/release.go
new file: dev-tools/mage/release/release_test.go
new file: dev-tools/mage/release/testconst_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
renamed: dev-tools/go.mod -> dev-tools/tools/go.mod
renamed: dev-tools/go.sum -> dev-tools/tools/go.sum
modified: magefile.go
modified: main.go
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: go.mod
both modified: go.sum
Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.
Queue this pull request once it meets the queue conditions
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved dependency conflicts and invalid go-github option literals block builds and tests, while the freeze workflow risks backporting the next-minor version bump into the release branch.
Summary: This PR introduces new Go dependencies for release automation, but overall risk is high because go.mod contains unresolved merge-conflict markers, so dependency resolution/builds are not reliable as-is.
github.com/go-git/go-git/v5: new → v5.19.3
Ecosystem: Go
Check
Result
Breaking changes
✅ None found in repo usage
Testable in PR
✅ Yes (PR-triggered CI exists in .github/workflows/golangci-lint.yml and .github/workflows/pre-commit.yml)
Changelog highlights (_new_ → v5.19.3)
Release notes include security-relevant changes (credential containment across redirects) and dependency security bumps (golang.org/x/crypto). No CVE IDs were explicitly listed in the release body, but changes appear risk-reducing.
Usage in this repository
Used in release tooling only:
dev-tools/mage/release/git.go:17-19
dev-tools/mage/release/git_test.go:18-21
APIs used: repository open/branch/reference operations and plumbing/config helpers.
Compatibility assessment
Usage is narrow and tool-only (not Fleet Server runtime). No consumed APIs in these files appear affected by documented changes.
github.com/google/go-github/v68: new → v68.0.0
Ecosystem: Go
Check
Result
Breaking changes
✅ None found in repo usage
Testable in PR
✅ Yes
Changelog highlights (_new_ → v68.0.0)
Upstream notes include breaking removals for Project (classic) support and Commit.Stats. Security-specific advisories/CVEs were not listed in this release body.
Usage in this repository
Used in release tooling only:
dev-tools/mage/release/github.go:13
dev-tools/mage/release/issue.go:15
dev-tools/mage/release/workflows.go:11
Observed usage is Pull Requests/Issues/Search client flows, not Project classic or Commit.Stats.
Compatibility assessment
The two documented v68 breaking changes do not overlap with current usage in this repo.
golang.org/x/net: v0.62.0 → v0.63.0 (and golang.org/x/oauth2: new → v0.37.0)
Ecosystem: Go
Check
Result
Breaking changes
⚠️ Found (dependency graph file is in conflicted state)
No GitHub Releases were available for exact tags in golang/net or golang/oauth2 (MCP get_release_by_tag retried with and without v, then list_releases returned empty), so detailed upstream release-note bodies were unavailable.
Usage in this repository
golang.org/x/net appears directly only in tests: internal/pkg/limit/listener_test.go:14 (nettest).
golang.org/x/oauth2 is used in release tooling auth client setup: dev-tools/mage/release/github.go:14.
Compatibility assessment
go.mod currently contains unresolved conflict markers at go.mod:44-49 around x/net and x/oauth2, preventing a trustworthy module state.
⚠️ Found (downgrade appears inside unresolved conflict block)
Testable in PR
⚠️ Unreliable until conflict markers are resolved
Changelog highlights (v4.26.10 → v4.26.9)
This is a downgrade. v4.26.10 includes additional host/process fixes and an opt-in Windows disk timing transition notice; downgrading can drop those fixes. No explicit CVE IDs were listed.
Usage in this repository
No direct imports found in Fleet Server Go code; this is an indirect dependency.
Compatibility assessment
The version change is inside unresolved conflict markers (go.mod:98-104), so effective dependency selection is ambiguous.
Labels Applied
No labels applied. oblt-aw/ai/merge-ready was not applied because overall risk is high due unresolved go.mod merge-conflict markers affecting dependency integrity.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Critical workflow defects can backport the next-minor version bump into the frozen branch, block new-major feature freezes, and leave prepared commits unpublished when reusing an existing PR.
git reset --hard HEAD does not discard these dry-run changes: both workflows call commitAll before checking cfg.DryRun, so the edits are already committed on local workflow branches. Document returning to the original branch and removing only branches created during the dry run; resetting to the current HEAD leaves the prepared commits and branches intact.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Critical workflow defects backport the next-minor version bump onto the frozen release branch and prevent feature freeze for the first release of a new major.
Buildkite failed in Run check-ci because the branch is missing an auto-fix update to dev-tools/mage/release/github.go; CI generated a diff and then failed on git update-index --refresh. Apply the generated change (or run repo fix checks) and rerun CI.
Remediation
Run mage check:fix (and mage check:imports if needed), commit the resulting change in dev-tools/mage/release/github.go, and push.
Re-run Buildkite build 18377 (or rerun check_ci.sh) to confirm the tree is clean after checks.
Investigation details
Root Cause
This is a configuration/CI hygiene failure (not an infra outage or test flake): the CI check step auto-updated formatting/struct literal initialization in dev-tools/mage/release/github.go, then failed because the working tree was no longer clean.
Diff in logs shows expected rewrite from embedded ListOptions: github.ListOptions{PerPage: ...} to direct PerPage: ... in multiple go-github option structs.
Verification
Local test execution: not run (workflow is read-only; no branch updates can be pushed from this run).
Reviewed Buildkite log and PR metadata for #8329; failure is isolated to check-ci cleanliness gate.
Follow-up
I could not confirm flaky-test issue linkage because issue search/list responses were integrity-filtered in this environment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Invalid PerPage initializers in PullRequestListOptions and SearchOptions cause compile errors, blocking the release package and all Mage targets that import it.
Summary: This PR adds Go dependencies to release automation tooling (dev-tools/mage/release + dev-tools/tools) with low-to-moderate overall risk; no breaking impact was found in current repository usage.
✅ Yes (covered by dev-tools/mage/release/*_test.go unit tests)
Changelog highlights (not present → new pinned versions)
go-git v5.19.3: includes transport/credential handling hardening and security-related dependency refreshes (release notes indicate security-oriented updates), which is risk-reducing for git remote operations.
go-github v68.0.0: release notes include breaking removals for Project (classic) and Commit.Stats.
oauth2 v0.37.0: upstream GitHub release notes were unavailable (repo has no matching GitHub release entry for this tag via MCP); local diff confirms this is a new dependency addition, not a version bump.
Usage in this repository
go-git: dev-tools/mage/release/git.go:17-19, tests in dev-tools/mage/release/git_test.go:18-21.
go-github: dev-tools/mage/release/github.go:13, issue.go:15, workflows.go:11, tests in github_test.go and issue_test.go.
oauth2: dev-tools/mage/release/github.go:14, used for token client setup in github.go:42-45.
Scope is release automation/dev tooling paths; no imports found in runtime server packages under internal/pkg.
Compatibility assessment
go-github v68 breaking changes do not affect current usage: this code uses PR/search/issues/actions/repositories APIs, not Project (classic) or Commit.Stats.
go-git is newly used for repo/ref operations in release tooling and is paired with existing git CLI fallbacks in the same file.
oauth2 usage is limited to StaticTokenSource + NewClient for authenticated GitHub API calls.
Additional module additions in dev-tools/tools/go.mod are toolchain/dev-only dependencies (not production runtime).
Automerge skipped this pull request because the all-files collection is not enabled for this repository.
To allow automerge for this kind of update, enable the matching collection under Automerge on the Control Plane Dashboard (the oblt-aw/dashboard issue). See Automerge dependency collections for what each collection covers.
See Opt in or opt out for how to enable or disable Automerge collections on the Control Plane Dashboard.
Collections currently enabled for automerge: github-actions, pre-commit, updatecli, vm-images
Summary: This PR introduces new Go dependencies for release automation (go-git, go-github, x/oauth2) plus transitive modules; overall risk is low-to-moderate and no breaking impact was found in this repository’s usage.
github.com/go-git/go-git/v5 (new → v5.19.3)
Ecosystem: Go
Check
Result
Breaking changes
✅ None found for repo usage
Testable in PR
✅ Yes — go test ./dev-tools/mage/release/... passes
Changelog highlights (new → v5.19.3)
Release notes include security-relevant hardening and dependency updates (for example credential containment across redirects, x/crypto security bumps), plus Go 1.27 workflow/build adjustments. No CVE ID was explicitly called out in the release body.
Usage in this repository
Used only in release tooling: dev-tools/mage/release/git.go and tests (dev-tools/mage/release/git_test.go). Usage is repository open/read and branch/tag plumbing (Repository, config, plumbing, object) for release workflow automation.
Compatibility assessment
No repo code depends on deprecated/removed go-git APIs in this update path. Added transitive modules are expected from go-git/go-billy graph expansion and remain scoped to release tooling.
github.com/google/go-github/v68 (new → v68.0.0)
Ecosystem: Go
Check
Result
Breaking changes
✅ None found for repo usage
Testable in PR
✅ Yes — go test ./dev-tools/mage/release/... passes
Changelog highlights (new → v68.0.0)
Upstream notes list breaking changes around Project (classic) removal and Commit.Stats field removal, plus API additions/fixes. No CVE/GHSA entry was explicitly called out in the release body.
Usage in this repository
Used in release tooling only: dev-tools/mage/release/github.go, issue.go, workflows.go and related tests. Current calls target PR/issues/workflows/reviewers/search flows, not Project classic APIs or Commit.Stats.
Compatibility assessment
Observed usage avoids the upstream breaking surfaces; therefore compatibility risk is low for this repository.
golang.org/x/oauth2 (new → v0.37.0)
Ecosystem: Go
Check
Result
Breaking changes
✅ None found for repo usage
Testable in PR
✅ Yes — go test ./dev-tools/mage/release/... passes
Changelog highlights (new → v0.37.0)
GitHub Releases does not publish a release body for this tag (v0.37.0); tag existence was confirmed, but detailed upstream release notes were unavailable from MCP release endpoints.
Usage in this repository
Used only in dev-tools/mage/release/github.go for static token client creation (oauth2.StaticTokenSource, oauth2.NewClient).
Compatibility assessment
Usage is narrow and standard (token transport wiring). No behavior changes affecting this call pattern were observed in-repo.
Labels Applied
oblt-aw/ai/merge-ready — applied (overall risk within policy ceiling and no breaking changes affecting current repo usage).
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update (root-module release package)
Release automation now lives in the root module (
github.com/elastic/fleet-server/v7), same shape as elastic-agent:dev-tools/mage/release/; mage targets call it directly (no nestedcmd/fleet-releaseCLI)go-git/go-github/oauth2are rootgo.modrequires;NOTICE.txtandNOTICE-fips.txtare regenerated with those depsdev-tools/mage.LoadReleaseSettingsOlder text below that described a nested module to keep those deps out of the root module is outdated.
Update (git CLI push + smoke staging)
Same staging as elastic-agent (#17397, #17393):
Pushuses the git CLI (not go-git) with Basicx-access-tokenauth and a push timeout, so Buildkite--referenceclones can pack and upload.mage release:*from the product version-bump pipeline yet.Update (align with ingest-dev#10200)
Patch
runPatchnow matches the ingest-dev contract:CURRENT_RELEASEis the version to land (NEW_VERSIONfrom version-bump)update-version-*); no docs / ensure-version PR-AOlder sections below that describe FF PR-D or patch bump-to-NEXT are outdated.
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/(settings viadev-tools/mage);mage release:*calls package functions directlyrunNextRelease(next-patch bumps stay inmage release:runPatch)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-B (release branch: ensure CURRENT)prepare-patch-release+create-prs-patch-releasemage release:runPatchupdate-version-*bump PR to landCURRENT_RELEASEFeature freeze (
CURRENT_RELEASEalready onmain)X.Yfrommainff-prep-main-{CURRENT}→mainmerge:1-ff-dayff-release-{CURRENT}→X.Yversion.go= CURRENT (often no-op)merge:2-after-branchNext-patch bumps are not opened here; use
mage release:runPatch.Patch (
CURRENT_RELEASEalready on release branch)update-version-{CURRENT}→X.Yversion.goto CURRENTmerge: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 toolIngest release smoke
Passed on observability-robots-ingest-release-smoke (harness observability-robots#5403):
SOURCE_SHA7d35ab454994668758abf036d456d7ce26f2Validations
Minor releases
runMajorMinoropens PR-A onmain(next minor + mergify backport). PR-B (ff-release) is skipped when the release branch already has the correct version (no commits). Next-patch bumps are not opened here; usemage release:runPatch.main+ backport rule9.7)Patch releases
Former bot flow opened 1 PR per patch (version bump only). The aligned
runPatchopens oneupdate-version-*PR to landCURRENT_RELEASE(NEW_VERSION) while the release branch is still at the previous patch.This is an automatic backport of pull request #7339 done by [Mergify](https://mergify.com).