ops(release) : Simplify release publishing#43
Conversation
|
Warning Review limit reached
More reviews will be available in 24 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
WalkthroughThis PR restructures the Prisma CLI release process from a "preview" phase to an official "beta" phase. It replaces the manual ChangesPublishing Workflow and Version Management
Documentation and Branding: Preview to Beta
🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/architecture/adrs/0002-workflow-command-model.md (1)
21-27:⚠️ Potential issue | 🟠 Major | ⚡ Quick winResolve command-group contract mismatch with command spec.
This ADR says the beta includes only
auth,project,branch, andapp, butdocs/product/command-spec.mdincludesgitin-scope for beta. Keep one canonical set to avoid contradictory contributor guidance.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/architecture/adrs/0002-workflow-command-model.md` around lines 21 - 27, The ADR currently lists beta command groups as `auth`, `project`, `branch`, and `app` but the command spec (`docs/product/command-spec.md`) also lists `git`; pick one canonical source and make them consistent: either add `git` to the beta groups in 0002-workflow-command-model.md (updating the bullet list and any descriptive text) or remove `git` from the beta scope in command-spec.md; also add a short line to the chosen canonical document indicating "This file is authoritative for beta command group scope" so future contributors know which source to update.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/preview-cli-package.yml:
- Around line 67-69: The summary always prints "- Package checks: passed"
unconditionally; change the echo to reflect the actual outcome of the
package-check step (use the step output/outcome instead of a hardcoded "passed")
so the summary shows real status (e.g., reference the package check step's name
like steps.package_checks.outcome or its outputs) and update the line that
currently echoes "- Package checks: passed" to conditionally print the actual
outcome or a failure message using the step outcome variable.
- Around line 23-25: Update the GitHub Actions checkout step that uses
actions/checkout@v5 to explicitly set persist-credentials: false; in the
workflow block where the step currently only specifies ref: ${{
github.event.pull_request.head.sha }}, add the key persist-credentials: false to
prevent the checked-out PR code from receiving push credentials.
- Around line 23-31: Update the workflow to pin the three GitHub Actions to
immutable commit SHAs instead of floating tags for actions/checkout,
pnpm/action-setup and actions/setup-node (replace the tag references in the
corresponding uses lines with their commit SHA values), set persist-credentials:
false on the actions/checkout step to avoid leaving credentials persisted, and
change the "Summarize PR preview publish" step so its output reflects real
success/failure (use a conditional or pass a status variable from earlier steps
rather than always printing "Package checks: passed")—target the
actions/checkout step, the pnpm/action-setup and actions/setup-node uses, and
the "Summarize PR preview publish" step to implement these changes.
In @.github/workflows/publish-cli.yml:
- Around line 28-34: Replace the floating major-version tags with pinned commit
SHAs for each GitHub Action used: update actions/checkout@v5,
pnpm/action-setup@v5, and actions/setup-node@v6 (and their second occurrences
later in the file) to their corresponding immutable commit SHA references;
locate the action usages by the identifiers "actions/checkout",
"pnpm/action-setup", and "actions/setup-node" and substitute "`@vX`" with the
specific full SHA (e.g., "@<full-commit-sha>") to ensure immutable,
supply-chain-safe references.
- Around line 28-29: Add the persist-credentials: false option to both uses:
actions/checkout@v5 steps in the publish-cli.yml workflow (the two checkout
occurrences) so Git credentials are not left writable in the workspace; locate
the two steps that reference "uses: actions/checkout@v5" and add the
persist-credentials: false key under each checkout step's configuration.
---
Outside diff comments:
In `@docs/architecture/adrs/0002-workflow-command-model.md`:
- Around line 21-27: The ADR currently lists beta command groups as `auth`,
`project`, `branch`, and `app` but the command spec
(`docs/product/command-spec.md`) also lists `git`; pick one canonical source and
make them consistent: either add `git` to the beta groups in
0002-workflow-command-model.md (updating the bullet list and any descriptive
text) or remove `git` from the beta scope in command-spec.md; also add a short
line to the chosen canonical document indicating "This file is authoritative for
beta command group scope" so future contributors know which source to update.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 69f543ed-9de2-4fe8-b96c-97f988b55a03
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (23)
.github/workflows/prepare-cli-release.yml.github/workflows/preview-cli-package.yml.github/workflows/publish-cli.ymlCONTRIBUTING.mdREADME.mdSECURITY.mddocs/architecture/adrs/0001-preview-package-and-publishing.mddocs/architecture/adrs/0002-workflow-command-model.mddocs/architecture/adrs/README.mddocs/architecture/overview.mddocs/architecture/package-structure.mddocs/product/command-spec.mddocs/product/resource-model.mddocs/reference/glossary.mdexamples/hello-world/README.mdexamples/hello-world/server.tsexamples/next-smoke/README.mdexamples/next-smoke/app/layout.tsxpackage.jsonpackages/cli/README.mdpackages/cli/package.jsonpackages/cli/tests/publish-prep.test.tsscripts/prepare-cli-publish.mjs
💤 Files with no reviewable changes (1)
- .github/workflows/prepare-cli-release.yml
Summary
Publish CLIworkflow that owns official beta and main dev releases.@prisma/cli@latest, publish every successfulmainbuild to@prisma/cli@dev, and publish same-repo PR previews through pkg.pr.new.@preview-> primary@prisma/clitransition.Operational Notes
CLI_PR_PREVIEW_REQUIRED=trueto make preview publish failures block CI.Validation
pnpm --filter @prisma/cli exec vitest run tests/resolve-cli-version.test.ts tests/publish-prep.test.tspnpm --filter @prisma/cli test(rerun outside sandbox for localhost-binding auth callback tests)pnpm --filter @prisma/cli buildnode scripts/resolve-cli-version.mjs dev --sha abcdef1234567890 --run-number 123 --run-attempt 2node scripts/resolve-cli-version.mjs pr --sha f1110dd704a9382c429b --pr-number 43node scripts/resolve-cli-version.mjs next-beta --latest 3.0.0-beta.0