Skip to content

Commit 186e5e7

Browse files
committed
fix(ci): improve CocoaPods install resilience against CDN rate limiting
Remove the standalone `pod repo remove trunk` step that runs before every `pod install`. On ephemeral Cirrus runners the only source of trunk specs is the actions/cache restore — deleting them forces a full CDN re-download (thousands of HTTP requests) on every run, increasing the surface area for 429 rate-limit errors. Move trunk removal into `on_retry_command` so cached specs are used for an incremental `--repo-update` on the first attempt (low CDN load), and only cleared on failure for a clean retry. Additional improvements: - Increase max_attempts from 2 to 3 (matches other retry steps) - Increase retry_wait_seconds from 30 to 60 (longer backoff for CDN 429) - Add ::warning:: annotation on retry for visibility in Actions UI - Add COCOAPODS_DISABLE_STATS=true to skip analytics during CI Made-with: Cursor
1 parent 9dc9557 commit 186e5e7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/actions/setup-e2e-env/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -315,19 +315,19 @@ runs:
315315
${{ runner.os }}-cocoapods-specs-
316316
continue-on-error: true
317317

318-
- name: Clear CocoaPods trunk to prevent stale specs
319-
if: ${{ inputs.platform == 'ios' }}
320-
run: pod repo remove trunk || true
321-
shell: bash
322-
323318
- name: Install CocoaPods via bundler
324319
if: ${{ inputs.platform == 'ios'}}
325320
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
326321
with:
327322
timeout_minutes: 15
328-
max_attempts: 2
329-
retry_wait_seconds: 30
323+
max_attempts: 3
324+
retry_wait_seconds: 60
325+
on_retry_command: |
326+
echo "::warning::CocoaPods install failed, retrying after trunk cleanup..."
327+
pod repo remove trunk || true
330328
command: cd ios && bundle exec pod install --repo-update
329+
env:
330+
COCOAPODS_DISABLE_STATS: 'true'
331331

332332
- name: Install applesimutils
333333
if: ${{ inputs.platform == 'ios' }}

0 commit comments

Comments
 (0)