Skip to content

[ML] Support pinning Elasticsearch to a commit SHA in QA/PyTorch runs - #3228

Merged
edsavage merged 1 commit into
elastic:mainfrom
edsavage:feature/qa-es-commit-pin
Oct 8, 2026
Merged

edsavage merged 1 commit into
elastic:mainfrom
edsavage:feature/qa-es-commit-pin

Conversation

@edsavage

@edsavage edsavage commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an optional ES_COMMIT passthrough to the appex-qa-stateful-custom-ml-cpp-build-testing trigger generated by:

  • .buildkite/pipelines/run_qa_tests.yml.sh — the generator used by ml-cpp-pr-builds for QA-only and combined QA + PyTorch runs
  • .buildkite/pipelines/run_pytorch_tests.yml.sh — the generator used by the debug pipeline's PyTorch run

When ES_COMMIT is set in the build environment it is forwarded to the downstream appex-qa build, where qaf-tests (ElasticsearchRepoTask) checks out that exact commit after cloning ES_BRANCH. The block is emitted only when ES_COMMIT is non-empty, so default runs are unchanged. This mirrors the existing ES_BRANCH / STACK_VERSION handling.

Motivation

While investigating a nightly QA failure (#3226) we needed to run an ml-cpp build against the contemporaneous Elasticsearch source, not the moving tip of main. Without pinning, the QA harness clones the latest ES, which can have advanced past the ml-cpp artifact — e.g. the verifyControllerProtocolVersion compatibility gate — failing the local ES distribution build before any QA workload runs. ES_COMMIT makes the ES side reproducible.

Test plan

  • bash -n syntax check on both scripts
  • Functional smoke: with ES_COMMIT set, the generated trigger env contains both ES_BRANCH and ES_COMMIT; with it unset, only ES_BRANCH is emitted (no empty ES_COMMIT line)
  • Trigger a QA/PyTorch run with ES_COMMIT=<sha> and confirm the appex-qa build checks out that commit

Made with Cursor

Add an optional ES_COMMIT passthrough to the appex-qa trigger generated by
both run_qa_tests.yml.sh (QA-only and combined QA+PyTorch runs) and
run_pytorch_tests.yml.sh (the debug pipeline's PyTorch run). When ES_COMMIT
is set in the build environment it is forwarded to the downstream
appex-qa-stateful-custom-ml-cpp-build-testing build, where qaf-tests
(ElasticsearchRepoTask) checks out that exact commit after cloning ES_BRANCH.

This mirrors the existing ES_BRANCH / STACK_VERSION handling and lets us test
an ml-cpp build against a contemporaneous Elasticsearch source revision rather
than the moving tip of a branch. That is essential when the current ES main
has advanced past an ml-cpp artifact (e.g. the verifyControllerProtocolVersion
compatibility gate), which otherwise fails the local ES distribution build
before any QA workload runs.

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

Copy link
Copy Markdown

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

@wwang500 wwang500 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 👍

@edsavage
edsavage merged commit 7fa9cff into elastic:main Oct 8, 2026
31 checks passed
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