feat: apply --dev-spec to dependency-sourced dev versions#607
Merged
Conversation
…ersions Lift version_override from the stream model to BaseImageDevelopmentVersion and short-circuit ImageDevelopmentVersionFromDependency.get_version() on it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Broaden _apply_dev_spec() to match either dev-version model by channel via get_release_channel(). version pins both models; release_branch stays stream-only; a branch-only spec warns and skips dependency dev versions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address code review: move import logging to module top per project convention and verify a single warning record is emitted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Note that the stream model forwards it to the channel resolver for URL construction while the dependency model returns it directly from get_version(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Test Results1 869 tests 1 869 ✅ 8m 13s ⏱️ Results for commit eaff40e. |
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-speccould pin the built version for stream / product-channel dev versions, but was a silent no-op for dependency-sourced dev versions (ImageDevelopmentVersionFromDependency, used byworkbench-positron-init)._apply_dev_spec()only matched the stream model, so dispatching a pinned Positron version still built the latest daily.This PR makes
--dev-specpin what's built for dependency dev versions too:version_overridetoBaseImageDevelopmentVersionso both dev-version models share one override slot (stream model's duplicate field removed; behavior unchanged).ImageDevelopmentVersionFromDependency.get_version()honors the override — short-circuits before dependency-CDN resolution. Sufficient because the dev Containerfile builds the Positron download URL from{{ Image.Version }}, which derives fromget_version()._apply_dev_spec()matches either model by channel viaget_release_channel().versionpins both;release_branch/YYYY.MM logic stays stream-only; a branch-only spec (no version) cannot pin a dependency dev version, so it warns and falls back to latest.No
DevBuildSpecschema change — Positron versions already satisfy the CalVer validation, and channel-based matching reuses existing fields.Known limitation (unchanged from existing behavior)
A single
--dev-specapplies to every image in the loaded config; channel matching + the per-image single-candidate rule + CI per-image--filterscope it in practice.Test Plan
versionpins a dependency dev version'sget_version(); channel match/mismatch; ambiguity (mixed stream+dependency on same channel) errors; branch-only spec warns and skips;release_branchignored for dependency versions.uv run pytest -m "not slow"→ 1777 passed (pre-existingtest/cli/*collection cwd-pollution errors are present onmaintoo and unrelated).uv run ruff checkclean.🤖 Generated with Claude Code