I have an inconsistent Xcode Cloud failure that I'm hoping to learn more about?
Additional context is available in Apple Support case 102378073626 and Feedback Assistant FB13769150.
Every 3 months, ~half of my project's Xcode Cloud builds will fail for a few days in a row. I usually file a support request with Apple, they fix something on their end, builds succeed, and then exhibit the same failures again in 3 months.
I'm hoping to learn anything that y'all can share about:
- Why does this happen?
- Does it coincide with new macOS versions being deployed onto Xcode Cloud?
- What did Apple do to fix it each time?
- Is there anything I can change about my project to make the failure less likely? (Such as putting a delay between the clone, brew install, and pod install steps that all hammer GitHub?)
Specific symptoms: Xcode Cloud builds will fail after receiving an HTTP 502 from GitHub. This usually happens when it attempts to clone a repo, brew install, or pod install.
One example:
[!] Error installing FirebaseSessions [!] /usr/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /Volumes/workspace/tmp/d20240809-12044-znknw7 --template= --single-branch --depth 1 --branch CocoaPods-10.28.0 Cloning into '/Volumes/workspace/tmp/d20240809-12044-znknw7'... error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 fatal: expected flush after ref listing Error Command exited with non-zero exit-code: 1