Repository navigation
fix(cli): Skip the first-install login in CI - #2925
Merged
Merged
Conversation
CI jobs often run in a PTY, so the installer's and `sentry cli setup`'s TTY checks passed there and setup started an OAuth device login that waited ten minutes for its code to expire. `sentry cli setup` now skips that login when isCi() matches and prints a hint to set SENTRY_AUTH_TOKEN. The installer no longer hands setup the controlling terminal in CI, which also covers older pinned versions. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
BYK
approved these changes
Dec 5, 2026
14 of 16 tasks
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 5, 2026
…ackages (getsentry#2926) The installer now handles three kinds of host better: - **glibc older than 2.28** (CentOS 7, Amazon Linux 2, Ubuntu 18.04). The v4 binary can't run there. The installer now stops before any download and points to the 3.8.2 pin. Node 20, which the npm fallback needs, has the same glibc requirement, so the old npm hint didn't help these hosts either. - **musl.** The installer used to require `libstdc++`, `libgcc_s` and `libatomic` before it downloaded anything. Builds from 4.1.0 no longer link `libatomic`, and arm64 builds only need `libgcc_s`. Now the installer asks `ldd` which libraries the downloaded binary is missing, then prints the exact `apk add` line for them. - **Piped to `sh`.** This used to fail with a syntax error. A POSIX guard at the top now tells the user to pipe the installer to bash, or to run `apk add bash` first. Installer error reports now include the tags `registry.status`, `registry.curl_exit` and `libc.version`. `check-installer-libc.sh` gains an `old-glibc` case (CentOS 7 and Amazon Linux 2 images), and the Alpine case now covers the `sh` guard and the printed `apk add` line. Before and after, on CentOS 7: ``` before: Failed to fetch latest stable version from Sentry's release registry. Retry or install a specific version with --version <version>. after: Sentry CLI v4 needs glibc 2.28 or later, and this system has glibc 2.17. To install the last v3 release (sentry-cli) instead, run: curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=3.8.2 sh ``` This touches the same files as getsentry#2925, but the two merge cleanly. The `run_setup` and TTY handoff lines are unchanged. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Acefa2ca64f280f1e22c4160633ae292c --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Acefa2ca64f280f1e22c4160633ae292c) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Acefa2ca64f280f1e22c4160633ae292c/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI jobs often run in a PTY (Buildkite does), so the installer's
-t 1 && -t 2check and setup'sisatty(0/1/2)check both pass there. On a fresh curl install with no credentials,sentry cli setupthen starts an OAuth device login and waits about ten minutes for the code to expire. Reported in oven-sh/bun#50046 (oven-sh/bun#50046).Before, in a CI job with a PTY, the install step prints a device code and hangs until it expires:
After, the install step prints one line and the job continues:
The detection reuses the existing
isCi()insrc/lib/ci.ts, which telemetry and upload flags already use: any marker inCI_ENV_VARSset to something other than"",false, or0. This addsCIRCLECIandBITBUCKET_BUILD_NUMBERto that list; both providers also setCI=true, so other callers see no real change.sentry cli setup: in CI, skips the login and prints the hint, with or without a TTY. A stored login orSENTRY_AUTH_TOKENstill skips silently, as before. Local terminals still get the login.install: no longer hands setup/dev/ttyin CI, which keeps older pinned v4 versions from logging in there too. It keeps a bash copy ofCI_ENV_VARS.via @BYK.
--
View Session [Sentry]