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.
TL;DR
Remediation
Investigation detailsRoot CauseThe immediate failure is a configuration/infrastructure failure in the Cloud FIPS deployment, not a test assertion failure. The step script reads # .buildkite/scripts/cloud_e2e_test.sh:31-45
FLEET_SERVER_URL=$(terraform output --raw --state=dev-tools/cloud/terraform/terraform.tfstate fleet_url)
...
if [[ "${FLEET_SERVER_URL}" == "" ]]; then
message="FLEET_SERVER_URL is empty, cloud e2e tests cannot be executed"
...
exit 1
fiThat output is derived from the integrations server Fleet endpoint: # dev-tools/cloud/terraform/outputs.tf:28-30
output "fleet_url" {
value = ec_deployment.deployment.integrations_server.endpoints != null ? ec_deployment.deployment.integrations_server.endpoints.fleet : ""
}The captured teardown log shows Evidence
Verification
Follow-upNo existing What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
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? 🙏 |
| github.com/elastic/elastic-agent-client/v7 v7.18.1 | ||
| github.com/elastic/elastic-agent-libs v0.44.0 | ||
| github.com/elastic/elastic-agent-system-metrics v0.14.4 | ||
| github.com/elastic/fleet-server/dev-tools v0.0.0 |
There was a problem hiding this comment.
Is there a way we can avoid polluting the project's go.mod?
| if err != nil { | ||
| return fmt.Errorf("failed to checkout existing branch: %w", err) | ||
| } | ||
| fmt.Printf("✓ Checked out existing branch: %s\n", branchName) |
There was a problem hiding this comment.
We should't checkout branches. Maybe delete them first?
| if err != nil { | ||
| return err | ||
| } | ||
| return release.CreateReleaseBranch(cfg, ".", os.Getenv("DRY_RUN") == "true") |
There was a problem hiding this comment.
| return release.CreateReleaseBranch(cfg, ".", os.Getenv("DRY_RUN") == "true") | |
| return release.CreateReleaseBranch(cfg, ".", envToBool("DRY_RUN")) |
| if err != nil { | ||
| return err | ||
| } | ||
| return release.CreateReleasePR(cfg, ghClient, os.Getenv("DRY_RUN") == "true") |
There was a problem hiding this comment.
We do have envToBool as a helper available.
| } | ||
|
|
||
| // PreparePatchRelease prepares files for a patch release. | ||
| func PreparePatchRelease(cfg *ReleaseConfig) error { |
There was a problem hiding this comment.
This function is not doing anything besides setting the version of *ReleaseCofnig
| } | ||
|
|
||
| // RunPatchRelease orchestrates the complete patch release workflow. | ||
| func RunPatchRelease(cfg *ReleaseConfig, dryRun bool) error { |
| return nil | ||
| } | ||
|
|
||
| err := g.repo.Push(&git.PushOptions{ |
There was a problem hiding this comment.
What credentials are we using here?
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 release workflow 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, rebased onto current
mainwith merge conflicts resolved.How does this PR solve the problem?
release:runMajorMinor,release:runPatch, and supporting targets)dev-tools/mage/release/(release.go,git.go,github.go), aligned with elastic-agent and beatsmage release:*wrappers inmagefile.gothat delegate to the release packageupdateVersionno-ops whenDefaultVersionalready matchesupdateMergifyno-ops when the backport rule already existscreateBranchchecks out an existing branch instead of failingcommitAllskips when there are no changespushsucceeds when the remote is already up to datecreatePRreturns an existing open PR for the same head/baseDRY_RUNmode for safe local testingRELEASE.mdHow to test this PR locally
Re-run the same commands to confirm idempotent behavior (no duplicate branches, commits, PRs, or file changes).
Design Checklist
Checklist
./changelog/fragmentsusing the changelog toolValidation
mainand resolvedgo.mod/go.sumconflictscd dev-tools && go test -race -count=1 ./mage/release/...passesgo build -tags magesucceeds with thin magefile wrappersRelated issue: https://github.com/elastic/observability-robots/issues/3404