Skip to content

fix(build): Prevent update-android.sh from failing on SIGPIPE - #6777

Merged
antonis merged 2 commits into
mainfrom
fix/update-android-sigpipe
Sep 24, 2026
Merged

antonis merged 2 commits into
mainfrom
fix/update-android-sigpipe

Conversation

@antonis

@antonis antonis commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Fixes an Android autoupdater regression introduced with #6238

💡 Motivation and Context

The daily/on-merge Update Dependencies → android job has been failing on main (e.g. this run) with:

scripts/update-android.sh: line 28: echo: write error: Broken pipe
Failed to find expectedSentryAndroidVersion in ../sentry.gradle.kts

💚 How did you test it?

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

The Android dependency updater failed on main with:

    scripts/update-android.sh: line 28: echo: write error: Broken pipe
    Failed to find expectedSentryAndroidVersion in ../sentry.gradle.kts

The version check used `echo "$sentryGradleContent" | grep -q ...` under
`set -o pipefail`. `grep -q` exits on the first match and closes the pipe;
because sentry.gradle.kts is ~54KB with the match near the top, `echo` can
lose the race and get SIGPIPE. With pipefail the pipeline reports echo's
non-zero status, so `if !` inverts into the failure branch even though the
string is present. This is timing dependent, hence green locally but red in CI.

Grep the file directly so there is no writer to receive SIGPIPE.

Also adds a temporary workflow to verify the fix on the PR branch (to be
removed before merge).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • fix(build): Prevent update-android.sh from failing on SIGPIPE by antonis in #6777

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against 70db1dd

@antonis
antonis marked this pull request as ready for review September 24, 2026 10:04
@antonis
antonis merged commit 6c4c1e5 into main Sep 24, 2026
63 of 68 checks passed
@antonis
antonis deleted the fix/update-android-sigpipe branch September 24, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants