Repository navigation
ci(test): fall back to a placeholder SENTRY_CLIENT_ID for fork PRs - #1804
Conversation
Fork pull_request runs get an empty vars.SENTRY_CLIENT_ID, so the CLI build and bundle scripts exit with "SENTRY_CLIENT_ID environment variable is required". That fails the sentry, NPM package (sentry) and CLI asset catalog jobs for every fork PR that touches the CLI's dependency graph. Fall back to test-client-id, the placeholder Local E2E and the CLI tests already use. test.yml publishes no artifacts, so the placeholder never ships. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
left a comment
There was a problem hiding this comment.
I thought this was already hard-coded in the code???
…uiring SENTRY_CLIENT_ID src/lib/oauth.ts already has the public sentry.io client ID as the default, but build.ts and bundle.ts exited when SENTRY_CLIENT_ID was unset. Fork PR runs get an empty vars.SENTRY_CLIENT_ID, so every fork PR that touched the CLI failed the sentry, NPM package (sentry) and CLI asset catalog jobs. Inject SENTRY_CLIENT_ID_BUILD only when SENTRY_CLIENT_ID is set, so unset or empty builds use the committed default. This reverts the test.yml placeholder from the previous commit, which would have baked 'test-client-id' over that default.
|
Yep, it is: fc354d3 removes those checks and injects |
Pull requests from forks always fail three
Testjobs,sentry,NPM package (sentry)andCLI asset catalog (macOS arm64), plus the aggregatetestjob. The cause isn't the PR's code:vars.SENTRY_CLIENT_IDis empty on forkpull_requestruns, sopackages/cli/script/build.tsandbundle.tsexit withSENTRY_CLIENT_ID environment variable is required.Evidence:
SENTRY_CLIENT_ID:with no value, and all three jobs stop on that error.Change
test.yml,SENTRY_CLIENT_IDnow falls back totest-client-idin the three CLI build jobs. Local E2E and the CLI unit tests already use that placeholder. When the repository variable is set, it still wins.test.ymluploads and publishes nothing, so the placeholder never ships. Release builds go throughcli-build.yml, which this PR doesn't touch.docs/operations/github-actions.mdgets a short note on the fallback.Verification
SENTRY_CLIENT_ID= pnpm --filter sentry run bundlereproduces the CI error. WithSENTRY_CLIENT_ID=test-client-id, the bundle completes.pnpm run lintandpnpm run docs:checkpass.After this merges, #1754 needs
mainmerged in (or a new push) to pick up the workflow change.via @BYK.
--
View Session in Sentry