[ML] Automate patch version bump in CI pipeline#3030
[ML] Automate patch version bump in CI pipeline#3030edsavage wants to merge 24 commits intoelastic:mainfrom
Conversation
Replace the version-bump pipeline stub with a patch-only flow: Slack notification, Wolfi step running dev-tools/bump_version.sh to bump elasticsearchVersion on BRANCH (and .backportrc.json on main), then json-watcher polling for staging and snapshot artifact versions. Supports DRY_RUN=true to skip git push. Minor-branch automation will follow in a separate change. Made-with: Cursor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
- Add send_slack_version_bump_notification.sh (version-bump pipeline only) with ML_CPP_VERSION_BUMP_TEST_MODE banner and optional channel override. - Wire job-version-bump.json.py to use it; support ML_CPP_VERSION_BUMP_SKIP_DRA_WAIT for short smoke runs without json-watcher polling. Made-with: Cursor
Widen ml-cpp-version-bump branch_configuration for PR elastic#3030 smoke tests; revert to main-only after validation. Made-with: Cursor
The temporary ml-cpp-version-bump branch_configuration change is proposed separately so PR elastic#3030 stays focused on the bump automation. Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
This PR updates the ML CI “version bump” pipeline from a stubbed/manual flow to an automated patch-version bump workflow that (1) notifies Slack, (2) bumps elasticsearchVersion on a target branch, and (3) optionally polls published artifact JSON until the expected versions appear.
Changes:
- Add
dev-tools/bump_version.shto bumpelasticsearchVersion(and update.backportrc.jsonwhen targetingmain) with optionalDRY_RUN=true. - Add a dedicated Buildkite pipeline YAML generator for Slack notifications in the version-bump pipeline.
- Update
.buildkite/job-version-bump.json.pyto run the bump step and then poll staging/snapshot artifact JSON viaelastic/json-watcher.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
dev-tools/bump_version.sh |
New automation script to bump elasticsearchVersion, commit, and push (with DRY_RUN support). |
.buildkite/pipelines/send_slack_version_bump_notification.sh |
New pipeline snippet generator to configure Slack notifications specifically for version bump runs. |
.buildkite/job-version-bump.json.py |
Replaces the old stub/block flow with bump + (optional) artifact polling steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Patch-only version bumps update gradle.properties only; main/minor backport mapping stays out of this PR. Made-with: Cursor
Remove ML_CPP_VERSION_BUMP_TEST_MODE / TEST banner and ML_CPP_VERSION_BUMP_SKIP_DRA_WAIT (DRA wait steps always run). DRY_RUN remains a normal Buildkite env for bump_version.sh. Optional ML_CPP_VERSION_BUMP_SLACK_CHANNEL retained for routing. Made-with: Cursor
Runs before Slack queue and bump so CI credentials are validated without creating or updating remote refs. Made-with: Cursor
workflow_dispatch with branch/new_version/dry_run; GitHub App token for checkout and git push (addresses Buildkite Vault bot 403 class of issues). Document suggested secrets in workflow header. Made-with: Cursor
Run gh api (or curl fallback) against elastic-vault-github-plugin-prod during ml-cpp-version-bump git push auth probe; non-fatal. Remove before merge. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add version_bump_validation.py and wire validate_version_bump_params.sh to git fetch + Python rules (SKIP before env checks). - Add pytest suite under dev-tools/unittest, pytest.ini, test-requirements.txt, run_dev_tools_tests.sh. - Extend ml-cpp-version-bump pipeline with validate-version-bump step; document bump_version.sh. - Add dev_tools_pytest Buildkite step (python:3) to format_and_validation pipeline. - Add test_validate_version_bump_local.sh helper for manual branch testing. Co-authored-by: Cursor <cursoragent@cursor.com>
Pytest plus manual validate_version_bump_params.sh usage is sufficient. Co-authored-by: Cursor <cursoragent@cursor.com>
Run with VERSION_BUMP_GIT_INTEGRATION=1 and VERSION_BUMP_TEST_BRANCH; document markers in pytest.ini. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pinging @elastic/ml-core (Team:ML) |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… DRA skip
- Restrict validation to patch bumps; enforce WORKFLOW=patch in shell
- Revalidate bump after git pull; safer pipefail parsing for gradle version
- Git push probe: dry-run refs/heads/${BRANCH} when BRANCH set (Buildkite)
- Skip DRA json-watcher when DRY_RUN=true
- Split pip bootstrap to dev_tools_pytest.sh; clearer errors for pytest/git root
- Slack notification: drop Workflow line
Co-authored-by: Cursor <cursoragent@cursor.com>
- bump_version.sh: topic branch ci/ml-cpp-version-bump-* + push + REST PR create - create_github_pull_request.py: POST pulls using GITHUB_TOKEN/VAULT_GITHUB_TOKEN - job-version-bump: DRA json-watcher only when WAIT_FOR_DRA=true (post-merge run) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the version-bump pipeline stub with a patch-only flow: Slack notification, Wolfi step running
dev-tools/bump_version.shto bumpelasticsearchVersionon BRANCH, then json-watcher polling for staging and snapshot artifact versions.Supports DRY_RUN=true to skip git push. Minor-branch automation will follow in a separate change.
Made-with: Cursor