ci: add main-branch DRA check for minor version-bump workflow - #7557
ci: add main-branch DRA check for minor version-bump workflow#7557ninalee12 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the Buildkite version-bump pipeline to validate that, for minor bumps, the post-bump main (GCS alias master.json) DRA snapshot actually publishes the next dev minor (e.g. 9.5.0 → 9.6.0-SNAPSHOT). This closes a gap where minor bump pipelines could succeed while main never advanced to the new -SNAPSHOT.
Changes:
- Add a minor-workflow-gated step that computes the next dev minor from
NEW_VERSIONand dynamically uploads a follow-on step. - Add a dynamically uploaded step that polls
master.jsonon GCS viaelastic/json-watcheruntil.versionmatches${next_minor}-SNAPSHOT.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This pull request does not have a backport label. Could you fix it @ninalee12? 🙏
|
This comment has been minimized.
This comment has been minimized.
1b72620 to
6b213a5
Compare
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.
Suppressed comments (2)
.buildkite/pipeline.version-bump.yaml:128
- This heredoc still references
next_main; if you rename the version variable (e.g. tonext_minor), update the embedded pipeline YAML consistently so the uploaded step uses the same computed version string.
- echo "Polling $$next_main-SNAPSHOT on master..."
timeout_in_minutes: 240
retry:
automatic:
- exit_status: "*"
.buildkite/pipeline.version-bump.yaml:112
- The variable name
next_mainis misleading here: it holds the next minor version derived fromNEW_VERSION, not something “main”-specific. Renaming it to something likenext_minor(ornext_dev_minor) will make the intent clearer and avoid confusion when maintaining this script.
This issue also appears on line 124 of the same file.
next_main="$$major.$$((minor + 1)).0"
echo "Waiting for $$next_main-SNAPSHOT on master"
Adds a generate-master-dra-check step (minor workflow only) that
computes the next minor version and dynamically uploads a
fetch-master-dra-artifacts step to poll master.json for
{major}.{minor+1}.0-SNAPSHOT, confirming the main branch DRA
build has picked up the new version.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Suppressed comments (4)
.buildkite/pipeline.version-bump.yaml:125
- In the dynamically uploaded step,
$$next_mainwill expand to the shell PID if it reaches the shell unmodified. Since this heredoc is already evaluated by the shell, prefer standard$next_mainhere so the generated YAML is correct without relying on any additional preprocessing.
command:
- echo "Polling $$next_main-SNAPSHOT on master..."
timeout_in_minutes: 240
.buildkite/pipeline.version-bump.yaml:137
expected_valuein the uploaded YAML should use the shell variable expansion fornext_main. Using$$next_mainrisks producing an incorrect value (PID concatenation) if not rewritten before the shell expands it.
field: ".version"
expected_value: "$$next_main-SNAPSHOT"
polling_interval: "30"
.buildkite/pipeline.version-bump.yaml:112
- The shell script uses
$$...for variable expansion (e.g.$$major,$${NEW_VERSION}). In POSIX shells$$expands to the process ID, so this relies on external preprocessing to rewrite$$into$and is easy to misread/break if the command is ever run without that preprocessing. Use normal shell variable expansions ($NEW_VERSION,$major, etc.) to keep this step self-contained and predictable.
This issue also appears in the following locations of the same file:
- line 123
- line 135
IFS='.' read -r major minor patch <<EOF
$${NEW_VERSION}
EOF
for part in "$$major" "$$minor" "$$patch"; do
case "$$part" in
.buildkite/pipeline.version-bump.yaml:117
- The dynamically uploaded step has a fixed
key. Ifgenerate-master-dra-checkis retried (manual or via a retry policy added later), it will attempt to upload another step with the same key, which can cause the upload to fail or the pipeline to become non-idempotent. Since nothing references this key, consider omitting it to make retries safer.
- label: "Fetch master DRA Artifacts"
key: fetch-master-dra-artifacts
depends_on: generate-master-dra-check
TL;DRThe failing Remediation
Investigation detailsRoot CauseThis is a configuration/CI orchestration failure in source checkout, not a test/code failure from this PR diff. The job fetches
That target commit is unavailable in the local object graph after fetch, causing PR diff context: only Evidence
Verification
Follow-up
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
6b213a5 to
5a131c9
Compare
|
Tick the box to add this pull request to the merge queue (same as
|
Description
During the recent minor version bump (9.5), each team's version-bump pipeline advanced
mainto the next dev minor (9.6.0-SNAPSHOT) in addition to cutting the release branch. The version-bump pipelines currently verify only that the release-branch DRA artifacts landed (staging + snapshot for${BRANCH}.json) — they do not verify that main's DRA snapshot actually published at the new version.This means a minor bump can report success even if main's DRA pipeline never picked up
9.6.0-SNAPSHOT. The gap was identified during the9.5feature freeze. Only ml-cpp and kibana had a main-branch check; this brings the remaining repos up to the same standard.Tracking: elastic/platform-engineering-productivity#3012
What
Adds a two-step sequence, gated on
WORKFLOW=minor:generate-master-dra-check— runs afterfetch-dra-artifacts. Computes the next dev minor fromNEW_VERSION(e.g.9.5.0→9.6.0) and dynamically uploads a child step viabuildkite-agent pipeline upload.fetch-master-dra-artifacts(uploaded at runtime) — pollsmaster.jsonon GCS withelastic/json-watcheruntil.versionequals${next_minor}-SNAPSHOT.Patch and major bumps are unaffected — the
if: build.env("WORKFLOW") == "minor"guard means neither step is uploaded.Notes
master.json(notmain.json).NEW_VERSION, notBRANCH.