Skip to content

fix(ci): one-off docs-site state migration to the branch-id scope (TML-3157) - #199

Merged
wmadden-electric merged 2 commits into
mainfrom
fix/docs-state-migration-tml3157
Aug 3, 2026
Merged

fix(ci): one-off docs-site state migration to the branch-id scope (TML-3157)#199
wmadden-electric merged 2 commits into
mainfrom
fix/docs-state-migration-tml3157

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

The docs deploy fails on v0.6.0's empty-scope guard, as expected: the site's deploy state sits under the pre-0.6.0 scope (Alchemy's dev_${USER} default), so the new branch-id scope br_fhtqddsyaa4abwbj1y7l2hjn is empty while the branch runs the site app.

This PR performs the remedy the guard's own message prescribes, without losing the site's state or its generated URL (there is no custom domain, so the reset cutover would break every existing docs link):

  • scripts/migrate-docs-state-tml3157.ts — resolves the composer-docs project, its default Branch, and the prisma-composer-state database on that Branch; then transactionally re-stages the composer-docs rows in alchemy_resource_state and alchemy_stack_output to the Branch id. Idempotent: exits 0 when the new scope is already occupied or no rows exist; refuses (with a listing) if more than one legacy scope is present.
  • One workflow step in deploy-docs.yml before the deploy, so merging this PR migrates and then deploys in the same run (the workflow triggers on changes to itself).

This is a one-off. Once the deploy is green, revert this PR to drop the step and script — I'll open the revert PR after the run succeeds.

Scope: only .github/workflows/deploy-docs.yml (+1 step) and the new script. No package code.

Verification: the migration logs the scopes it found and the row counts it moved; the deploy and smoke-check steps in the same run prove the site serves from the migrated state.

🤖 Generated with Claude Code

…L-3157)

The docs deploy fails on v0.6.0's empty-scope guard: its state sits under
the pre-0.6.0 dev_${USER} scope. This performs the remedy the guard
prescribes — re-stage the composer-docs rows to the default Branch's id in
that Branch's prisma-composer-state database — as an idempotent step before
the deploy. Remove the step and script once the deploy is green.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@wmadden-electric, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fe67a8a2-b2d1-4009-ada0-a18805ad752b

📥 Commits

Reviewing files that changed from the base of the PR and between 9d19433 and 79403ff.

📒 Files selected for processing (2)
  • .github/workflows/deploy-docs.yml
  • scripts/migrate-docs-state-tml3157.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@199
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@199

commit: 79403ff

@wmadden-electric
wmadden-electric enabled auto-merge (squash) August 3, 2026 20:26
@wmadden-electric
wmadden-electric merged commit b0ade0e into main Aug 3, 2026
14 checks passed
@wmadden-electric
wmadden-electric deleted the fix/docs-state-migration-tml3157 branch August 3, 2026 20:28
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.

2 participants