[build-tools] handle custom Gymfile err in xcactivitylog#3790
Merged
Conversation
Signed-off-by: Ash Wu <hsatac@gmail.com>
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3790 +/- ##
==========================================
+ Coverage 57.21% 57.22% +0.02%
==========================================
Files 905 905
Lines 39290 39303 +13
Branches 8235 8237 +2
==========================================
+ Hits 22475 22488 +13
Misses 15345 15345
Partials 1470 1470 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Subscribed to pull request
Generated by CodeMention |
sjchmiela
approved these changes
May 25, 2026
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.
Why
Fix Sentry TURTLE-V2-WORKER-1WT (ENG-21383) — 48 events of
xclogparserfailing during thePARSE_XCACTIVITYLOGphase with stderr:runFastlaneGymalways returnsderivedDataPath = <ios>/build, but projects with a customios/Gymfilecan set a differentderived_data_path(or omit it entirely, in which case Xcode uses its default DerivedData location). xclogparser then runs against a directory that has no.xcactivitylogfiles and fails.How
Added a pre-flight check in
parseAndReportXcactivitylogthat lists<derivedDataPath>/Logs/Build/:.xcactivitylogfiles are present, log actionable guidance pointing users at the Gymfile lines they need and skip the analysis (no Sentry — this is user config, not an engineering bug).readdirfails with anything other thanENOENT(e.g.EACCES,EMFILE), rethrow so it still lands in Sentry under a newchecking_xcactivitylog_existencephase tag — real infra problems are not masked by the swallow.Return type changed from
Promise<void>toPromise<{ skipped: boolean }>so the caller inbuilders/ios.tscan callctx.markBuildPhaseSkipped()and reflect the correct phase status in the build summary.Test Plan
Unit tests in
xcactivitylog.test.tscover the four pre-check branches:Logs/Buildexists but has no.xcactivitylogfiles → skipped + actionable Gymfile log, no SentryLogs/Builddoes not exist (ENOENT) → skipped, no SentryLogs/Buildhas only non-.xcactivitylogentries (e.g.LogStoreManifest.plist) → skippedreaddirfails withEACCES→ Sentry captured withchecking_xcactivitylog_existencephase tag, no misleading Gymfile message loggedExisting tests updated to assert the new
{ skipped }return shape. 41/41 tests pass; typecheck/lint/fmt clean.