Skip to content

feat(migration): source the migration tarball from the update manifest (stable→beta→unstable)#517

Open
mrosseel wants to merge 1 commit into
brickbots:mainfrom
mrosseel:migration-manifest-lookup
Open

feat(migration): source the migration tarball from the update manifest (stable→beta→unstable)#517
mrosseel wants to merge 1 commit into
brickbots:mainfrom
mrosseel:migration-manifest-lookup

Conversation

@mrosseel

@mrosseel mrosseel commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Replaces the hardcoded migration tarball URL with a lookup in the update manifest, so migration follows releases automatically instead of a pinned v3.0.0-migration URL.

What changed

  • New _migration_version_info_from_manifest(): fetches update-manifest.json (brickbots nixos-manifest), walks channels stable → beta → unstable, and returns version_info (version, type, migration_url, migration_sha256_url) for the first available entry that carries a migration tarball. Skips unavailable entries and entries without a tarball.
  • Unlock (7× square): now offers the first-available manifest target (was the hardcoded _MIGRATION_VERSION_INFO); shows "No release found" if the manifest has none.
  • Public/automatic path: still gated by nixos_for_everyone (unchanged rollout control), but the tarball now comes from the manifest rather than the gate's nixos_url. _fetch_migration_config() no longer requires nixos_url — it only carries the gate flag.
  • Removed the hardcoded _MIGRATION_VERSION_INFO.

Depends on the manifest carrying migration_url/migration_sha256_url, added by the release workflow in #516.

Tests

  • 37 pass. Added TestFetchUpdateManifest + TestMigrationVersionInfoFromManifest (channel priority, beta/unstable fallback, skip unavailable, skip entries without a tarball, network/JSON failure → None). Updated the two obsolete _fetch_migration_config url-requirement tests.

Note: the new "No release found" string needs nox -s babel extraction before translation.

🤖 Generated with Claude Code

@mrosseel

mrosseel commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

Added migration_size_mb to the manifest-selected version_info via a HEAD request on the tarball (follows GitHub's 302 to read the real Content-Length; omitted on failure so the confirm screen shows "?"). Previously the confirm screen would always have shown "Download: ?MB". Tests extended (39 pass).

@mrosseel mrosseel force-pushed the migration-manifest-lookup branch from e45752c to b9a68f8 Compare July 3, 2026 08:32
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