Skip to content

[CI] Surface and fix recurrent iOS Sentry size-analysis upload failures #99083

Description

@Beamanator

🤖 Posted by Codex, an AI coding agent acting for @Beamanator.

Summary

Upload iOS build to Sentry for size analysis is failing almost continuously, but the deployment workflow remains green and the real sentry-cli error is discarded.

Evidence

Why diagnosis is currently impossible

The composite action captures the CLI output in a command substitution:

OUTPUT=$(npx sentry-cli build upload "$ASSET" ... 2>&1)
echo "$OUTPUT"

GitHub runs Bash with -e. When sentry-cli exits non-zero, the assignment itself exits non-zero, so the step stops before echo "$OUTPUT". Its stderr is therefore captured and lost.

Both the composite upload step and the workflow job use continue-on-error, so the deploy stays successful while GitHub records only the unhelpful exit-code annotation. We can prove that sentry-cli is the failing command, but cannot determine whether the immediate cause is Sentry authentication, an API/quota error, or invalid build metadata from historical logs.

Proposed fix

  1. Preserve and print the CLI output before failing:
set +e
OUTPUT=$(bunx sentry-cli build upload "$ASSET" \
  --org expensify \
  --project app \
  --build-configuration Release \
  --log-level info 2>&1)
EXIT_CODE=$?
set -e
printf '%s\n' "$OUTPUT"

if (( EXIT_CODE != 0 )); then
  echo "::error::Sentry size-analysis upload failed (exit $EXIT_CODE)"
  exit "$EXIT_CODE"
fi
  1. Keep the outer job non-blocking only if that is intentional, but retain the emitted diagnostic in the action log.
  2. Add explicit logging around the release-artifact download so an absent/invalid IPA is distinguishable from a Sentry upload failure.
  3. Re-run a production upload after the observability fix and use the retained sentry-cli output to address the actual service/configuration cause.

Acceptance criteria

  • A failed upload logs the complete sentry-cli diagnostic.
  • The workflow clearly distinguishes artifact-download failures from Sentry-upload failures.
  • The next production run either uploads successfully or provides enough evidence to fix the remaining root cause.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions