[ML] Run QA and PyTorch suites concurrently in a single triggered build - #3131
Conversation
When both ci:run-qa-tests and ci:run-pytorch-tests are requested, emit a single Appex QA trigger passing a comma-separated QAF_TESTS_TO_RUN so the appex-qa generator fans them into concurrent parallel jobs, instead of two separate triggered builds that collided under the appex pipeline's skip_queued_branch_builds (one was skipped). Single-suite behaviour is unchanged.
|
Pinging @elastic/ml-core (Team:ML) |
There was a problem hiding this comment.
Pull request overview
This PR updates the ml-cpp PR Buildkite pipeline generator to avoid QA and PyTorch downstream build collisions by triggering one appex-qa downstream build when both suites are requested, using a comma-separated QAF_TESTS_TO_RUN so the downstream generator can fan out suites into parallel jobs.
Changes:
- Merge the QA and PyTorch downstream trigger logic into a single trigger step gated on
run_qa_tests || run_pytorch_tests. - Build
QAF_TESTS_TO_RUNasml_cpp_pr,pytorch_tests, orml_cpp_pr,pytorch_testsdepending on requested suites.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…gger step Co-authored-by: Cursor <cursoragent@cursor.com>
|
addressed both of copilot's comments in
Verified with local dry-runs: QA-only, PyTorch-only, both, both + a pytorch-inclusive override (de-dups), and a QA subset override — all produce the expected |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.buildkite/pipeline.json.py:107
- For PyTorch-only runs (
config.run_pytorch_teststrue,config.run_qa_testsfalse) this change switches the runner upload torun_qa_tests.yml.sh. That script emits steps labeled/commit-statused as “QA Tests”, which is misleading and also changes the commit status context compared to the previousrun_pytorch_tests.yml.shbehavior. Consider keepingrun_pytorch_tests.yml.shfor the PyTorch-only case and usingrun_qa_tests.yml.shonly when QA is involved (QA-only or QA+PyTorch).
# De-duplicate while preserving order so an override that already
# includes pytorch_tests does not produce a duplicate suite.
env["QAF_TESTS_TO_RUN"] = ",".join(dict.fromkeys(qa_suites))
pipeline_steps.append(pipeline_steps.generate_step("Upload QA/PyTorch tests runner pipeline",
".buildkite/pipelines/run_qa_tests.yml.sh"))
The consolidated single trigger uploaded run_qa_tests.yml.sh for every combination, so a PyTorch-only or combined run was mislabelled "QA Tests" and posted the QA commit-status context. Derive a descriptor (QA / PyTorch / QA + PyTorch) from QAF_TESTS_TO_RUN and use it for the step label, echo and github_commit_status context. Substring matching keeps it correct for marker expressions like "ml_cpp_pr and not slow". Addresses a Copilot review note on elastic#3131. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the low-confidence note from the latest Copilot review (re: PyTorch-only runs being labelled/commit-statused as "QA Tests"). Rather than partially reverting to
Substring matching keeps it correct for marker expressions (e.g. |
💔 Some backports could not be created
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
…ld (#3131) (#3133) When both ci:run-qa-tests and ci:run-pytorch-tests are requested, emit a single Appex QA trigger passing a comma-separated QAF_TESTS_TO_RUN so the appex-qa generator fans them into concurrent parallel jobs, instead of two separate triggered builds that collided under the appex pipeline's skip_queued_branch_builds (one was skipped). Single-suite behaviour is unchanged. (cherry picked from commit 420b561) Co-authored-by: Ed Savage <ed.savage@elastic.co>
…ld (#3131) (#3132) When both ci:run-qa-tests and ci:run-pytorch-tests are requested, emit a single Appex QA trigger passing a comma-separated QAF_TESTS_TO_RUN so the appex-qa generator fans them into concurrent parallel jobs, instead of two separate triggered builds that collided under the appex pipeline's skip_queued_branch_builds (one was skipped). Single-suite behaviour is unchanged. (cherry picked from commit 420b561) Co-authored-by: Ed Savage <ed.savage@elastic.co>
Summary
When both the QA (
ml_cpp_pr) and PyTorch suites are requested on a PR, trigger a single downstream appex-qa build with a comma-separatedQAF_TESTS_TO_RUNinstead of two separate trigger steps.Previously the two suites were triggered as independent downstream builds. Because the
appex-qa-stateful-custom-ml-cpp-build-testingpipeline hasskip_queued_branch_builds=true, two builds on the same branch collided and one suite was silently skipped. Emitting a single trigger with both markers lets the appex-qa generator fan them out into concurrent parallel jobs.Changes
.buildkite/pipeline.json.py: merge therun_qa_tests/run_pytorch_teststrigger blocks into one.QAF_TESTS_TO_RUNis built from the requested suites:ml_cpp_prpytorch_testsml_cpp_pr,pytorch_testsThe separate PyTorch allowlist-validation step is unaffected.
This is Part B. It depends on Part A — the appex-qa generator change in
elastic/qaf-tests#309— which teaches the generator to split a comma-separatedQAF_TESTS_TO_RUNinto parallel jobs. qaf-tests#309 must merge first. Until then, requesting both labels would passml_cpp_pr,pytorch_teststo the old generator, which treats it as a single invalid pytest-mexpression. Single-suite requests are unaffected.Testing
QAF_TESTS_TO_RUNfor QA-only, PyTorch-only, and both-labels cases.