Skip to content

[9.4](backport #7339) ci(ff): support feature freeze automation - #8331

Open
mergify[bot] wants to merge 4 commits into
9.4from
mergify/bp/9.4/pr-7339
Open

mergify[bot] wants to merge 4 commits into
9.4from
mergify/bp/9.4/pr-7339

Conversation

@mergify

@mergify mergify Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Update (root-module release package)

Release automation now lives in the root module (github.com/elastic/fleet-server/v7), same shape as elastic-agent:

  • Package at dev-tools/mage/release/; mage targets call it directly (no nested cmd/fleet-release CLI)
  • go-git / go-github / oauth2 are root go.mod requires; NOTICE.txt and NOTICE-fips.txt are regenerated with those deps
  • Settings load via dev-tools/mage.LoadReleaseSettings

Older 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):

  • 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-*); 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

Workflow alignment

Former (ingest-dev fleet-server.mak) Mage command PRs produced
prepare-major-minor-release + create-branch-major-minor-release (+ next-release steps) mage release:runMajorMinor Push release branch X.Y; PR-A (main: mergify + next minor); PR-B (release branch: ensure CURRENT)
prepare-patch-release + create-prs-patch-release mage release:runPatch one update-version-* bump PR to land CURRENT_RELEASE

Feature freeze (CURRENT_RELEASE already on main)

Slot Branch → base Changes Merge label
Release branch X.Y from main pushed —
PR-A ff-prep-main-{CURRENT} → main Mergify backport + bump to next minor merge:1-ff-day
PR-B ff-release-{CURRENT} → X.Y ensure version.go = CURRENT (often no-op) merge:2-after-branch

Next-patch bumps are not opened here; use mage release:runPatch.

Patch (CURRENT_RELEASE already on release branch)

Slot Branch → base Changes Merge label
bump update-version-{CURRENT} → X.Y bump version.go to CURRENT merge:4-after-release

Files updated

  • version/version.go — DefaultVersion
  • .mergify.yml — backport rule (PR-A)

Idempotency

Step Behavior on re-run
UpdateVersion No-op when version already matches
UpdateMergify No-op when backport rule already exists
Branch creation Reuses existing branch
CommitAll Skips when worktree is clean
CreatePR Returns existing open PR for same head/base

How to test this PR locally

export PROJECT_OWNER="your-user"
export CURRENT_RELEASE="$(grep DefaultVersion version/version.go | sed -E 's/.*"([^"]+)".*/\1/')"
export GITHUB_TOKEN=$(gh auth token)
export DRY_RUN=true

mage release:runMajorMinor
mage release:runPatch

go test ./dev-tools/mage/release/... ./dev-tools/mage/ -count=1

Discard local workflow changes after review with git reset --hard HEAD.

Checklist

  • I have made corresponding changes to the documentation
  • 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

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 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.

Current (grouped) Former (elastic/fleet-server) Role Status
fr4nc1sc0-r4m0n#21 #7333 + #7334 PR-A: next minor on main + backport rule ✅ re-run 9.7.0
— (skipped; no commits vs 9.7) — 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.

Current (grouped) Former (elastic/fleet-server) Role Status
fr4nc1sc0-r4m0n#22 #7415 bump to CURRENT_RELEASE on release branch ✅ re-run 9.4.9 → 9.4.10

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

* 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:
#	Dockerfile.fips
#	go.mod
#	go.sum
#	magefile.go
@mergify
mergify Bot requested a review from a team as a code owner November 23, 2026 13:37
@mergify mergify Bot added backport conflicts There is a conflict in the backported pull request labels Nov 23, 2026
@mergify
mergify Bot requested review from lorienhu and a balanced review from Copilot and removed request for a team November 23, 2026 13:37
@mergify

mergify Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of ef9e2cb has failed:

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

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
	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:   main.go

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

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

@mergify

mergify Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved merge conflicts and invalid GitHub option literals block Go module loading, Mage compilation, and FIPS image builds.

8 open issues
What changed in this PR

Backports Mage-based release automation to 9.4, moving feature-freeze and patch workflows into Fleet Server’s root module while leaving production version-bump triggers unchanged.

Changes:

  • Adds release workflows, version guards, Git/GitHub helpers, and release checklist tracking.
  • Adds operator documentation and tests for release settings and helpers.
  • Relocates the tools module and updates generation, build, and CI references.
File Description
RELEASE.md Documents release workflows and configuration.
main.go Updates generator tools-module paths.
magefile.go Adds release targets and updates tool invocations.
go.sum Adds release dependency checksums.
go.mod Adds root-module release dependencies.
Dockerfile.fips Adds tools-module copies and FIPS environment settings.
Dockerfile.build Copies relocated tools-module manifests.
Dockerfile Copies relocated tools-module manifests.
dev-tools/​tools/​go.sum Supplies relocated tool checksums.
dev-tools/​tools/​go.mod Defines the relocated tools module.
dev-tools/​mage/​release/​workflows.go Orchestrates feature-freeze and patch releases.
dev-tools/​mage/​release/​workflows_test.go Tests workflow guards, labels, and PR bodies.
dev-tools/​mage/​release/​version.go Selects previous releases and validates branch versions.
dev-tools/​mage/​release/​version_test.go Tests release selection and version validation.
dev-tools/​mage/​release/​testconst_test.go Shares test fixtures and constants.
dev-tools/​mage/​release/​release.go Reads and updates the Fleet Server version.
dev-tools/​mage/​release/​release_test.go Tests version and Mergify updates.
dev-tools/​mage/​release/​README.md Documents targets and release smoke validation.
dev-tools/​mage/​release/​out.go Provides workflow output helpers.
dev-tools/​mage/​release/​mergify.go Adds release-branch backport rules.
dev-tools/​mage/​release/​issue.go Creates and updates release checklist issues.
dev-tools/​mage/​release/​issue_test.go Tests checklist generation and merging.
dev-tools/​mage/​release/​github.go Implements GitHub PR, label, issue, and release operations.
dev-tools/​mage/​release/​github_test.go Tests GitHub interactions with mock responses.
dev-tools/​mage/​release/​git.go Implements branch, commit, and authenticated push helpers.
dev-tools/​mage/​release/​git_test.go Tests repository operations and remote handling.
dev-tools/​mage/​release/​config.go Validates configuration and resolves previous releases.
dev-tools/​mage/​release/​config_test.go Tests configuration validation and release lookup.
dev-tools/​mage/​release_settings.go Loads environment settings and derives release versions.
dev-tools/​mage/​release_settings_test.go Tests settings loading and version inference.
.golangci.yml Allows local module replacements.
.ci/​bump-golang.yml Updates the tools-module Go-version target.

Review effort: Balanced

Comment thread Dockerfile.fips Resolved
Comment thread dev-tools/mage/release/github.go Resolved
Comment thread dev-tools/mage/release/workflows.go Resolved
Comment thread go.mod Resolved
Comment thread magefile.go Resolved
Comment thread dev-tools/mage/release/issue.go Resolved
Comment thread dev-tools/mage/release/workflows.go Resolved
Comment thread dev-tools/mage/release/workflows.go Resolved
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: This PR introduces multiple Go dependency changes for new release automation code, but overall risk is high because merge-conflict markers remain in tracked files (including go.mod), and module parsing already fails.

Go modules: github.com/go-git/go-git/v5 none → v5.19.3 (plus transitive go-git stack)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in repository usage
Testable in PR ✅ Yes (Go build/test paths can run in PR CI)
Changelog highlights (none → v5.19.3)
  • go-git v5.19.3 release notes include security-related dependency bumps (golang.org/x/crypto) and transport hardening (credentials handling across redirects).
  • No CVE ID explicitly listed in the release notes, but changes are generally risk-reducing for git/transport behavior.
Usage in this repository
  • dev-tools/mage/release/git.go:17-19 imports go-git APIs (Repository, config, plumbing) for release branch orchestration.
  • dev-tools/mage/release/git_test.go:18-21 tests these paths.
  • Usage is confined to release automation tooling (not fleet-server runtime request path).
Compatibility assessment
  • This is a new direct dependency, used in tooling-only code.
  • No major-version migration issue (/v5 import path is explicit and consistent).
  • APIs referenced in local code remain valid for this version line.

Go modules: github.com/google/go-github/v68 none → v68.0.0 (with golang.org/x/oauth2 none → v0.37.0)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in repository usage
Testable in PR ✅ Yes (Go build/test paths can run in PR CI)
Changelog highlights (none → v68.0.0)
  • Upstream v68.0.0 notes include breaking changes around Project (classic) removal and Commit.Stats field removal.
  • CVE/security-specific entries are not called out in that release body.
  • Repository usage here is PR/issue/search APIs; no local usage of removed project-classic or Commit.Stats surfaces was found.
Usage in this repository
  • dev-tools/mage/release/github.go:13-14 uses go-github + oauth2 to create/list PRs, labels, and issues.
  • dev-tools/mage/release/workflows.go:11 and tests (github_test.go, issue_test.go) consume those workflow helpers.
  • This is release automation tooling scope, not runtime fleet-server API handling.
Compatibility assessment
  • Local calls target PullRequests/Issues/Search methods; none map to the noted upstream breaking areas.
  • No evidence of required new configuration for current usage.

Go modules: golang.org/x/net v0.62.0 → v0.63.0, golang.org/x/sync v0.24.0 → v0.25.0, github.com/shirou/gopsutil/v4 v4.26.10 → v4.26.9 (downgrade in conflicting hunk)

Ecosystem: Go

Check Result
Breaking changes ⚠️ Found (repository currently contains unresolved merge-conflict markers)
Testable in PR ⚠️ Blocked (module parsing fails before meaningful validation)
Changelog highlights (old → new)
  • gopsutil notes are available for both v4.26.10 and v4.26.9; v4.26.10 contains additional fixes and an important Windows I/O timing transition note, so the apparent move to v4.26.9 is a regression in patch level.
  • golang/x repos above do not publish GitHub Releases for these tags via MCP (retried + release listing fallback); detailed upstream release-note bodies were unavailable from MCP.
Usage in this repository
  • golang.org/x/sync is widely used in runtime code (internal/pkg/server/fleet.go, internal/pkg/monitor/subscription_monitor.go, internal/pkg/bulk/engine.go, etc.).
  • golang.org/x/net/nettest appears in tests (internal/pkg/limit/listener_test.go).
  • gopsutil is indirect in go.mod and consumed via transitive system-info dependencies.
Compatibility assessment
  • The repo currently includes unresolved conflict markers in critical files:
    • go.mod:43,46,50,99,101,105
    • Dockerfile.fips:13,14,20
    • magefile.go:1780,1782,1784
  • go list -m already fails with go.mod parse errors (malformed module path "<<<<<<<").
  • This is a hard blocker and creates immediate integration risk independent of normal dependency compatibility.

Labels Applied

No labels applied. (oblt-aw/ai/merge-ready not applied because overall risk is high and ecosystem/build checks are currently failing due to unresolved conflict markers.)


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

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

@github-actions

This comment has been minimized.

Remove conflict markers left by the Mergify cherry-pick of #7339 so
go.mod parses and CI can run again.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved critical issues prevent the release package and Mage targets from compiling and can cause incorrect version backports, blocked major releases, and deletion of release-tracker checklist content.

8 open issues
1 resolved since last review

Review effort: Balanced

Comment thread dev-tools/mage/release/github.go Resolved
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: This PR introduces and updates Go dependencies for release-automation tooling (dev-tools/mage/release) with overall low-to-moderate risk; no breaking impact was found for current repository usage.

Go deps: github.com/go-git/go-git/v5 (new → v5.19.3) and 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 (package has tests; go test ./dev-tools/mage/release/... passes)
Changelog highlights (new → current)
  • go-git v5.19.3 release notes include security-relevant hardening (credential containment across redirects) and dependency security bumps (x/crypto) plus packfile robustness improvements.
  • go-github v68.0.0 includes breaking API removals (Project classic support removal, Commit.Stats removal), plus API/permission updates.
  • CVE/security assessment: no regressions indicated by upstream notes; go-git changes are net risk-reducing.
Usage in this repository
  • dev-tools/mage/release/git.go imports and uses go-git (openRepo, branch/reference operations) for release workflow repo management.
  • dev-tools/mage/release/github.go, issue.go, workflows.go use go-github for PR/issue/search/labels/release-tag operations.
  • golang.org/x/oauth2 is used in dev-tools/mage/release/github.go to build token-authenticated GitHub clients.
  • Usage is limited to release tooling paths under dev-tools/mage/release/* (not runtime server paths).
Compatibility assessment
  • Current go-github usage is Pull Requests / Issues / Search / Repositories APIs; no Project classic or Commit.Stats usage found, so upstream breaking items do not affect current code paths.
  • go-git usage is compatible with introduced APIs in this package.
  • Release-tooling unit tests pass locally for this PR.

Go module bumps in root go.mod

  • golang.org/x/net v0.62.0 → v0.63.0
  • golang.org/x/sync v0.24.0 → v0.25.0
  • golang.org/x/crypto v0.58.0 → v0.59.0 (indirect)
  • golang.org/x/sys v0.49.0 → v0.50.0 (indirect)
  • golang.org/x/text v0.43.0 → v0.44.0 (indirect)
  • plus new direct golang.org/x/oauth2 v0.37.0

Ecosystem: Go

Check Result
Breaking changes ✅ None found in current usage
Testable in PR ✅ Yes
Changelog highlights (old → new)

Upstream release-note bodies were unavailable via GitHub Releases for these golang.org/x/* modules (MCP retries + release listing did not provide exact-version release entries), so this section is based on local metadata only (go.mod/go.sum diffs).

CVE/security assessment: no explicit CVE/GHSA claims are made here due missing upstream release-note bodies; updates are patch/minor-level and include security-sensitive libraries (x/crypto, x/sys) with no repo-local evidence of increased attack surface.

Usage in this repository
  • These version changes are introduced through root module dependency resolution (go.mod/go.sum) tied to the new release-tooling code.
  • Functional usage added in this PR is in release tooling (dev-tools/mage/release), not Fleet Server runtime request handling.
Compatibility assessment
  • No Go major-version module-path transitions were introduced.
  • No deprecated import-path migration required by this PR.
  • Root/runtime behavior impact appears limited; changes are primarily tooling-oriented.

Tooling lock module addition: dev-tools/tools/go.mod (new)

Ecosystem: Go

Check Result
Breaking changes ✅ None found
Testable in PR ✅ Yes
Changelog highlights (new file)

A dedicated tools module was added to pin codegen/lint/release helper tool dependencies. This is a new manifest, so there is no old→new replacement in this PR.

Usage in this repository
  • Referenced by Dockerfiles for dependency prefetch/caching (Dockerfile, Dockerfile.build, Dockerfile.fips now copy dev-tools/tools/go.mod + go.sum).
  • Used by developer/release workflows, not production Fleet Server runtime.
Compatibility assessment
  • Isolating tooling dependencies into a dedicated module reduces coupling with runtime dependencies and improves reproducibility.
  • Low operational risk for production behavior.

Labels Applied

  • oblt-aw/ai/merge-ready — applied (low-to-moderate overall risk, no repo-usage breaking changes, tooling-scoped impact, and tests passed).

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

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

@github-actions

This comment has been minimized.

GOFIPS140=certified makes mage require fips140=on at runtime, which
panics on the debian11-fips OpenSSL 1.1.1w toolchain used by 9.4.
Copilot AI balanced review requested due to automatic review settings November 24, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Invalid PerPage composite literals prevent the release package and all importing Mage targets from compiling.

8 open issues
1 previously missed issue

In code that hasn't changed since last review

High severity Initialize embedded ListOptions in search options

dev-tools/​mage/​release/​github.go:335

github.SearchOptions embeds github.ListOptions, so Go rejects PerPage as a direct key in this composite literal. This prevents the release package and all importing Mage targets from compiling. Initialize ListOptions: github.ListOptions{PerPage: 20} here, and apply the same change with page size 100 at dev-tools/mage/release/github.go:396.

Review effort: Balanced

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: This PR includes Go dependency updates/additions for release automation and minor golang.org/x/* bumps; overall risk is low-to-moderate with no breaking usage identified in this repository.

Go: github.com/go-git/go-git/v5 (new → v5.19.3)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in consumed APIs
Testable in PR ✅ Yes (PR workflows include pull_request; release package has dedicated tests)
Changelog highlights (new → v5.19.3)

Release notes include transport hardening (credential containment across redirects) and dependency security refreshes (golang.org/x/crypto bumps). No breaking API note for the repository-level operations used here.

CVE-focused assessment: security-related transport/dependency updates reduce risk for Git remote interactions; no new attack surface observed in this repo usage.

Usage in this repository

Used in release automation only (dev-tools/mage/release/git.go) for repo open/ref/branch operations and CLI-backed checkout/commit/push orchestration (git.PlainOpen, refs, branch handling).

Compatibility assessment

Usage is narrow and internal to release tooling (not fleet-server runtime request handling). No consumed API in this repo maps to a removed/changed interface in v5.19.3.

Go: github.com/google/go-github/v68 + golang.org/x/oauth2 (new → v68.0.0 / v0.37.0)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in consumed APIs
Testable in PR ✅ Yes (PR workflows include pull_request; release package has tests)
Changelog highlights (new → v68.0.0)

Upstream v68 notes breaking removals for Project (classic) support and Commit.Stats field. This repo uses PR/Issue/Search/Label/Tag/Release client paths, not Project classic or Commit stats.

x/oauth2 changelog body was unavailable from GitHub Releases for the target tag; local metadata confirms only the version addition.

CVE-focused assessment: no vulnerability-regressing behavior observed in the consumed API surface; auth/token client creation remains standard OAuth2 static token flow.

Usage in this repository

Used in dev-tools/mage/release/github.go, issue.go, workflows.go for PullRequests.*, Issues.*, Search.Issues, Repositories.ListTags/ListReleases; OAuth2 used for token-authenticated HTTP client creation.

Compatibility assessment

Consumed methods are unaffected by the documented v68 breaking changes. This is release-automation tooling scope, with no production Fleet Server API path impact.

Go: golang.org/x/* bumps (x/net v0.62.0→v0.63.0, x/sync v0.24.0→v0.25.0, x/crypto v0.58.0→v0.59.0, x/sys v0.49.0→v0.50.0, x/text v0.43.0→v0.44.0)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in consumed APIs
Testable in PR ✅ Yes (pull-request CI + unit tests can exercise compile/runtime integration)
Changelog highlights (vOLD → vNEW)

Exact target release-note bodies were unavailable via GitHub Releases for these module tags (after MCP retries and release listing). Local diff confirms version bumps only.

CVE-focused assessment: security-sensitive modules (x/crypto, x/sys) were updated, which is directionally risk-reducing; no repo-local evidence of new insecure defaults or expanded privileged behavior.

Usage in this repository

x/sync is actively used in runtime packages (errgroup, semaphore, singleflight) under internal/pkg/... (e.g., server, bulk, policy, limit, monitor). x/net appears in tests (nettest) and transitive runtime dependencies.

Compatibility assessment

No major-version path changes occurred (all remain pre-v1 minor bumps with identical import paths), and no usage in this repo indicates removed symbols. Risk remains low-to-moderate mainly due to unavailable upstream per-tag release narratives for some x/* modules.

Labels Applied

  • oblt-aw/ai/merge-ready — applied (low-to-moderate risk, no breaking repository usage found, ecosystem checks passed for the updated Go dependencies).

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

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

@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

The Buildkite E2E job fails before tests run because the testing module is not tidy for this PR head, so go test exits with go: updates to go.mod needed.

Remediation

  • Regenerate module metadata in the test module and commit results:
    • cd testing && go mod tidy
    • commit updated testing/go.mod + testing/go.sum
  • Re-run the E2E Test Buildkite step.
Investigation details

Root Cause

Classification: Dependency issue (module metadata drift).

E2E is executed from the testing module (magefile.go runs go test ... ./... with cmd.Dir = testingDir, around magefile.go:2233-2240).

In this failed run, Go resolves testing dependencies and then aborts with:
go: updates to go.mod needed; to update it: go mod tidy.

This indicates testing/go.mod/testing/go.sum are out of sync for the PR head dependency graph.

Evidence

Verification

  • Local rerun not performed in this workflow run.
  • Static trace verified from scripts/code paths and Buildkite log.

Follow-up

  • I checked for existing detective comments: latest visible comments were about earlier merge-conflict/FIPS failures, not this module-tidy failure.
  • I attempted to check open flaky-test issues, but results were filtered by repository integrity policy in this environment.

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

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

E2E fails with go: updates to go.mod needed because testing indirect
deps lagged the root module bumps from the cherry-pick.
Copilot AI balanced review requested due to automatic review settings November 24, 2026 11:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: This PR introduces release-automation Go dependencies and bumps several golang.org/x/* modules; overall risk is low-to-moderate and compatible with current repository usage.

Dependency 1: github.com/go-git/go-git/v5 (new)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in repository usage
Testable in PR ✅ Yes (.github/workflows/pre-commit.yml and .github/workflows/golangci-lint.yml run on pull_request)
Changelog highlights (new → v5.19.3)

From go-git/go-git release v5.19.3: includes transport hardening (“contain credentials across redirects”) and security-related dependency refreshes (noted golang.org/x/crypto updates). No removals affecting used APIs were identified.

Usage in this repository

Used only in release tooling, not Fleet Server runtime paths:

  • dev-tools/mage/release/git.go:17-19
  • dev-tools/mage/release/git_test.go:18-21

Usage is focused on repository/open/branch/plumbing operations.

Compatibility assessment

The PR adds this dependency alongside a new release-automation package (dev-tools/mage/release/*), with no existing production call sites to migrate. No API break was observed for the consumed surface.

Dependency 2: github.com/google/go-github/v68 (new) + golang.org/x/oauth2 (new direct)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in repository usage
Testable in PR ✅ Yes (pull_request workflows above)
Changelog highlights (new → v68.0.0)

google/go-github v68.0.0 notes breaking removals for Project (classic) support and Commit.Stats. Current repository usage does not use those interfaces. No CVE/GHSA item was identified in the release body.

Usage in this repository

Used only by new release automation:

  • dev-tools/mage/release/github.go:13-14
  • dev-tools/mage/release/issue.go:15
  • dev-tools/mage/release/workflows.go:11

Consumed APIs are PR/issue/search/list-tags/list-releases flows.

Compatibility assessment

The new code uses github.Client PR/Issues/Search/Repositories endpoints and OAuth token client setup. It does not use removed Project classic APIs or Commit.Stats, so v68 breaking changes do not impact current usage.

Dependency 3: golang.org/x/* bumps (x/net, x/sync, x/crypto, x/sys, x/text)

Ecosystem: Go

Check Result
Breaking changes ✅ None found in repository usage
Testable in PR ✅ Yes (pull_request workflows above)
Changelog highlights (v0.62.0→v0.63.0, v0.24.0→v0.25.0, v0.58.0→v0.59.0, v0.49.0→v0.50.0, v0.43.0→v0.44.0)

Upstream release-note bodies were unavailable via GitHub Releases APIs for golang/{net,sync,crypto,sys,text,oauth2} (repos publish tags without release entries). PR commit metadata also does not include compare/release URLs. Assessment therefore relies on local usage and semver progression.

Usage in this repository
  • golang.org/x/sync runtime usage: internal/pkg/server/fleet.go:40, internal/pkg/bulk/engine.go:28, internal/pkg/scheduler/scheduler.go:16, internal/pkg/policy/monitor.go:16, etc.
  • golang.org/x/net direct usage is test-only: internal/pkg/limit/listener_test.go:14.
  • x/crypto, x/sys, x/text are indirect in this PR (go.mod, testing/go.mod).
Compatibility assessment

All updates are minor-version increments within major v0; no import-path major-version transition occurred. Current call sites are stable primitives (errgroup, singleflight, semaphore) with no evidence of removed APIs in this PR. Security posture is not weakened by local code changes.

Labels Applied

  • oblt-aw/ai/merge-ready — applied (risk assessed as low-to-moderate, no breaking impact on repository usage).

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

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

@github-actions

Copy link
Copy Markdown
Contributor

Automerge skipped

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

Changed files considered:

  • .ci/bump-golang.yml

  • .golangci.yml

  • Dockerfile

  • Dockerfile.build

  • Dockerfile.fips

  • NOTICE-fips.txt

  • NOTICE.txt

  • RELEASE.md

  • dev-tools/mage/release/README.md

  • dev-tools/mage/release/config.go

  • dev-tools/mage/release/config_test.go

  • dev-tools/mage/release/git.go

  • dev-tools/mage/release/git_test.go

  • dev-tools/mage/release/github.go

  • dev-tools/mage/release/github_test.go

  • dev-tools/mage/release/issue.go

  • dev-tools/mage/release/issue_test.go

  • dev-tools/mage/release/mergify.go

  • dev-tools/mage/release/out.go

  • dev-tools/mage/release/release.go

  • …and 16 more

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: This PR updates indirect Go dependencies in testing/go.mod/testing/go.sum to match already-bumped root-module versions; overall risk is low.

golang.org/x modules (indirect)

golang.org/x/crypto v0.58.0 → v0.59.0
golang.org/x/net v0.62.0 → v0.63.0
golang.org/x/sys v0.49.0 → v0.50.0
golang.org/x/text v0.43.0 → v0.44.0
golang.org/x/term v0.47.0 → v0.48.0

Ecosystem: Go

Check Result
Breaking changes ✅ None found for this repo usage (all updates are indirect in testing/ module)
Testable in PR ✅ Yes — normal PR CI can validate module resolution/build/tests
Changelog highlights (vOLD → vNEW)

GitHub Releases for these golang/* repos do not provide exact release-note entries for these tags (attempted via MCP get_release_by_tag, retries, and list_releases). Tags exist for all new versions, but detailed upstream note bodies were unavailable.

CVE-focused assessment: no concrete CVE/GHSA entries were retrievable from release-note artifacts for these exact tags. Given these are indirect dependency bumps limited to the testing module, there is no evidence of increased attack surface in production Fleet Server paths.

Usage in this repository
  • Updated only in:

    • testing/go.mod
    • testing/go.sum
  • No direct imports of these module paths were found under testing/**/*.go.

  • The same golang.org/x/* versions are already present in the root module (go.mod/go.sum), so this aligns testing module transitive graph with root.

Compatibility assessment
  • This is not a Go major-version path change (no vN import-path transition), so no source import rewrites are expected.
  • Changes are indirect and lockfile/module-graph alignment only; no API consumption changes in this PR.
  • Risk impact: low; likely to reduce drift-related CI/module tidy issues.

Labels Applied

  • oblt-aw/ai/merge-ready — overall risk is low and no breaking changes affecting repository usage were identified.

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

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

This branch has not been deployed

No deployments
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 oblt-aw/ai/merge-ready skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants