Skip to content

feat(updater): add beta update channel with schema version guard#627

Merged
wizzomafizzo merged 2 commits intomainfrom
feat/beta-update-channel
Apr 5, 2026
Merged

feat(updater): add beta update channel with schema version guard#627
wizzomafizzo merged 2 commits intomainfrom
feat/beta-update-channel

Conversation

@wizzomafizzo
Copy link
Copy Markdown
Member

  • Add update_channel config field (stable/beta) with getter/setter, exposed via settings API
  • Set go-selfupdate Prerelease flag when channel is beta, allowing pre-release manifest entries to be detected
  • Add --prerelease and --merge flags to manifest generator for building combined manifests containing both stable and beta releases
  • Add publish-beta CI job that downloads existing manifest from CDN, merges the new pre-release entry, and uploads the combined manifest (with concurrency group to prevent races)
  • Add CheckSchemaVersion guard in MigrateUp that refuses to start if the database schema version is ahead of the binary's latest migration, preventing silent corruption when switching from a newer binary (e.g. beta) to an older one (e.g. stable)
  • Add asset existence check to both stable and beta CI jobs before generating checksums

Add opt-in beta update channel so pre-release GitHub releases are
served to users who set update_channel = "beta" in config.

- New update_channel config field (stable/beta) exposed via settings API
- Updater sets go-selfupdate Prerelease flag when channel is beta
- Manifest generator gains --prerelease and --merge flags for building
  combined manifests with both stable and beta releases
- CI workflow publishes beta manifest by merging prerelease entry into
  existing stable manifest on CDN
- Schema version check on boot refuses to start if database is from a
  newer binary, preventing silent corruption on channel downgrade
@sentry
Copy link
Copy Markdown

sentry bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 70.53571% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
scripts/generate-update-manifest/main.go 60.41% 18 Missing and 1 partial ⚠️
pkg/database/migrations.go 62.16% 7 Missing and 7 partials ⚠️

📢 Thoughts on this report? Let us know!

Comment thread pkg/database/migrations.go
- Test CheckSchemaVersion for fresh DB, current version, and schema-ahead
- Test latestEmbeddedVersion with valid and invalid directories
- Test HandleSettingsUpdate for update channel setting
@wizzomafizzo wizzomafizzo merged commit 235f6ea into main Apr 5, 2026
10 checks passed
@wizzomafizzo wizzomafizzo deleted the feat/beta-update-channel branch April 5, 2026 10:18
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.

1 participant