[ML] Skip Java ES integration tests for version-bump PRs (9.3) - #3088
Conversation
Backport the ci:skip-es-tests / version-bump topic-branch detection from the minor-version-bump automation (elastic#3064) so automated patch version-bump PRs on this release branch skip the Java ES integration test pipelines. These tests cannot resolve the ml-cpp SNAPSHOT dependency after a version bump (the ES branch still references the previous patch), so they fail spuriously on what are metadata-only changes. The PR pipeline is generated from the checked-out branch, so this gating must exist on each release branch that receives automated version bumps. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Backports version-bump PR detection to the 9.3 release branch’s Buildkite PR pipeline generation so automated patch version-bump PRs can skip the Java ES integration-test runner pipelines that commonly fail due to transient SNAPSHOT dependency resolution.
Changes:
- Add
skip_version_bump_pr_cidetection to.buildkite/ml_pipeline/config.pybased on theci:skip-es-testslabel and version-bump topic-branch prefixes. - Gate the ES-test pipeline upload steps in
.buildkite/pipeline.json.pyonnot config.skip_version_bump_pr_ci.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .buildkite/pipeline.json.py | Skips uploading ES-test runner pipelines when skip_version_bump_pr_ci is set. |
| .buildkite/ml_pipeline/config.py | Introduces label/branch-based detection logic and stores it on Config.skip_version_bump_pr_ci. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def should_skip_version_bump_pr_ci() -> bool: | ||
| """Return True when PR CI should omit the Java ES integration test steps.""" | ||
|
|
||
| config = Config() | ||
| config.parse() | ||
| return config.skip_version_bump_pr_ci |
| if config.build_x86_64: | ||
| pipeline_steps.append(pipeline_steps.generate_step("Upload ES tests x86_64 runner pipeline", | ||
| ".buildkite/pipelines/run_es_tests_x86_64.yml.sh")) | ||
| if not config.skip_version_bump_pr_ci: | ||
| pipeline_steps.append(pipeline_steps.generate_step("Upload ES tests x86_64 runner pipeline", | ||
| ".buildkite/pipelines/run_es_tests_x86_64.yml.sh")) |
Test plan item 2 — verified non-destructivelyConfirmed on real 9.3 PR builds that the Java ES IT steps disappear, without performing any version bump (no version files touched, no release branch cut). The skip fires on the branch name or the label — neither needs a real bump — so both trigger paths were exercised and each build was cancelled right after the dynamic-pipeline upload step (no full multi-platform runs consumed). Baseline (no trigger) — build 2828, branch
Path 1 — topic branch (what the automation actually uses) — build 2847, throwaway PR #3095 from Path 2 — Both paths resolve via |
Summary
Backports the
ci:skip-es-tests/ version-bump topic-branch detection from the minor-version-bump automation (#3064) to the9.3release branch.Automated patch version-bump PRs on release branches currently run the Java ES integration test pipelines, which fail spuriously: after the bump the ES branch still references the previous ml-cpp
SNAPSHOT, so the build cannot resolve the dependency (e.g.Could not find org.elasticsearch.ml:ml-cpp:9.4.4-SNAPSHOTin ml-cpp-pr-builds #2825). The PR pipeline is generated from the checked-out branch, so the skip logic must exist on each release branch that receives version bumps — it is present onmain/9.5but was missing here.Changes (CI-only, self-contained):
.buildkite/ml_pipeline/config.py: addskip_version_bump_pr_ci(set by theci:skip-es-testslabel or aci/ml-cpp-version-bump-*/ci/ml-cpp-minor-freeze-main-*topic branch)..buildkite/pipeline.json.py: gate the ES-test upload steps onnot config.skip_version_bump_pr_ci.Test plan
pipeline.json.pygenerator: normal PR build keeps all ES-test steps; a version-bump branch (or theci:skip-es-testslabel) produces zero ES-test steps.9.3that the Java ES IT steps no longer appear.Made with Cursor