[ML] Make Appex QA/PyTorch tests version-aware on release branches#3115
Open
edsavage wants to merge 1 commit into
Open
[ML] Make Appex QA/PyTorch tests version-aware on release branches#3115edsavage wants to merge 1 commit into
edsavage wants to merge 1 commit into
Conversation
The downstream appex-qa-stateful-custom-ml-cpp-build-testing pipeline
(elastic/qaf-tests) defaults to ES_BRANCH=main and STACK_VERSION=<current
main SNAPSHOT>, then downloads ml-cpp-<version>-SNAPSHOT-linux-x86_64.zip
from the parent build. On a release-branch / backport build the parent
produced ml-cpp-<release-version>-SNAPSHOT-... instead, so the download
missed ('No artifacts found') and the QA/PyTorch build failed spuriously
(e.g. a 9.5 backport looking for 9.6.0-SNAPSHOT).
Derive STACK_VERSION from gradle.properties (the exact artifact version)
and ES_BRANCH by comparing to ml-cpp main's version (main for the current
dev line, else major.minor), and forward both through the QA and PyTorch
downstream triggers. For main builds the derived values equal today's
defaults, so only release-branch/backport builds change behaviour. No
qaf-tests change is required; it already supports these overrides and lists
the active release branches/versions.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pinging @elastic/ml-core (Team:ML) |
Contributor
Author
|
buildkite build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the spurious PyTorch/QA build failure seen on backport PRs (e.g. build 2879 on the [9.5] backport of #3081), where the synchronous Appex QA trigger went red with:
Root cause
The downstream
appex-qa-stateful-custom-ml-cpp-build-testingpipeline (generated byelastic/qaf-tests,pipeline_generators/local/ml-cpp-custom.py) downloads the ml-cpp artifact from the parent build (--build $BUILDKITE_TRIGGERED_FROM_BUILD_ID) but names it fromSTACK_VERSION, which defaults toACTIVE_VERSIONS[0](the current main SNAPSHOT), and builds ES fromES_BRANCH, which defaults tomain. On a release-branch/backport build the parent producedml-cpp-<release>-SNAPSHOT-...(e.g.9.5.0), so the9.6.0-SNAPSHOTlookup missed.ci:run-pytorch-testsis inherited by backport PRs, so every backport hit this. It didn't block merges (the gating status is posted by the launch step; the synchronous downstream result isn't a required check), but it produced a red, misleading job on every backport.Fix (ml-cpp side only — no
qaf-testschange)qaf-testsalready supportsSTACK_VERSION/ES_BRANCHoverrides and lists our release lines as active (main, 9.5, 9.4, 9.3, 8.19). We just need to pass the right values:.buildkite/pipelines/derive_qa_stack_env.sh:STACK_VERSION←gradle.propertieselasticsearchVersion(exactly the artifact version).ES_BRANCH←mainif this build's version equalsml-cppmain's version (fetched fromraw.githubusercontent.com/elastic/ml-cpp/main/gradle.properties, the same host the downstream already uses), else<major>.<minor>. This is self-updating — no hard-coded "current dev minor" to bump at feature freeze. Falls back to a branch-name heuristic if that fetch fails.GITHUB_PR_COMMENT_VAR_BRANCH/_VERSION), and writes only to stderr (the generators pipe stdout tobuildkite-agent pipeline upload).run_pytorch_tests.yml.shnow sources the helper and forwardsES_BRANCH/STACK_VERSIONinto the trigger (mirroringrun_qa_tests.yml.sh, which already forwarded them but had nothing to derive them).run_qa_tests.yml.shsources the same helper, so QA on backports gets the same treatment.Behaviour
main/9.6.0) → no change.9.5/9.5.0etc. → the parent's artifact matches and the custom ES distribution is built from the right branch.Dry-run of the generators confirms the emitted trigger YAML:
Note
The generator scripts live in the checked-out branch, so this must be backported to
9.5/9.4/8.19for their backport builds to benefit (same as theci:skip-es-testsfix). Backports will follow.Test plan
ES_BRANCH/STACK_VERSIONfor main and a simulated release build (done locally).ci:run-pytorch-teststriggers a downstream QA build that finds theml-cpp-<release>-SNAPSHOTartifact and runs (no "No artifacts found").ci:run-pytorch-testsare unaffected.Made with Cursor