Add release channel support (stable/beta/alpha) #41

Open
opened 2026-01-03 23:45:14 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-01-03 23:45:14 +00:00 (Migrated from github.com)

Part of #13

User Story

As a release manager, I want to publish to different release channels so that I can control which users receive which versions (e.g., beta testers get early access).

Design

Channel Hierarchy

alpha → beta → stable
  ↓       ↓       ↓
 Dev   Testers  Everyone

Command Interface

# Publish to alpha (default for dev env)
qrun publish --env dev

# Publish to beta channel
qrun publish --env staging --channel beta

# Publish to stable (production)
qrun publish --env prod --channel stable

# Promote from beta to stable
qrun promote --from beta --to stable --version 1.2.3

Channel Configuration

In qrun.yaml:

channels:
  alpha:
    environments: [dev]
    autoPromote: false
  beta:
    environments: [staging]
    autoPromote: false
  stable:
    environments: [prod]
    requireApproval: true

Environment-Channel Matrix

Environment Default Channel Allowed Channels
dev alpha alpha
staging beta alpha, beta
prod stable beta, stable

Voyage API

POST /v1/releases
{
  "artifactId": "art_123",
  "channel": "beta",
  "version": "1.2.3"
}

POST /v1/promotions
{
  "releaseId": "rel_123",
  "fromChannel": "beta",
  "toChannel": "stable"
}

Files to Create/Modify

File Action Description
ReleaseChannel.java Create Channel enum and validation
ChannelConfig.java Create Channel configuration model
PromoteCommand.java Create Channel promotion command
PublishCommand.java Modify Add channel support
VoyageClient.java Modify Add release/promote endpoints

Implementation Tasks

  • Create ReleaseChannel enum (ALPHA, BETA, STABLE)
  • Create ChannelConfig for channel settings
  • Add --channel option to PublishCommand
  • Validate channel against environment
  • Implement channel in release record creation
  • Create PromoteCommand for channel promotion
  • Implement promotion validation (beta→stable, not alpha→stable)
  • Add requireApproval handling for stable
  • Add autoPromote support
  • Update Voyage client for channel endpoints
  • Add channel display in status output
  • Add unit tests for channel validation
  • Document channel workflow

Acceptance Criteria

  • --channel option works on publish
  • Default channel inferred from environment
  • Invalid channel-environment combination rejected
  • qrun promote moves between channels
  • Promotion follows hierarchy (no skipping)
  • requireApproval blocks direct stable publish
  • Channel visible in deployment status
Part of #13 ## User Story As a **release manager**, I want to publish to different release channels so that I can control which users receive which versions (e.g., beta testers get early access). ## Design ### Channel Hierarchy ``` alpha → beta → stable ↓ ↓ ↓ Dev Testers Everyone ``` ### Command Interface ```bash # Publish to alpha (default for dev env) qrun publish --env dev # Publish to beta channel qrun publish --env staging --channel beta # Publish to stable (production) qrun publish --env prod --channel stable # Promote from beta to stable qrun promote --from beta --to stable --version 1.2.3 ``` ### Channel Configuration In `qrun.yaml`: ```yaml channels: alpha: environments: [dev] autoPromote: false beta: environments: [staging] autoPromote: false stable: environments: [prod] requireApproval: true ``` ### Environment-Channel Matrix | Environment | Default Channel | Allowed Channels | |-------------|-----------------|------------------| | dev | alpha | alpha | | staging | beta | alpha, beta | | prod | stable | beta, stable | ### Voyage API ``` POST /v1/releases { "artifactId": "art_123", "channel": "beta", "version": "1.2.3" } POST /v1/promotions { "releaseId": "rel_123", "fromChannel": "beta", "toChannel": "stable" } ``` ## Files to Create/Modify | File | Action | Description | |------|--------|-------------| | `ReleaseChannel.java` | Create | Channel enum and validation | | `ChannelConfig.java` | Create | Channel configuration model | | `PromoteCommand.java` | Create | Channel promotion command | | `PublishCommand.java` | Modify | Add channel support | | `VoyageClient.java` | Modify | Add release/promote endpoints | ## Implementation Tasks - [ ] Create `ReleaseChannel` enum (ALPHA, BETA, STABLE) - [ ] Create `ChannelConfig` for channel settings - [ ] Add `--channel` option to `PublishCommand` - [ ] Validate channel against environment - [ ] Implement channel in release record creation - [ ] Create `PromoteCommand` for channel promotion - [ ] Implement promotion validation (beta→stable, not alpha→stable) - [ ] Add `requireApproval` handling for stable - [ ] Add `autoPromote` support - [ ] Update Voyage client for channel endpoints - [ ] Add channel display in status output - [ ] Add unit tests for channel validation - [ ] Document channel workflow ## Acceptance Criteria - [ ] `--channel` option works on publish - [ ] Default channel inferred from environment - [ ] Invalid channel-environment combination rejected - [ ] `qrun promote` moves between channels - [ ] Promotion follows hierarchy (no skipping) - [ ] `requireApproval` blocks direct stable publish - [ ] Channel visible in deployment status
Sign in to join this conversation.