ci(repo): add release pre-flight workflow#7822
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 5595f17 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a GitHub Actions workflow at .github/workflows/release-rehearsal.yml ("Release Rehearsal") triggered by workflow_dispatch and pushes to main, with concurrency and a 30‑minute timeout. The job checks out code, fetches main for diffs, initializes tooling, runs changeset status (producing .changeset-status.json), builds, rehearses versioning and lockfile updates, guards against unexpected post-version changes, packs public packages to .release-artifacts/pack-output.json, and uploads those artifacts. Also adds a 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @.changeset/changelog.js:
- Around line 94-107: The code unconditionally assigns associatedPR.author to
user which can be null; update the logic so you only overwrite user when
associatedPR exists and associatedPR.author is non-null (i.e., change the final
assignment to check associatedPR.author before setting user). Also, if you
intend to pick the most recent merged PR, reverse the sort comparator in
associatedPullRequests.nodes.sort to compare new Date(b.mergedAt) - new
Date(a.mergedAt) so the newest mergedAt is chosen instead of the oldest; keep
the existing null-merger handling (checking for null mergedAt) when adjusting
the comparator.
In @.github/workflows/release-rehearsal.yml:
- Around line 42-44: The workflow step labelled "Build" currently only runs
"pnpm build" despite the comment saying "Build and test"; either add the test
invocation (e.g., append or replace the run command to include the test script
such as "pnpm test" or "pnpm run build && pnpm test") or update the comment to
remove "and test" so it accurately reflects that the "Build" step only runs
"pnpm build"—target the step with name "Build" and its run value ("pnpm build")
to apply the change.
- Around line 63-74: The "Pack all packages" step currently swallows failures by
appending "|| true" to "pnpm -r exec npm pack --json >
.release-artifacts/pack-output.json 2>&1 || true", so remove the "|| true" so
the step fails on pack errors; then make the "Upload rehearsal artifacts"
job/step (the actions/upload-artifact@v4 step named "Upload rehearsal
artifacts") run unconditionally by adding "if: always()" to that step so
artifacts are still uploaded even when packing fails; if private workspaces are
expected to fail, instead of masking errors, adjust the "pnpm -r exec npm pack"
invocation to target only public packages (filtering by private flag) so
failures are intentional rather than globally suppressed.
🧹 Nitpick comments (2)
.github/workflows/release-rehearsal.yml (1)
39-40: Use therelease:statusscript to keep CI and package.json in sync.♻️ Suggested change
- name: Changeset status - run: pnpm changeset status --output .changeset-status.json + run: pnpm release:status.changeset/changelog.js (1)
1-3: Consider deriving the repo fromGITHUB_REPOSITORYfor fork safety.♻️ Suggested change
-const repo = 'clerk/javascript'; +const repo = process.env.GITHUB_REPOSITORY || 'clerk/javascript'; const [owner, repoName] = repo.split('/');
| # 2) Build and test (same path as production releases) | ||
| - name: Build | ||
| run: pnpm build |
There was a problem hiding this comment.
The step header says “build and test” but only runs build.
Either add the test command here or update the comment to avoid implying test coverage.
✏️ Comment-only fix (if tests are intentionally omitted)
- # 2) Build and test (same path as production releases)
+ # 2) Build (same path as production releases)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # 2) Build and test (same path as production releases) | |
| - name: Build | |
| run: pnpm build | |
| # 2) Build (same path as production releases) | |
| - name: Build | |
| run: pnpm build |
🤖 Prompt for AI Agents
In @.github/workflows/release-rehearsal.yml around lines 42 - 44, The workflow
step labelled "Build" currently only runs "pnpm build" despite the comment
saying "Build and test"; either add the test invocation (e.g., append or replace
the run command to include the test script such as "pnpm test" or "pnpm run
build && pnpm test") or update the comment to remove "and test" so it accurately
reflects that the "Build" step only runs "pnpm build"—target the step with name
"Build" and its run value ("pnpm build") to apply the change.
Summary
mainsince January 10 due to a GitHub GraphQL API timeout in changelog generation@changesets/get-github-info'sDataLoader(which batches all 238+ changesets into a single massive GraphQL query) with individual queries per commit/PR, with caching and concurrency limitingRoot Cause
The
@changesets/get-github-infopackage uses a module-levelDataLoadersingleton that batches all concurrent requests into a single GraphQL query. With 238+ pending changesets, the resulting query is too large and GitHub's GraphQL API returns"Timeout on validation of query". This has been failing on every push tomainsince Jan 10.Changes
.changeset/changelog.js@changesets/get-github-infoand its unboundedDataLoaderbatchingassociatedPR.authoris non-nullmergedAt(descending) instead of oldest.github/workflows/release-preflight.yml(new)mainand manualworkflow_dispatchTest plan
mainand verify the Release workflow succeeds