Skip to content

ci(ff): support feature freeze automation#6584

Draft
v1v wants to merge 7 commits intoelastic:mainfrom
v1v:feature/support-ff-fleet-server
Draft

ci(ff): support feature freeze automation#6584
v1v wants to merge 7 commits intoelastic:mainfrom
v1v:feature/support-ff-fleet-server

Conversation

@v1v
Copy link
Copy Markdown
Member

@v1v v1v commented Mar 12, 2026

What is the problem this PR solves?

This PR migrates the fleet-server release automation from Makefile-based scripts to a pure Go implementation using Mage, eliminating all external tool dependencies.

✨ Key Features

  • Mage Commands for complete release workflow automation
  • Pure Go Implementation - no external CLI tools (hub, gh, sed, yq, Python)
  • DRY_RUN Mode - safe testing without pushing changes or creating branches
  • Comprehensive Testing - 60%+ test coverage with unit tests
  • Detailed Documentation - both quick reference and comprehensive guides

How does this PR solve the problem?

Move away from centralised approach but support the FF automation as part of #6343

How to test this PR locally

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

# Dry run first
mage release:runMajorMinor

# Review changes
git diff

# Run for real on your fork
export DRY_RUN=false
mage release:runMajorMinor

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • 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 using the changelog tool

Related issues

Auotmate releases like https://github.com/elastic/fleet-server/issues?q=sort%3Aupdated-desc%20state%3Aclosed%20label%3Arelease

@v1v v1v self-assigned this Mar 12, 2026
@v1v v1v added backport-8.19 Automated backport to the 8.19 branch skip-changelog backport-9.3 Automated backport to the 9.3 branch labels Mar 12, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 18, 2026

This pull request is now in conflicts. Could you fix it @v1v? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b feature/support-ff-fleet-server upstream/feature/support-ff-fleet-server
git merge upstream/main
git push upstream feature/support-ff-fleet-server

@v1v
Copy link
Copy Markdown
Member Author

v1v commented Mar 23, 2026

$ export PROJECT_OWNER="v1v"
export CURRENT_RELEASE="9.5.0"
export GITHUB_TOKEN=$(gh auth token)
export DRY_RUN=true

# Dry run first
mage release:runMajorMinor

🔍 DRY RUN MODE - No changes will be pushed
🚀 Starting major/minor release workflow for 9.5.0

Step 1: Preparing release files...
Preparing major/minor release for version 9.5.0
✓ Updated version to 9.5.0 in version/version.go
✓ Added backport rule for 9.5 to .mergify.yml
✓ Major/minor release preparation complete
  Next steps:
  1. Review changes: git diff
  2. Create branch: mage release:createBranch
  3. Create PR: mage release:createPR

Step 2: Creating release branch...
Creating release branch: 9.5
  [DRY RUN] Would create branch 9.5 and commit changes
  [DRY RUN] Would push to remote: origin

Step 3: Creating pull request...
  [DRY RUN] Would create PR:
    Title: [Release] 9.5.0
    Head: 9.5
    Base: main

✅ Major/minor release workflow complete for 9.5.0
diff --git a/.mergify.yml b/.mergify.yml
index 67c6b8cf..031cefdf 100644
--- a/.mergify.yml
+++ b/.mergify.yml
@@ -270,3 +270,11 @@ pull_request_rules:
       backport:
         branches:
           - "9.3"
+  - name: backport patches to 9.5 branch
+    conditions:
+      - merged
+      - label=backport-9.5
+    actions:
+      backport:
+        branches:
+          - "9.5"
diff --git a/version/version.go b/version/version.go
index f9febdb6..95b14148 100644
--- a/version/version.go
+++ b/version/version.go
@@ -6,4 +6,4 @@ package version
 
 // DefaultVersion is the current release version of Fleet-server, this version must match the
 // Elastic Agent version.
-const DefaultVersion = "9.4.0"
+const DefaultVersion = "9.5.0"

Patch

$ export PROJECT_OWNER="v1v"
export CURRENT_RELEASE="9.3.3"
export GITHUB_TOKEN=$(gh auth token) 
export DRY_RUN=true

# Dry run first
mage release:runPatch     
🔍 DRY RUN MODE - No changes will be pushed
🚀 Starting patch release workflow for 9.3.3

Preparing patch release files...
Preparing patch release for version 9.3.3
✓ Updated version to 9.3.3 in version/version.go
✓ Patch release preparation complete

✅ Patch release workflow complete for 9.3.3
  Review changes and commit to the release branch

I used main therefore the version is expected to be changed from another minor!

diff --git a/version/version.go b/version/version.go
index f9febdb6..5408abfe 100644
--- a/version/version.go
+++ b/version/version.go
@@ -6,4 +6,4 @@ package version
 
 // DefaultVersion is the current release version of Fleet-server, this version must match the
 // Elastic Agent version.
-const DefaultVersion = "9.4.0"
+const DefaultVersion = "9.3.3"

@v1v v1v marked this pull request as ready for review March 23, 2026 15:19
@v1v v1v requested a review from a team as a code owner March 23, 2026 15:19
@v1v v1v requested review from michel-laterman and swiatekm March 23, 2026 15:19
@ebeahan
Copy link
Copy Markdown
Member

ebeahan commented Mar 23, 2026

Buildkite test this

@v1v v1v marked this pull request as draft March 24, 2026 08:56
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 30, 2026

This pull request is now in conflicts. Could you fix it @v1v? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b feature/support-ff-fleet-server upstream/feature/support-ff-fleet-server
git merge upstream/main
git push upstream feature/support-ff-fleet-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch backport-9.3 Automated backport to the 9.3 branch skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants