Skip to content

fix(cli): accept multiple files in upload command - #42057

Merged
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-42047
Jul 30, 2026
Merged

fix(cli): accept multiple files in upload command#42057
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-42047

Conversation

@dgozman

Copy link
Copy Markdown
Collaborator

Summary

  • upload accepts multiple paths: the last positional argument absorbs the remaining argv when its schema accepts an array, rendered as <files...> in help
  • bare upload reports a proper missing-argument error instead of Invalid input
  • export generateReadme to unbreak utils/generate_cli_help.js --readme

Fixes #42047

The last positional argument now absorbs the remaining argv when its
schema accepts an array. `upload` declares `files` as a string array,
matching what its help always advertised. Also export `generateReadme`
to unbreak `utils/generate_cli_help.js --readme`.

Fixes: microsoft#42047
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [installation tests] › playwright-cli.spec.ts:21 › cli should work `@package-installations-ubuntu-latest`
⚠️ [installation tests] › playwright-test-package-managers.spec.ts:19 › npm: @playwright/test should work `@package-installations-ubuntu-latest`
⚠️ [chromium-library] › library/screencast.spec.ts:28 › screencast.start delivers frames via onFrame callback `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:495 › screencast › should capture static page in persistent context Radoslav Kirilov (@smoke) `@chromium-ubuntu-22.04-node22`
⚠️ [chromium-library] › library/video.spec.ts:699 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node22`

51056 passed, 1188 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [chrome] › mcp/run-code.spec.ts:21 › browser_run_code_unsafe @mcp-macos-latest-chrome
❌ [chromium] › mcp/cli-core.spec.ts:106 › fill numeric @mcp-macos-latest-chromium
❌ [firefox] › mcp/cli-core.spec.ts:195 › dialog-accept @mcp-windows-latest-firefox

7851 passed, 1272 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures.

🟡 Nothing points at this PR, but two failures I can't fully clear

All three failures come from this PR's own run (merge sha bde85db04) and all three are timeouts — none land in code this PR changes. dialog-accept is a known pre-existing flake; the other two only show up on this run, so I can't prove they're flakes, only that the diff doesn't plausibly reach them.

Details

This PR touches the CLI daemon argument parser (command.ts), the upload command, and the help generator. The parser change only alters behavior when the last positional arg is variadic (an array) — the non-variadic path is byte-for-byte the same, so fill, dialog-accept, and browser_run_code_unsafe run exactly as before. Every failure is a timedOut, not a parse/assertion error, which reads like a slow runner rather than a logic regression.

Pre-existing flake / infra

  • [firefox] › mcp/cli-core.spec.ts › dialog-accept — pre-existing flake. Across the test-results DB it failed on 15 SHAs spanning ~13 other PRs and pushes (e.g. PRs 42019, 42014, 41999, 41982, 41970, 41962, 41941, 41909, plus several main pushes), on firefox, msedge and chrome — passing ~5450 other runs. Unrelated to dialog handling, which this PR doesn't touch.

Uncertain

  • [chromium] › mcp/cli-core.spec.ts › fill numeric (timedOut) — only failing occurrence in the DB is this PR's own run; passes on ~7200 other runs. The fill command is non-variadic, so the parser change leaves its path unchanged. Looks like a timeout flake, but with no failure on another SHA I can't call it proven. To be sure I'd want to see it fail (or flip) on a run this PR can't be responsible for.
  • [chrome] › mcp/run-code.spec.ts:21 › browser_run_code_unsafe (timedOut, macos) — same story: sole failure is this PR's run, ~6200 clean elsewhere. The browser_run_code_unsafe tool has nothing to do with the CLI upload/parser changes, so the diff doesn't reach it. Timeout signature, but no cross-run evidence to confirm the flake.

None of the three is caused by this PR. A re-run of the MCP job should clear the two uncertain timeouts.

Triaged by the Playwright bot - agent run

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.

[CLI]: upload rejects a second file although it advertises "one or multiple files"

2 participants