Skip to content

fix(cli): Warm completion caches after the setup auto-login - #1789

Merged
BYK merged 1 commit into
mainfrom
fix/cli-warm-after-setup-login
Nov 1, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/cli-warm-after-setup-login

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1788, addressing Warden's finding that landed after the merge.

On a fresh curl install, cli setup warms attribute keys before its optional auto-login stores a token. That warm-up exits early because no one is logged in yet. runInteractiveLogin() then succeeds without warming anything, so field completion stays empty on the main first-install path. The org/region cache is also empty at that point, so pickWarmupOrgs() would find nothing to warm anyway.

The fix:

  • Moves warmCachesAfterLogin() (list orgs with a 1s cap, then warm attribute keys) from auth/login.ts into lib/completion-warmup.ts.
  • Calls it from setup after a successful auto-login, unless --no-completions is set. auth login behaves the same as before.
  • Moves the org-list stall/failure tests to test/lib/completion-warmup.test.ts, next to a success-path test. Adds setup tests for the auto-login warm-up with completions on and off.

Verified with oxlint, oxfmt --check, tsc --noEmit, and the completion-warmup, commands/cli, and commands/auth suites (434 passed, 3 skipped).

--

View Session in Sentry

On a fresh curl install, setup warmed attribute keys before its optional
login stored a token, so that warm-up did nothing and field completion
stayed empty. Move the post-login warm-up (org list, then attribute keys)
into completion-warmup.ts and run it after setup's auto-login too, unless
completions are disabled.
@vercel

vercel Bot commented Nov 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 1, 2026 7:34pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 1, 2026
@BYK
BYK merged commit c577a45 into main Nov 1, 2026
31 checks passed
@BYK
BYK deleted the fix/cli-warm-after-setup-login branch November 1, 2026 20:33

This branch was previously deployed

1 inactive deployment
Preview — 244a3669 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant