Skip to content

E2E: improve CLI log format#7364

Open
phyllis-sy-wu wants to merge 1 commit intopsyw-0420-E2E-utility-cleanup-allfrom
psyw-0421-E2E-improve-cli-log-format
Open

E2E: improve CLI log format#7364
phyllis-sy-wu wants to merge 1 commit intopsyw-0420-E2E-utility-cleanup-allfrom
psyw-0421-E2E-improve-cli-log-format

Conversation

@phyllis-sy-wu
Copy link
Copy Markdown
Contributor

@phyllis-sy-wu phyllis-sy-wu commented Apr 22, 2026

WHY are these changes introduced?

E2E debug output was hard to read and didn't match what you see when running a CLI command manually:

  • Commands were buried. The binary path and the full arg list were logged on a single line, so for anything with a long --path (e.g. a temp-dir app) you'd have to scroll horizontally to find the actual subcommand.
    [e2e][w0][cli] exec: node /Users/psyw/src/github.com/Shopify/cli/packages/create-app/bin/run.js --name E2E-deploy-1776837816876 --path /Users/psyw/src/github.com/Shopify/cli/.e2e-tmp/e2e-bksuZC/app-c1uMa8 --package-manager pnpm --local --template none --organization-id 161686155
  • No live CLI output. With DEBUG=1, execa buffered stdout/stderr and only surfaced them after the subprocess finished. You couldn't watch CLI info boxes, success panels, or progress messages as the test ran — only a wall of text after each command completed.

WHAT is this pull request doing?

  1. Two-line log format. Every exec: / spawn: entry is now split onto two lines — binary path on one, args on the next. The subcommand is the first thing you see on the args line:
    [e2e][w0][cli] exec: node /Users/psyw/src/github.com/Shopify/cli/packages/create-app/bin/run.js
    [e2e][w0][cli] app init --name E2E-deploy-1776837689829 --path /Users/psyw/src/github.com/Shopify/cli/.e2e-tmp/e2e-Hbb1z7/app-9Pbsml --package-manager pnpm --local --template none --organization-id 161686155
  2. Live subprocess output under DEBUG=1. New runExeca helper pipes subprocess stdout/stderr to the parent with {end: false} (so the parent's streams aren't closed when the subprocess exits). execa still buffers internally, so captured result.stdout / result.stderr for assertions is unchanged. Applied to both exec and execCreateApp.

Net effect: running E2E tests with DEBUG=1 now streams the same info boxes, success panels, and progress messages you'd see running `shopify app deploy ...` manually, rather than a silent wait followed by a dump.

How to test your changes?

DEBUG=1 pnpm --filter e2e exec playwright test app-deploy

Expect to see:

  • Each CLI invocation logged on two lines (binary → args)
  • CLI info/success boxes and progress messages appearing live as the subprocess runs, not only after it exits

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows) — only affects stdout/stderr piping, platform-agnostic
  • I've considered possible documentation changes — none, E2E infra only
  • I've considered analytics changes to measure impact — none
  • The change is user-facing — not user-facing; E2E test infrastructure only, no changeset needed

Copy link
Copy Markdown
Contributor Author

phyllis-sy-wu commented Apr 22, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@phyllis-sy-wu phyllis-sy-wu marked this pull request as ready for review April 22, 2026 06:05
@phyllis-sy-wu phyllis-sy-wu requested a review from a team as a code owner April 22, 2026 06:05
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-remove-dead-code branch from f569707 to b6b2479 Compare April 22, 2026 14:52
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-improve-cli-log-format branch from 9d0a3aa to bfb1932 Compare April 22, 2026 14:52
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-remove-dead-code branch from b6b2479 to a7aea9b Compare April 22, 2026 15:16
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-improve-cli-log-format branch from bfb1932 to 402ec4e Compare April 22, 2026 15:16
@phyllis-sy-wu phyllis-sy-wu changed the base branch from psyw-0421-E2E-remove-dead-code to graphite-base/7364 April 22, 2026 16:44
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-improve-cli-log-format branch from 402ec4e to 21fd11c Compare April 22, 2026 16:45
@phyllis-sy-wu phyllis-sy-wu changed the base branch from graphite-base/7364 to psyw-0421-E2E-teardown-polish April 22, 2026 16:45
@phyllis-sy-wu phyllis-sy-wu linked an issue Apr 22, 2026 that may be closed by this pull request
@phyllis-sy-wu phyllis-sy-wu changed the base branch from psyw-0421-E2E-teardown-polish to graphite-base/7364 April 22, 2026 18:41
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-improve-cli-log-format branch from 21fd11c to 9ff8224 Compare April 22, 2026 18:41
@phyllis-sy-wu phyllis-sy-wu changed the base branch from graphite-base/7364 to psyw-0420-E2E-utility-cleanup-all April 22, 2026 18:41
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0420-E2E-utility-cleanup-all branch from f8430c6 to 50e9c65 Compare April 22, 2026 19:31
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-improve-cli-log-format branch from 9ff8224 to d2b07be Compare April 22, 2026 19:31
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0421-E2E-improve-cli-log-format branch from d2b07be to 71cf082 Compare April 22, 2026 20:37
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0420-E2E-utility-cleanup-all branch from 50e9c65 to 20863dd Compare April 22, 2026 20:37
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.

E2E: Improve error log

1 participant