Skip to content

feat: add ignoreUploadFailures to Cypress and the CLI - #422

Merged
gregberge merged 3 commits into
mainfrom
claude/arg-516-ignore-upload-failures-09dace
Nov 17, 2026
Merged

gregberge merged 3 commits into
mainfrom
claude/arg-516-ignore-upload-failures-09dace

Conversation

@gregberge

@gregberge gregberge commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes ARG-516. Someone asked on the docs whether CI can stay green when the upload fails, for example before the Argos project is linked. ignoreUploadFailures already exists in the Playwright reporter and the Vitest plugin (and the Storybook Vitest plugin through it). This PR adds it to the integrations that didn't have it. It's off by default; when it's on, the error is logged and the run doesn't fail.

CLI (argos upload)

  • New --ignore-upload-failures flag, also settable with ARGOS_IGNORE_UPLOAD_FAILURES. Puppeteer and WebdriverIO users upload through the CLI.
  • The env var is parsed like the core parses ARGOS_SUBSET: any value except empty or false turns it on. It doesn't use commander's .env(), which turns a boolean flag on whenever the variable is defined, so ARGOS_IGNORE_UPLOAD_FAILURES=false would have enabled it.
  • The warning says whether the flag or the env var turned it on, so a green CI run is easy to trace.
  • Bad --parallel* arguments still fail the command, because they're usage errors rather than upload failures.
  • Errors that aren't an Error now stop the spinner. Before, process.exit(1) hid this, but once the command can return normally, a spinner left running would keep the process alive.

Cypress (registerArgosTask)

  • New ignoreUploadFailures option, handled in after:run.
  • uploadToArgos and ignoreUploadFailures are no longer forwarded to upload().

Storybook Test Runner

  • No package change. The Test Runner only takes screenshots, and its docs and example upload with argos upload afterwards, so the CLI flag covers it.

Type of changes

enhancement

Checklist

  • I have read the CONTRIBUTING doc
  • The commits message follows the Conventional Commits' policy
  • Lint and unit tests pass locally
  • I have added tests if needed

Optional checks:

  • My changes requires a change to the documentation
  • I have updated the documentation accordingly

Further comments

Testing

  • Unit tests cover how the flag and the env var are read (packages/cli/src/commands/upload.test.ts).
  • New e2e tests (packages/cli/e2e/upload-ignore-failures.test.ts) run the built CLI with a malformed token, so the upload fails on config validation before any network call. They need no real token or API access and take about 0.4s each. They check that the command fails by default and passes with the flag or the env var.
  • I ran Cypress 16.3 by hand with an upload that fails: exit code 1 without the option (Cypress reports the after:run error), exit code 0 with it, with the error and the warning logged.
  • Types, lint and formatting pass for cli and cypress, and all 180 CLI unit tests pass.

Not covered

  • In parallel mode, argos finalize still fails when every upload was skipped. This was already true for Playwright.
  • The docs (Cypress reference, CLI reference, Test Runner quickstart) will get a separate argos-ci/docs PR once this is released.

🤖 Generated with Claude Code

gregberge and others added 2 commits November 16, 2026 21:11
Let `argos upload` exit successfully when the upload fails, after logging
the error, so CI stays green when Argos can't be reached or the project
isn't set up yet. Puppeteer, WebdriverIO and Storybook Test Runner users
upload through the CLI, so this covers them too.

Also settable with ARGOS_IGNORE_UPLOAD_FAILURES, read like the core reads
ARGOS_SUBSET (anything but empty or "false"). Commander's `.env()` would
turn the flag on for any value, including "false".

Refs ARG-516

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same option as the Playwright reporter and the Vitest plugin: when the
upload in `after:run` fails, log the error instead of failing the Cypress
run.

`uploadToArgos` and `ignoreUploadFailures` are no longer forwarded to
`upload`.

Refs ARG-516

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregberge gregberge added the enhancement New feature or request label Nov 16, 2026
@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

ARG-516

- Make the CLI e2e upload fail on token validation instead of on a closed
  port, so each test no longer waits ~7s on the API client's retries.
- Merge the env-parsing unit tests into one table and assert the e2e
  failure with a single `toThrow` matcher.
- Inline the single-use env helper in the CLI, and drop a no-op default
  in the Cypress task.

Refs ARG-516

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregberge
gregberge requested a review from jsfez November 16, 2026 20:40
@gregberge
gregberge merged commit df1ca90 into main Nov 17, 2026
77 checks passed
@gregberge
gregberge deleted the claude/arg-516-ignore-upload-failures-09dace branch November 17, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant