Skip to content

[build-tools] - handle sentry-cli upload failures as non-fatal#3808

Open
AbbanMustafa wants to merge 3 commits into
mainfrom
mus/resolve-sentry-upload-err
Open

[build-tools] - handle sentry-cli upload failures as non-fatal#3808
AbbanMustafa wants to merge 3 commits into
mainfrom
mus/resolve-sentry-upload-err

Conversation

@AbbanMustafa
Copy link
Copy Markdown
Contributor

@AbbanMustafa AbbanMustafa commented May 29, 2026

Why

~500 builds fail per week that have the sentry-cli configured. Sentry sourcemap/dSYM upload failures can currently fail an otherwise successful build. These failures are often caused by Sentry configuration or transient upload issues, and Sentry already supports SENTRY_ALLOW_FAILURE=true for this case.

› Executing ArvidListen » Bundle React Native code and images

❌  error: sentry-cli - To disable source maps auto upload, set SENTRY_DISABLE_AUTO_UPLOAD=true in your environment variables. Or to allow failing upload, set SENTRY_ALLOW_FAILURE=true


❌  error: sentry-cli -   INFO    2026-05-28 03:25:42.340869 -07:00 Loaded file referenced by SENTRY_PROPERTIES (sentry.properties)


❌  error: An organization ID or slug is required (provide with --org)

Screenshot 2026-05-29 at 6 17 30 PM Screenshot 2026-05-29 at 6 31 11 PM

How

Added a shared build-tools helper that sets SENTRY_ALLOW_FAILURE=true by default for build runs, unless Sentry upload behavior is already explicitly configured.

The helper does not override:

  • SENTRY_ALLOW_FAILURE
  • SENTRY_DISABLE_AUTO_UPLOAD
  • EAS_BUILD_FAIL_ON_SENTRY_UPLOAD_ERROR=1

Wired the helper into both native build paths:

  • Android Gradle command env
  • iOS Fastlane gym env

Test Plan

Added build-tools tests:

yarn jest-unit src/utils/__tests__/sentryUpload.test.ts src/ios/__tests__/fastlane.test.ts src/android/__tests__/gradle.test.ts --runInBand

Result:

PASS src/ios/__tests__/fastlane.test.ts
PASS src/android/__tests__/gradle.test.ts
PASS src/utils/__tests__/sentryUpload.test.ts

Test Suites: 3 passed, 3 total
Tests:       9 passed, 9 total

@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.43%. Comparing base (2c1837f) to head (0b4534d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3808      +/-   ##
==========================================
- Coverage   57.46%   57.43%   -0.02%     
==========================================
  Files         911      914       +3     
  Lines       39480    39572      +92     
  Branches     8271     8294      +23     
==========================================
+ Hits        22684    22725      +41     
- Misses      15328    15377      +49     
- Partials     1468     1470       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AbbanMustafa AbbanMustafa added the no changelog PR that doesn't require a changelog entry label May 29, 2026
@github-actions
Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant