Skip to content

[ML] Automate minor version bump in CI pipeline#3063

Closed
edsavage wants to merge 9 commits into
mainfrom
feature/minor-version-bump
Closed

[ML] Automate minor version bump in CI pipeline#3063
edsavage wants to merge 9 commits into
mainfrom
feature/minor-version-bump

Conversation

@edsavage

@edsavage edsavage commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Extends the ml-cpp-version-bump Buildkite pipeline with WORKFLOW=minor for feature-freeze (minor version) releases, complementing the existing patch workflow (#3030).

Phase 1 (validate): checks that main is at NEW_VERSION (e.g. 9.5.0), derives MAIN_NEW_VERSION (e.g. 9.6.0), and sets meta-data for which legs still need work.

Phase 2 (minor freeze):

  • Leg A: create release branch BRANCH from main (direct ref push)
  • Leg B: bump main to MAIN_NEW_VERSION, update .backportrc.json, open PR
  • Slack notification (step notify)
  • DRA artifact wait (production branches only)

Also includes testing-MAJOR.MINOR sandbox branch support for manual Buildkite testing only — version rules strip the testing- prefix; git operations use the full ref name; main bump and DRA wait are skipped so sandbox runs do not touch production branches.

Test plan

Automated (local / PR CI)

  • ./dev-tools/run_dev_tools_tests.sh — validation rules, pipeline JSON, phase-2 upload, DRA gating (48 tests at last run)
  • ml-cpp-pr-builds green on this PR

Buildkite — production parameters (validate only)

Recommended before merge; does not create branches or open PRs when DRY_RUN=true:

WORKFLOW=minor
BRANCH=9.5
NEW_VERSION=9.5.0
DRY_RUN=true

Branch: feature/minor-version-bump

Buildkite — sandbox E2E (orchestration)

Proven on build #54 (passed):

WORKFLOW=minor
BRANCH=testing-9.5
NEW_VERSION=9.5.0
VERSION_BUMP_NO_MERGE=true

Exercises: validate → create testing-9.5 @ 9.5.0 → skip main bump → Slack notify → DRA skip.

testing-* is intentional for pipeline regression testing and inert when release-eng uses production BRANCH=9.5.

Buildkite — idempotency (sandbox)

With testing-9.5 already present after a successful run:

WORKFLOW=minor
BRANCH=testing-9.5
NEW_VERSION=9.5.0
DRY_RUN=true

Expect: validate passes, ml_cpp_version_bump_noop=true, phase 2 not scheduled.

Buildkite — patch workflow regression

Confirm minor changes did not break patch bumps:

WORKFLOW=patch
BRANCH=<existing release branch>
NEW_VERSION=<next patch>
DRY_RUN=true

Intentionally not tested pre-merge

  • Real production freeze (BRANCH=9.5, no testing- prefix, no DRY_RUN) — Leg B main bump PR + .backportrc.json merge; to be run by release-eng when ready
  • DRA wait on production branches — long-running; sandbox correctly skips for testing-*
  • Auto-merge (VERSION_BUMP_MERGE_AUTO=true) — defer to release-eng staging

Note: DRY_RUN=true exits before phase-2 upload, so it validates parameters only and does not exercise Leg A/B scripts.

Release coordination

Release-eng parameters for a real freeze (when main is at 9.5.0):

WORKFLOW=minor
BRANCH=9.5
NEW_VERSION=9.5.0

Made with Cursor

edsavage and others added 7 commits July 2, 2026 12:52
Extend the ml-cpp-version-bump pipeline for WORKFLOW=minor (feature freeze):
create the release branch from main via direct ref push, bump main to the
derived next minor via PR (gradle.properties + .backportrc.json), then wait
for DRA artifacts on main and the new release branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ignore GITHUB_TOKEN so a stale shell export does not override an interactive
gh login session during local version bump testing. CI continues to use
VAULT_GITHUB_TOKEN when gh is not pre-authenticated.

Co-authored-by: Cursor <cursoragent@cursor.com>
Allow BRANCH=testing-MAJOR.MINOR for manual Buildkite runs: version rules
strip the prefix while git ops use the full ref, and main bump plus DRA wait
are skipped so sandbox testing does not touch production branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace exec-in-pipeline with if/else so WORKFLOW=minor only uploads the
minor follow-up steps once, avoiding duplicate Buildkite step keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
Define version_bump_set_main_bump_changed before the testing-* early exit
so WORKFLOW=minor sandbox runs exit 0 instead of command-not-found.

Co-authored-by: Cursor <cursoragent@cursor.com>
Emit branch and PR lines as separate indented heredoc lines so the
uploaded notify pipeline parses when main bump is skipped on sandbox runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Buildkite executes each command array element as a separate shell line;
splitting python3 and the script path started an interactive REPL and
blocked the fetch-dra-artifacts step until timeout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@prodsecmachine

prodsecmachine commented Jul 2, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@elasticsearchmachine

Copy link
Copy Markdown

Pinging @elastic/ml-core (Team:ML)

edsavage and others added 2 commits July 3, 2026 10:01
Nothing uploads this script since #3030 moved version-bump Slack notify to
send_slack_version_bump_notification.sh in phase 2.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove duplicated helpers from bump_version.sh and validate_version_bump_params.sh so all shared functions live in one place.

Co-authored-by: Cursor <cursoragent@cursor.com>
@edsavage

edsavage commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #3064 — same branch content, reopened from personal fork (edsavage/ml-cpp) per CONTRIBUTING.md workflow.

@edsavage edsavage closed this Jul 2, 2026
@edsavage edsavage deleted the feature/minor-version-bump branch July 2, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants