Skip to content

Stop the Cypress runs in CI from filling the Sentry quota - #928

Merged
rzueger merged 2 commits into
developfrom
claude/eloquent-tesla-qhk8n0
Nov 21, 2026
Merged

rzueger merged 2 commits into
developfrom
claude/eloquent-tesla-qhk8n0

Conversation

@rzueger

@rzueger rzueger commented Nov 21, 2026

Copy link
Copy Markdown
Member

Problem

Sentry warned that 82% of the reserved error volume is used. Almost all of it (4,092 of about 4,110 errors since Nov 10) is one issue, JAVASCRIPT-REACT-75: permission_denied at /settings/{movementRetentionDays,messageRetentionDays,customsSelfDeclarationEmails,customsSyncStatus}.

None of these events come from a deployed site. All of them have the URL http://0.0.0.0:8080/, which is the dev server the "Build and test on PR" workflow starts for cy:test and cy:test:api. Each CI run sent exactly 92 errors, and 172 since cy:test:api was added on Nov 19. They were tagged production because Sentry.init reported from every build.

The errors come from the admin-only settings watchers (watchSettingWhileAdmin). Every Cypress spec signs an admin in and out in its before() hook. On sign-out, Firebase cancels the four admin listeners with permission_denied before the sagas remove them, and the cancel callback sent each one to Sentry.

Changes

  • Sentry off on the dev server: Sentry.init now has enabled: !__DEV__. Only npm start sets DEV (and Cypress uses it), so npm run build, i.e. the deployed test and production sites, still report.
  • No report for listeners cancelled by sign-out: the settings watcher skips Sentry when a listener is cancelled with PERMISSION_DENIED and nobody is signed in any more. To check that, util/firebase gets a small isSignedIn() helper. A denial while someone is still signed in, and any other kind of cancel, is still reported.

CI builds each PR branch's own code, so other open branches keep sending these errors until they include this change.

Verification

  • npm test: 357 suites, 7,910 tests pass (new tests for isSignedIn and for the two cancel cases)
  • npm run typecheck: no errors

Generated by Claude Code

The Cypress runs in CI use the dev server, and each run sent 92 to 172
errors to Sentry, tagged as production. Since the PR builds picked up
in November, they used up most of the reserved error volume.
When an admin signs out, Firebase cancels the listeners on the
admin-only settings with permission_denied, often before the sign-out
reaches the sagas that would remove them. Each such sign-out sent four
errors to Sentry. A denial while someone is still signed in, and any
other cancel, is still reported.
@rzueger
rzueger merged commit 4bb52d8 into develop Nov 21, 2026
2 checks passed
@rzueger
rzueger deleted the claude/eloquent-tesla-qhk8n0 branch November 21, 2026 07:58
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.

2 participants