Skip to content

Release channels: publish pre-release bundles as catalog versions[] entries with a channel marker #149

Description

@pofallon

Context

Hola now supports release channels (try-hola/hola#428, ADR 0005 — https://github.com/try-hola/hola/blob/main/docs/adr/0005-release-channels.md, shipped in try-hola/hola#430 and #434). The server reads a channel marker on each catalog.json versions[] entry and lets a deployment follow a channel (stable by default, e.g. rc). Nothing on the server side is blocked, but the catalog cannot express a pre-release yet, so the feature is only reachable through custom catalog sources until this repo can publish one.

What the server reads (the contract)

{ "id": "remo",
  "versions": [
    { "version": "0.10.1",      "channel": "stable", "refs": { "oci": "ghcr.io/try-hola/remo:0.10.1" } },
    { "version": "0.11.0-rc.1", "channel": "rc",     "refs": { "oci": "ghcr.io/try-hola/remo:0.11.0-rc.1" } }
  ] }
  • channel is optional; absent or nullstable.
  • Grammar ^[a-z][a-z0-9-]{0,31}$. Any other value drops the entry (with a server warning) — it never defaults to stable, so a typo can't publish a pre-release as the default.
  • A version string listed twice: the first well-formed occurrence wins.
  • Ordering uses semver precedence with prerelease identifiers (1.3.0 > 1.3.0-rc.10 > 1.3.0-rc.9); the browse card and the default install always resolve to the newest stable entry.
  • A channel only counts as a separate instance of a single-instance app when the catalog actually lists a version on it (Release channels: per-app-and-channel singleton guard is bypassable with any invented channel name hola#431).
  • The bundle manifest.json is unchanged — the channel is a catalog-index attribute. "Deploy the rc" is a bundle pre-release (remo 0.11.0-rc.1 whose compose pins remo-web:4.4.0-rc.1 and whose manifest carries the matching upgrade metadata), never an image override.

Prerequisites in this repo (in dependency order, from try-hola/hola#428)

  1. bin/push-oci-package.sh moves :latest unconditionally. It runs push "$VERSION" then push latest whenever TAG=latest, and TAG defaults to latest while build-and-publish.yml:108 passes only three arguments. Publishing an rc bundle would make it the default for every install. cli-release.yml in try-hola/hola already has the guard to copy:
    if [[ "$VERSION" == *-* ]]; then   # pre-release: do not move :latest
  2. build-and-publish.yml only publishes on merge to main (github.event_name != 'pull_request') and regenerates catalog.json there, so getting an rc into the catalog is a production catalog change — circular. Pre-release-versioned bundles should be publishable from a PR.
  3. build-catalog.sh needs to emit multiple versions[] entries per app with the channel marker (stable + any pre-releases still offered).
  4. version-bump.yml and tag-release.yml are stale — both read packages/${package}/package.json, but the layout is src/<name>/ and there is no packages/ directory. They also offer only patch|minor|major, with no pre-release bump. Fix or delete.

Also worth folding in: validate-catalog should accept the optional channel field on versions[] entries and reject values outside the grammar above at publish time, so a bad marker fails CI here instead of being silently dropped by every server.

Acceptance

  • An rc bundle can be published from a PR without touching :latest.
  • catalog.json lists the stable and rc versions of the app side by side with channel markers.
  • hola install <app> --channel rc --as <name> on a stock Hola install picks up the rc from the public catalog.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions