Skip to content

[ML] Automate patch version bump in CI pipeline#3030

Open
edsavage wants to merge 24 commits intoelastic:mainfrom
edsavage:feature/version-bump-patch-only
Open

[ML] Automate patch version bump in CI pipeline#3030
edsavage wants to merge 24 commits intoelastic:mainfrom
edsavage:feature/version-bump-patch-only

Conversation

@edsavage
Copy link
Copy Markdown
Contributor

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

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
@prodsecmachine
Copy link
Copy Markdown

prodsecmachine commented Apr 30, 2026

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.

edsavage added 3 commits May 1, 2026 11:54
- 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.sh to bump elasticsearchVersion (and update .backportrc.json when targeting main) with optional DRY_RUN=true.
  • Add a dedicated Buildkite pipeline YAML generator for Slack notifications in the version-bump pipeline.
  • Update .buildkite/job-version-bump.json.py to run the bump step and then poll staging/snapshot artifact JSON via elastic/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.

Comment thread dev-tools/bump_version.sh Outdated
edsavage and others added 12 commits May 1, 2026 14:10
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>
@edsavage edsavage requested a review from Copilot May 4, 2026 22:56
@edsavage edsavage marked this pull request as ready for review May 4, 2026 22:57
@elasticsearchmachine
Copy link
Copy Markdown

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread dev-tools/validate_version_bump_params.sh
Comment thread dev-tools/git_push_auth_probe.sh Outdated
Comment thread dev-tools/validate_version_bump_params.sh
Comment thread dev-tools/unittest/test_version_bump_validation.py Outdated
Comment thread dev-tools/run_dev_tools_tests.sh Outdated
Comment thread dev-tools/bump_version.sh Outdated
Comment thread dev-tools/unittest/test_version_bump_validation.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread dev-tools/git_push_auth_probe.sh Outdated
Comment thread dev-tools/validate_version_bump_params.sh Outdated
Comment thread .buildkite/job-version-bump.json.py
Comment thread dev-tools/run_dev_tools_tests.sh Outdated
edsavage and others added 8 commits May 5, 2026 13:19
… 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>
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.

4 participants