Add newly cut minor branch to snapshot build pipeline during minor freeze#3074
Merged
edsavage merged 4 commits intoJul 15, 2026
Merged
Conversation
The minor-freeze automation cut the release branch and bumped main but did not add the new branch to the daily snapshot build pipeline in catalog-info.yaml, so the branch got no daily SNAPSHOT builds (and scheduled builds would be blocked by the filter_condition). This was missed for 9.5. - update_catalog_snapshot.py: scoped, comment-preserving edit that adds the branch to the snapshot pipeline filter_condition (newest-first) and inserts a "Daily <branch>" schedule with the next free half-past-hour slot. Idempotent and touches only the snapshot pipeline block. - bump_main_minor_freeze.sh (Leg B): invoke the updater so the change lands in the same PR into main as the .backportrc.json update. - catalog-info.yaml: register the already-cut 9.5 branch (fills the current gap). - Add unit tests, including a real-file validity/uniqueness check. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pinging @elastic/ml-core (Team:ML) |
There was a problem hiding this comment.
Pull request overview
Adds automation to ensure newly cut MAJOR.MINOR release branches are registered in the Backstage/Buildkite snapshot pipeline (catalog-info.yaml) during minor freeze, and patches the current gap by registering 9.5. This prevents newly cut branches from being blocked by the snapshot pipeline filter_condition and ensures they receive daily SNAPSHOT builds.
Changes:
- Add
dev-tools/update_catalog_snapshot.pyto perform a scoped, comment-preserving text edit of the snapshot pipeline’sfilter_conditionandschedules(idempotent). - Invoke the updater from
dev-tools/bump_main_minor_freeze.shso the catalog update lands alongside the main bump/backport config changes in Leg B. - Update
catalog-info.yamlto include9.5in the snapshot filter and add aDaily 9.5schedule; add unit tests covering insertion/ordering/idempotency and real-file YAML validity checks.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dev-tools/update_catalog_snapshot.py | New updater script to add a release branch to snapshot pipeline filter + daily schedule via comment-preserving text transform. |
| dev-tools/unittest/test_update_catalog_snapshot.py | New pytest coverage for filter/schedule insertion logic, idempotency, scoping, and real catalog-info.yaml YAML validity/cron uniqueness. |
| dev-tools/bump_main_minor_freeze.sh | Calls the new updater and includes catalog-info.yaml in the Leg B commit/PR body summary. |
| catalog-info.yaml | Registers branch 9.5 for snapshot builds (filter condition + Daily 9.5 schedule). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When the snapshot schedules block has no "Daily main" entry, append the new schedule after the last existing entry (before the next sibling key) instead of prepending right after "schedules:", matching the documented behaviour. Add a regression test for the fallback path. Co-authored-by: Cursor <cursoragent@cursor.com>
valeriy42
reviewed
Jul 13, 2026
- Use a sentinel branch (99.0) that will never ship for the real-catalog tests, so they don't flip to a no-op and fail confusingly once a plausible version is released. - Add test_partial_state_schedule_only_is_completed covering the inverse partial state (schedule present, filter absent). Co-authored-by: Cursor <cursoragent@cursor.com>
7.17 is no longer supported and there is no longer anywhere to upload its build artifacts, so drop it from the snapshot pipeline filter_condition and daily schedule. Removal of EOL branches is a manual step, independent of the minor-freeze automation. Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
valeriy42
approved these changes
Jul 15, 2026
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
The minor-freeze automation cuts the release branch and bumps
main, but it did not register the new branch in the daily snapshot build pipeline defined incatalog-info.yaml. As a result the newly cut branch got no daily SNAPSHOT builds, and any scheduled/triggered build for it would be blocked by the snapshot pipeline'sfilter_condition. This was missed for9.5.This PR both automates the registration for future freezes and fixes the current gap by adding
9.5.Changes
dev-tools/update_catalog_snapshot.py(new): a scoped, comment-preserving text edit (stdlib only — no YAML round-trip, so comments/formatting are preserved) that, for aMAJOR.MINORbranch:build.branch == "<branch>"to the snapshot pipelinefilter_condition, immediately aftermain(newest-first ordering);Daily <branch>schedule (beforeDaily main) with the next free "half past the hour" cron slot (30 HH * * *), avoiding collisions with existing schedules.MAJOR.MINORvia regex and has no schedules).dev-tools/bump_main_minor_freeze.sh(Leg B): invokes the updater so thecatalog-info.yamlchange lands in the same PR intomainas the.backportrc.jsonupdate. The PR summary/body now lists the snapshot change.catalog-info.yaml: registers the already-cut9.5branch (filter +Daily 9.5@30 05 * * *).dev-tools/unittest/test_update_catalog_snapshot.py(new): unit tests for filter/schedule insertion, ordering, next-free-hour selection, idempotency, partial-state completion, input validation, section scoping, plus a check that editing the realcatalog-info.yamlyields valid YAML with unique cronlines.Diff to the live file
Test plan
python3 -m pytest dev-tools/unittest/ -qpasses (73 passed, 2 git-integration skipped)bash -n dev-tools/bump_main_minor_freeze.shOKcatalog-info.yamlparses as valid YAML; all snapshot cronlines remain unique9.5is a no-op (idempotent)mainincludes the newDaily <branch>schedule + filter entryNotes / follow-ups
max(existing hour) + 1at30 HH. With branches being EOL'd over time this won't realistically exhaust the 0–23 range; the script errors clearly if it ever would, prompting a prune of EOL schedules.Related
Made with Cursor