Skip to content

refactor(release,cli): drop migration-ceiling CI step and CLI ceiling fetch#30139

Merged
dvargasfuertes merged 2 commits into
mainfrom
apollo/drop-migration-ceiling-ci-and-cli
May 10, 2026
Merged

refactor(release,cli): drop migration-ceiling CI step and CLI ceiling fetch#30139
dvargasfuertes merged 2 commits into
mainfrom
apollo/drop-migration-ceiling-ci-and-cli

Conversation

@vellum-apollo-bot
Copy link
Copy Markdown
Contributor

@vellum-apollo-bot vellum-apollo-bot Bot commented May 9, 2026

Summary

Drops the migration-ceiling CI step and the CLI ceiling fetch, completing the last actively harmful parts of the db_migration_version / last_workspace_migration_id decommission.

What's removed

release.yml + dev-release.yaml — "Compute migration ceilings" step deleted:

  • The node -e script that parsed assistant/src/memory/migrations/registry.ts for DB_VERSION
  • The node -e script that walked WORKSPACE_MIGRATIONS for WS_ID
  • --argjson db_migration_version + --arg last_workspace_migration_id jq args in the register-release payload
  • db_migration_version: $db_migration_version + last_workspace_migration_id: $last_workspace_migration_id JSON fields

cli/src/lib/upgrade-lifecycle.ts (performDockerRollback):

  • The fetch(platformUrl + '/v1/releases/?stable=true') block that pulled target ceiling from the public endpoint
  • The let targetMigrationCeiling = {} variable and the pre-swap migration rollback if block (the conditional rollback call on the current daemon before image swap)
  • The post-swap rollback conditional simplified: now unconditionally calls rollbackMigrations(..., true) — the newly-started old daemon self-derives its ceiling via rollbackToRegistryCeiling: true

Why it's safe

The daemon has supported rollbackToRegistryCeiling: true since PR #6257. After image swap, the running daemon knows its own baked-in ceiling. No external fetch needed.

Decommission scoreboard


Open in Devin Review

… fetch

Removes the 'Compute migration ceilings' step from release.yml and
dev-release.yaml (the node script that parsed migration registries to produce
db_version + ws_id), and strips db_migration_version / last_workspace_migration_id
from the register-release JSON payload.

Updates cli/src/lib/upgrade-lifecycle.ts: drops the pre-Docker-swap migration
rollback (which fetched the target ceiling from GET /v1/releases/?stable=true)
and makes the post-swap rollback unconditional with rollbackToRegistryCeiling=true.
The daemon self-derives the ceiling from its own baked-in registry; no external
fetch is needed.

Companion platform PR drops the columns from AssistantRelease entirely.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb0eca49f7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 701 to 703
if (ready) {
// Success path

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Roll back migrations before enforcing readiness

This change makes migration rollback happen only after waitForReady() succeeds, so any target image that cannot boot against the newer DB/workspace schema will never get a chance to downgrade its migrations and the rollback will always fail back to the current version. In performDockerRollback, rollbackMigrations(..., rollbackToRegistryCeiling: true) now runs only inside the success branch, which removes the previous pre-swap safety path and breaks rollbacks to versions that require schema rollback before startup.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment on lines +704 to +712
// Post-swap migration rollback: ask the now-running old daemon to roll
// back any migrations above its own registry ceiling.
await rollbackMigrations(
entry.runtimeUrl,
entry.assistantId,
undefined,
undefined,
true,
);
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.

🚩 Semantic change: migration rollback now always deferred to post-swap daemon

Previously, performDockerRollback attempted to roll back migrations on the CURRENT (newer) daemon before swapping containers, using specific target versions from the releases API. Only if that failed would it fall back to post-swap rollbackToRegistryCeiling on the TARGET (older) daemon. Now, migration rollback always happens post-swap via rollbackToRegistryCeiling (lines 706-712). This means the older daemon is now solely responsible for rolling back migrations introduced by the newer version. This works because rollbackToRegistryCeiling tells the daemon to revert anything above its own known migration set — the daemon's rollback handler has the necessary down() logic for migrations in its registry. This is a valid simplification, but it does mean that if a newer version introduced migrations whose rollback logic isn't present in the older version's codebase, those migrations won't be rolled back. This appears to be an accepted trade-off based on the PR's design.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@dvargasfuertes dvargasfuertes merged commit 75b764e into main May 10, 2026
3 checks passed
@dvargasfuertes dvargasfuertes deleted the apollo/drop-migration-ceiling-ci-and-cli branch May 10, 2026 19:17
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