Repository navigation
feat: add ignoreUploadFailures to Cypress and the CLI - #422
Merged
Merged
Conversation
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>
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
ignoreUploadFailuresalready 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)--ignore-upload-failuresflag, also settable withARGOS_IGNORE_UPLOAD_FAILURES. Puppeteer and WebdriverIO users upload through the CLI.ARGOS_SUBSET: any value except empty orfalseturns it on. It doesn't use commander's.env(), which turns a boolean flag on whenever the variable is defined, soARGOS_IGNORE_UPLOAD_FAILURES=falsewould have enabled it.--parallel*arguments still fail the command, because they're usage errors rather than upload failures.Errornow 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)ignoreUploadFailuresoption, handled inafter:run.uploadToArgosandignoreUploadFailuresare no longer forwarded toupload().Storybook Test Runner
argos uploadafterwards, so the CLI flag covers it.Type of changes
enhancementChecklist
Optional checks:
Further comments
Testing
packages/cli/src/commands/upload.test.ts).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.after:runerror), exit code 0 with it, with the error and the warning logged.cliandcypress, and all 180 CLI unit tests pass.Not covered
argos finalizestill fails when every upload was skipped. This was already true for Playwright.🤖 Generated with Claude Code