[ML] Fix analytics steps failing when not all platforms are built#3003
Open
edsavage wants to merge 1 commit intoelastic:mainfrom
Open
[ML] Fix analytics steps failing when not all platforms are built#3003edsavage wants to merge 1 commit intoelastic:mainfrom
edsavage wants to merge 1 commit intoelastic:mainfrom
Conversation
The check_build_regression, ingest_build_timings, and analyze_build_timings pipeline steps had hardcoded depends_on entries for all four platform build step keys. When a PR build only builds a subset of platforms (controlled by CI labels or comments), the missing step keys cause Buildkite to reject the pipeline upload with "Step dependencies not found". Fix by having the pipeline generators (pipeline.json.py and branch.json.py) compute which step keys will actually exist and pass them as ML_BUILD_STEP_KEYS / ML_TEST_STEP_KEYS environment variables. The shell scripts then emit depends_on entries dynamically from these env vars. Made-with: Cursor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This PR fixes Buildkite pipeline uploads failing when PR/branch builds only include a subset of platform build/test steps by ensuring analytics steps only depend on step keys that actually exist for the current build configuration.
Changes:
- Compute the set of platform build/test step keys in the pipeline generators and expose them via
ML_BUILD_STEP_KEYS/ML_TEST_STEP_KEYSenvironment variables. - Update analytics pipeline upload scripts to dynamically emit
depends_onentries from those environment variables instead of hardcoding all platforms. - Quote heredocs in the affected
.yml.shgenerators to prevent unintended variable expansion while generating YAML.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .buildkite/pipelines/ingest_build_timings.yml.sh | Dynamically generates depends_on from ML_BUILD_STEP_KEYS to avoid missing dependency keys. |
| .buildkite/pipelines/check_build_regression.yml.sh | Dynamically generates depends_on from ML_BUILD_STEP_KEYS to avoid missing dependency keys. |
| .buildkite/pipelines/analyze_build_timings.yml.sh | Dynamically generates depends_on from ML_TEST_STEP_KEYS to avoid missing dependency keys. |
| .buildkite/pipeline.json.py | Computes ML_BUILD_STEP_KEYS for PR builds and sets it in pipeline env. |
| .buildkite/branch.json.py | Computes ML_BUILD_STEP_KEYS and ML_TEST_STEP_KEYS for branch builds and sets them in pipeline env. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
edsavage
added a commit
to edsavage/ml-cpp
that referenced
this pull request
Mar 20, 2026
Apply the same fix as PR elastic#3003 to the analyze_build_failure step: compute which build step keys will exist based on the platform config and pass them as ML_BUILD_STEP_KEYS for the shell script to use in its depends_on section. This prevents "Step dependencies not found" errors when not all platforms are built. Made-with: Cursor
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
check_build_regression,ingest_build_timings, andanalyze_build_timingspipeline steps had hardcodeddepends_onentries for all four platform build step keys. When a PR build only builds a subset of platforms (controlled by CI labels or comments), the missing step keys cause Buildkite to reject the pipeline upload with "Step dependencies not found".pipeline.json.pyandbranch.json.py) compute which step keys will actually exist and pass them asML_BUILD_STEP_KEYS/ML_TEST_STEP_KEYSenvironment variables. The shell scripts then dynamically emit only thedepends_onentries for steps that exist in the current build.Test plan
pipeline.json.pyoutputs correctML_BUILD_STEP_KEYSfor default (all platforms) configpipeline.json.pyoutputs onlybuild_test_linux-x86_64-RelWithDebInfowhen restricted toci:build-linux,ci:build-x86_64check_build_regression.yml.shemits correct YAML with single keycheck_build_regression.yml.shemits correct YAML with all keysingest_build_timings.yml.shemits correct YAMLanalyze_build_timings.yml.shemits correct YAMLbranch.json.pyoutputs bothML_BUILD_STEP_KEYSandML_TEST_STEP_KEYSMade with Cursor