Skip to content

test(e2e): speed up device-flow login e2e on Windows by setting SHELL [RED-1187] [ship] - #1546

Merged
sorccu merged 1 commit into
mainfrom
simo/red-1187-device-flow-e2e-windows-shell
Oct 15, 2026
Merged

sorccu merged 1 commit into
mainfrom
simo/red-1187-device-flow-e2e-windows-shell

Conversation

@sorccu

@sorccu sorccu commented Oct 15, 2026

Copy link
Copy Markdown
Member

Linear: RED-1187

Summary

login-device-flow.spec.ts spawns the CLI with extendEnv: false and its own env, which leaves SHELL unset. On Windows, @oclif/core's getShell() then runs powershell -NoProfile -Command Get-CimInstance … on every command to detect the parent shell. That costs about 33 s per CLI run on the Windows runners: 788 s for the file's 9 tests, with one test timing out at 180 s.

checklyEnv in e2e/run-checkly.ts already sets SHELL for this reason (#1357). This spec builds its env by hand, so it never got the fix. It is the only e2e spec with a stripped env that does not set SHELL.

The fix sets SHELL the same way checklyEnv does. This doesn't affect Linux or macOS, where os.userInfo().shell already gives oclif a value without spawning anything. Locally (macOS) the whole file runs in 12 s, about 0.3 s per CLI run.

Test plan

🤖 Generated with Claude Code

…werShell probe [RED-1187]

The spec spawns the CLI with a stripped env and no SHELL, so on Windows
@oclif/core's getShell() runs `powershell -Command Get-CimInstance` on
every command. That cost ~33 s per CLI run and pushed the file near its
per-test timeouts. checklyEnv already sets SHELL for the same reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sorccu sorccu changed the title test(e2e): speed up device-flow login e2e on Windows by setting SHELL [RED-1187] test(e2e): speed up device-flow login e2e on Windows by setting SHELL [RED-1187] [ship] Oct 15, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: ship/show PR from a same-repo branch.

@sorccu
sorccu merged commit 8dc8e82 into main Oct 15, 2026
16 checks passed
@sorccu
sorccu deleted the simo/red-1187-device-flow-e2e-windows-shell branch October 15, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant