Skip to content

Add dependency-backed dev version and Positron daily channel#567

Merged
bschwedler merged 17 commits into
mainfrom
positron-init-preview-stream
Jun 11, 2026
Merged

Add dependency-backed dev version and Positron daily channel#567
bschwedler merged 17 commits into
mainfrom
positron-init-preview-stream

Conversation

@bschwedler

@bschwedler bschwedler commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Positron's CDN URL is arch-parameterized, which doesn't fit the existing product channel model. Routing through the dependency constraint system reuses the arch-handling logic already in PositronDependency rather than duplicating it.

Stacked on:

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Test Results

1 803 tests  +50   1 803 ✅ +50   8m 19s ⏱️ -28s
    1 suites ± 0       0 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit f5c88ac. ± Comparison against base commit b1487c9.

♻️ This comment has been updated with latest results.

Base automatically changed from dev-stream-deprecation-tests to worktree-dev-build-dispatch June 5, 2026 15:15

@ianpittwood ianpittwood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates a bit of weirdness where Positron is considered as both a dependency and a product. We'll need to make it live in one of those worlds. I would vote for keeping it a dependency and finding a way to implement dev version or prerelease behaviors with dependency matrix builds.

I would still like a --latest flag for building matrix builds to single out the latest image only. Maybe a similar concept could be implemented for --pre-release to build the an image with dependency pre-releases if defined/available?

@ianpittwood

Copy link
Copy Markdown
Contributor

Another idea, we could move it fully into the product world and make a section for matrix.productConstraints that would work through the product resolver workflow.

@bschwedler bschwedler force-pushed the worktree-dev-build-dispatch branch 3 times, most recently from e754ad3 to 56b82eb Compare June 8, 2026 15:55
@bschwedler bschwedler force-pushed the positron-init-preview-stream branch 4 times, most recently from 5af4cc6 to 8626fc7 Compare June 8, 2026 16:39
@bschwedler bschwedler force-pushed the worktree-dev-build-dispatch branch from f6f027d to cea46e4 Compare June 8, 2026 17:24
@bschwedler bschwedler force-pushed the positron-init-preview-stream branch from 8626fc7 to 9706fbb Compare June 8, 2026 17:24
@bschwedler bschwedler force-pushed the worktree-dev-build-dispatch branch from cea46e4 to ca1be12 Compare June 8, 2026 20:10
@bschwedler bschwedler force-pushed the positron-init-preview-stream branch from 9706fbb to 3791b34 Compare June 9, 2026 14:45
@bschwedler bschwedler changed the title Add positron daily channel to bakery product map Add dependency-backed dev version and Positron daily channel Jun 9, 2026
Base automatically changed from worktree-dev-build-dispatch to main June 9, 2026 17:02
@bschwedler bschwedler force-pushed the positron-init-preview-stream branch from 3791b34 to 2c81ace Compare June 9, 2026 18:00
@bschwedler bschwedler requested a review from ianpittwood June 9, 2026 18:00

@ianpittwood ianpittwood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the mechanism makes more sense now, but we're missing docs updates. I would also like to possibly see a test suite or a more rigidly defined example of the configuration in action.

@bschwedler bschwedler requested a review from ianpittwood June 9, 2026 21:34
@bschwedler

Copy link
Copy Markdown
Contributor Author

I think the mechanism makes more sense now, but we're missing docs updates. I would also like to possibly see a test suite or a more rigidly defined example of the configuration in action.

I've updated the documentation and extended the test suite.

@ianpittwood

Copy link
Copy Markdown
Contributor

I think the mechanism makes more sense now, but we're missing docs updates. I would also like to possibly see a test suite or a more rigidly defined example of the configuration in action.

I've updated the documentation and extended the test suite.

Uhhhh I don't see any commits since my last review? Did they not push or is GitHub having a goof?

@bschwedler

Copy link
Copy Markdown
Contributor Author

Uhhhh I don't see any commits since my last review? Did they not push or is GitHub having a goof?

I forgot to push 🤦🏻

@bschwedler bschwedler force-pushed the positron-init-preview-stream branch from 6ead903 to 0a6f341 Compare June 11, 2026 18:56
ci merge, ci readme, clean cache-registry, clean temp-registry,
get tags, and run dgoss all received the deprecated --dev-stream
alias and coalesce block in the dev-build-dispatch branch, but
only bakery build and ci matrix had CLI coverage for that behavior.

Each command gets two tests: --dev-stream alone coalesces to
dev_channel, and --dev-channel takes precedence when both are given.
Both test_dev_spec.py and test_dev_stream_deprecated.py duplicated
the same from_context call-args extraction logic. Extract it to
test/cli/conftest.py as settings_from_call so there is one place
to update if the calling convention changes.
Add ProductEnum.POSITRON and support for DAILY release
channel. The POSITRON_DAILY_CDN_URL_TEMPLATE includes a
{positron_cdn_arch} placeholder that will be formatted at
fetch time by Task 3.
Add POSITRON to product_release_channel_url_map with a DAILY channel
backed by POSITRON_DAILY_CDN_URL_TEMPLATE. The channel URL contains a
{positron_cdn_arch} placeholder resolved via format_map before the
HTTP request, so the URL is arch-aware.

- Add positron_cdn_arch and positron_pkg_arch keys to
  _make_resolver_metadata (amd64 → x86_64/x64)
- Apply format_map(metadata) to channel_url before fetching so
  {positron_cdn_arch} resolves; no-op for static URLs used by
  existing products
- Add POSITRON_DAILY_CDN_URL_TEMPLATE import
- Add 4 parametrized test cases for the new metadata keys
Created positron_daily_x86_64.json and positron_daily_arm64.json
testdata files and added URL pattern matching in the
patch_testdata_response fixture to map requests to the POSITRON_DAILY
CDN endpoints to the local testdata files for unit tests.
The x86_64 identifier is used in some contexts (e.g., RHEL 9) and
should map to the same CDN paths and package architecture as amd64,
not trigger a fallback to x86_64 in the package arch mapping.

Added test coverage for rocky, alma, and rhel with the x86_64
identifier to prevent regression.
Verify that pinned version_override bypasses the network call to
CachedSession by asserting the mock is never called. This prevents
future regressions where the offline path could be broken but the
test would still pass due to CDN returning matching data by
coincidence.
Positron was tracked as both a dependency (via SupportedDependencies.POSITRON
in the matrix) and a product (via ProductEnum.POSITRON for daily preview
builds), creating a dual-world conflict raised in issue #472.

This replaces the product-side Positron code entirely with a generic
ImageDevelopmentVersionFromDependencyPrerelease type (sourceType:
dependency-prerelease) that resolves its version through the existing
dependency constraint infrastructure with prerelease=True. The
Containerfile template handles download URL construction from Image.Version
and values passed via the devVersions values: field.

- Add POSITRON_DAILY_URL_TEMPLATE to dependencies/const.py
- Add prerelease: bool and daily_url() to PositronDependency; update
  _fetch_versions() to append the daily build when prerelease=True
- Add ImageDevelopmentVersionFromDependencyPrerelease (sourceType:
  dependency-prerelease) in dev_version/dependency.py; register in
  DevelopmentVersionTypes union
- Remove ProductEnum.POSITRON, POSITRON_DAILY_CDN_URL_TEMPLATE, and all
  product-side Positron resolver code from posit_product/
- Move positron daily testdata from posit_products/ to dependencies/
- Update conftest mock routing from product const to dependency const
Rename ImageDevelopmentVersionFromDependencyPrerelease to
ImageDevelopmentVersionFromDependency and change sourceType from
"dependency-prerelease" to "dependency".

Add a prerelease: bool = False field to the class, passed through to
the constraint constructor, replacing the hardcoded True. This makes
prerelease intent explicit in bakery.yaml (on the devVersions entry)
rather than implied by the sourceType name.

The constraint class retains its prerelease field as an implementation
detail; the devVersions prerelease field is the single user-facing
point of control for prerelease resolution.
Add `devVersions` to the Image field table and a new
`ImageDevelopmentVersion` section covering both sourceType variants
(`stream` for product channels, `dependency` for prerelease resolution).

Also extend the prerelease callout to mention `positron` alongside
`quarto`, since both now support the `prerelease` field.
Replace the sparse 7-test file with full chain coverage:
validation, version resolution (exact assertions), URL delegation,
OS and registry behaviour, values passthrough, and as_image_version()
integration tests.
- test_inert_when_no_spec: type-narrow to channel devVersions; the field
  doesn't exist on dependency-type devVersions
- Add test for dev_spec with no channel pinning the sole stream devVersion
- test_positron_prerelease_includes_daily: assert daily sorts to front
- Add dedup test: daily version appearing in releases must not appear twice
- Fix _fetch_versions to deduplicate before sorting (set() dedup)
- Hoist DispatchVersionMismatchError imports to module level in
  test_channel.py and test_main.py; remove redundant local patch import
- Add match= to both mismatch error tests
- Strengthen test_no_override_scheduled_path_unchanged with exact version
- Add download_url assertion to test_ppm_preview_override_renders_offline
- Split test_empty_version_raises into two focused tests
The merge command accepted --dev-stream but delegated to publish
without applying the dev_stream → dev_channel coalesce, so the
flag was silently ignored.
@bschwedler bschwedler force-pushed the positron-init-preview-stream branch from 0a6f341 to 51e9bf6 Compare June 11, 2026 20:48
ImageDevelopmentVersionFromDependency had no channel field and
inherited the base get_release_channel() returning None, so
release_channel was never set in image version metadata. The
{{ Channel }} tag variable and any downstream channel routing
were therefore inert for dependency-sourced dev versions.

Add an optional channel: ReleaseChannelEnum | None field and
override get_release_channel() to return it. Callers set
channel: daily (or preview, once that stream is wired up)
in bakery.yaml to populate the metadata correctly.
Setting channel: release is always wrong here — the absent key
already causes image_target to treat a build as release, and
an explicit release value would make {{ Channel }} render
"release" and emit unwanted release-* tags.

Catch this at config parse time with a field validator.
Add channel to the sourceType: dependency field table and
update the example to include channel: daily.
@bschwedler bschwedler added this pull request to the merge queue Jun 11, 2026
@bschwedler bschwedler removed this pull request from the merge queue due to a manual request Jun 11, 2026
@bschwedler bschwedler merged commit 7061ee1 into main Jun 11, 2026
24 checks passed
@bschwedler bschwedler deleted the positron-init-preview-stream branch June 11, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants