fix(ci): one-off docs-site state migration to the branch-id scope (TML-3157) - #199
Conversation
…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>
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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. Comment |
Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
commit: |
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 scopebr_fhtqddsyaa4abwbj1y7l2hjnis empty while the branch runs thesiteapp.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
resetcutover would break every existing docs link):scripts/migrate-docs-state-tml3157.ts— resolves thecomposer-docsproject, its default Branch, and theprisma-composer-statedatabase on that Branch; then transactionally re-stages thecomposer-docsrows inalchemy_resource_stateandalchemy_stack_outputto 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.deploy-docs.ymlbefore 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