Skip to content

[ML] Skip Java ES integration tests for version-bump PRs (9.3) - #3088

Merged
edsavage merged 1 commit into
elastic:9.3from
edsavage:backport/skip-es-tests-9.3
Jul 23, 2026
Merged

[ML] Skip Java ES integration tests for version-bump PRs (9.3)#3088
edsavage merged 1 commit into
elastic:9.3from
edsavage:backport/skip-es-tests-9.3

Conversation

@edsavage

@edsavage edsavage commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Backports the ci:skip-es-tests / version-bump topic-branch detection from the minor-version-bump automation (#3064) to the 9.3 release 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-SNAPSHOT in 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 on main/9.5 but was missing here.

Changes (CI-only, self-contained):

  • .buildkite/ml_pipeline/config.py: add skip_version_bump_pr_ci (set by the ci:skip-es-tests label or a ci/ml-cpp-version-bump-* / ci/ml-cpp-minor-freeze-main-* topic branch).
  • .buildkite/pipeline.json.py: gate the ES-test upload steps on not config.skip_version_bump_pr_ci.

Test plan

  • pipeline.json.py generator: normal PR build keeps all ES-test steps; a version-bump branch (or the ci:skip-es-tests label) produces zero ES-test steps.
  • Confirm on a real version-bump PR against 9.3 that the Java ES IT steps no longer appear.

Made with Cursor

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>
@edsavage
edsavage requested a review from Copilot July 23, 2026 01:49
@edsavage
edsavage merged commit 66019fb into elastic:9.3 Jul 23, 2026
25 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_ci detection to .buildkite/ml_pipeline/config.py based on the ci:skip-es-tests label and version-bump topic-branch prefixes.
  • Gate the ES-test pipeline upload steps in .buildkite/pipeline.json.py on not 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.

Comment on lines +200 to +205
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
Comment on lines 52 to +55
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"))
@edsavage

Copy link
Copy Markdown
Contributor Author

Test plan item 2 — verified non-destructively

Confirmed 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 backport/skip-es-tests-9.3, no label: the pipeline contains all four ES IT steps:

  • Upload ES tests x86_64 runner pipeline + Java Integration Tests for x86_64
  • Upload ES tests aarch64 runner pipeline + Java Integration Tests for aarch64

Path 1 — topic branch (what the automation actually uses)build 2847, throwaway PR #3095 from ci/ml-cpp-version-bump-9.3-verify into 9.3 (identical commits to this PR, zero version changes): generated 18 steps, 0 ES/IT steps. PR and branch have been closed/deleted.

Path 2 — ci:skip-es-tests labelbuild 2848, same non-topic branch as baseline but with GITHUB_PR_LABELS=ci:skip-es-tests (exactly what the GitHub→Buildkite integration sets when the label is present): the top-level Upload ES tests … steps are absent (0 ES/IT steps). Isolates the label as the sole cause of the skip.

Both paths resolve via config.skip_version_bump_pr_ci in .buildkite/ml_pipeline/config.py gating the ES-test uploads in .buildkite/pipeline.json.py, matching the generator unit check in item 1.

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