Add --dev-stream filter and dev-channel support#436
Closed
bschwedler wants to merge 13 commits intomainfrom
Closed
Add --dev-stream filter and dev-channel support#436bschwedler wants to merge 13 commits intomainfrom
bschwedler wants to merge 13 commits intomainfrom
Conversation
Test Results1 334 tests 1 334 ✅ 8m 31s ⏱️ Results for commit c00b523. ♻️ This comment has been updated with latest results. |
This was referenced Apr 9, 2026
Filters development version loading to a specific release stream (e.g. 'daily', 'preview'). Streams that don't match are skipped before any HTTP requests are made to resolve versions. Added to: - bakery build --release-stream - bakery ci matrix --release-stream - bakery-build-native.yml (release-stream input) - bakery-build.yml (release-stream input) This enables image repo development.yml workflows to accept a stream parameter from upstream product repos, building only the relevant stream instead of all dev versions.
Use bracket notation for hyphenated input names in GitHub Actions expressions (inputs['release-stream'] not inputs.release-stream). Add test_load_dev_versions_release_stream_filter asserting that only the daily stream is loaded when release_stream="daily" and the preview stream is skipped.
Rename --release-stream to --dev-stream across CLI, config, and
workflows to match the existing --dev-versions naming convention.
Pass devVersion values dict into the product stream URL resolver
metadata. This allows stream URLs to use template variables from
bakery.yaml config, e.g.:
devVersions:
- sourceType: stream
product: workbench
stream: preview
values:
channel: apple-blossom
The stream URL can then use {channel} to resolve the upstream
branch codename without a CLI flag. ReleaseStreamPath.get() now
formats stream_url with metadata before fetching.
Reuses the existing --value key=value pattern and __make_value_map parser from create/update commands. Values override the devVersion values dict, which flows through to stream URL resolution. This allows workflows to pass e.g. --value channel=apple-blossom to override the channel used in a preview stream URL template. Renames set_values to values on BakeryConfigFilter to match the existing naming convention throughout the codebase.
Maps the dev-channel workflow input to --value channel={value}
when calling bakery ci matrix. This lets image repo development
workflows accept a branch codename from upstream dispatches
and override the channel in the devVersion config.
Both bakery-build-native.yml and bakery-build.yml accept the
new optional input. Empty string is a no-op.
Also adds test for values override in load_dev_versions.
Verifies that passing values={"channel": "globemaster-allium"}
overrides the default "latest" and propagates through to the
product artifact resolver.
Use bash arrays for bakery command construction in shared workflows. Inputs are quoted via env vars and conditionally appended, preventing word-splitting or metacharacter injection. Fix globemaster-allium test to assert mock was called and at least one call includes the expected channel value, preventing false-positive pass on zero calls.
Pass value_overrides through as_image_version() and get_version() instead of mutating dev_version.values in-place. The original devVersion model now stays unchanged after load_dev_versions(), preventing double-application on repeated calls and keeping the model consistent with the YAML config.
Catch KeyError from format_map on stream URLs and
raise a clear ValueError naming the missing placeholder
and suggesting --value to set it. This prevents an
unhelpful KeyError when URLs gain {channel} or similar
placeholders without the caller passing the value.
Rename __make_value_map to _make_value_map — the
double-underscore prefix triggers name mangling but
the function is imported across four CLI modules.
Add tests for ReleaseStreamPath with URL placeholders:
static URL, placeholder resolution, and missing key.
The matrix step was the only place passing --dev-stream and --value to bakery. Every subsequent step (build, test, merge, readme) re-invokes BakeryConfig which calls load_dev_versions() independently. Without the same overrides, URL resolution can produce a different version, causing the --image-version filter to find no match. Add --dev-stream and --value to the bakery run dgoss, bakery ci merge, and bakery ci readme CLI commands. Pass DEV_STREAM and DEV_CHANNEL env vars through to all workflow steps in both bakery-build-native.yml and bakery-build.yml.
8d5c9df to
fe11468
Compare
Add image-version input to bakery-build-native.yml and bakery-build.yml so callers can filter to a specific product version. Also add --image-version to bakery ci matrix for parity. This lets upstream dispatches target the exact version they just published rather than building all resolved dev versions.
Always pass BakeryConfigFilter to merge/readme settings instead of None when --value is empty. The default_factory handles empty values correctly; None fails validation. Update test import from __make_value_map to _make_value_map to match the rename in the previous commit.
This was referenced Apr 13, 2026
Use short repo names in subgraph labels, full workflow filenames with click links to GitHub, and explicit parameter names on all dispatch and workflow_call edges. Removes intermediate bot nodes from per-product diagrams so dispatch arrows go directly from product repo to image repo with parameters shown on the edge.
Contributor
|
Superseded by #457 |
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
--dev-streamfilter and--value key=valueoverride tobakery build,bakery ci matrix,bakery run dgoss,bakery ci merge, andbakery ci readmedev-streamanddev-channelinputs to both shared workflows (bakery-build-native.yml,bakery-build.yml) and plumb them through all steps (matrix, build, test, merge, readme)valuesdict through to stream URL resolution, enabling templated URLs (e.g.{channel}in preview stream URLs)as_image_version()/get_version()instead of mutating the devVersion model in-placeKeyErrorfromformat_mapon stream URLs and raise a clearValueErrornaming the missing placeholderHow this is invoked
Product repos dispatch
development.ymlin image repos, which forwardstream/channelto the shared workflows added here:Those image repo workflows are in turn dispatched by:
Context
Prerequisite for event-driven dev image builds (#302). Also enables #237 (Workbench preview release stream) — once this merges, adding a preview stream to Workbench is a
bakery.yamlconfig change.Test plan
channel=apple-blossomreplaces config default without mutating original modelchannel=globemaster-alliumreaches product artifact resolverbakery ci matrix --dev-versions only --dev-stream dailyfilters correctlybakery ci matrix --dev-versions only --value channel=apple-blossomoverrides URL