MOBILE-0000: Treat trunk 409 Conflict as success in pod push wrapper#709
Merged
Conversation
CocoaPods trunk sometimes returns 504 Gateway Timeout while the spec still lands in CocoaPods/Specs. Re-running the failed publish job then fails again with 409 "Unable to accept duplicate entry", keeping the release red even though it is actually done. Wrap pod trunk push in .github/pod-trunk-push.sh and treat 409 as a successful no-op so a single re-run closes the release cleanly.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a small wrapper around pod trunk push to make CocoaPods publishing idempotent in CI by treating trunk’s “409 Conflict / duplicate entry” response as a successful no-op. This addresses the case where trunk times out (e.g., 504) but the spec is actually published, and a rerun would otherwise fail and keep the workflow red.
Changes:
- Introduce
.github/pod-trunk-push.shto wrappod trunk push, capture output, and exit 0 on trunk 409/duplicate-entry responses. - Update the reusable publish workflow to use the wrapper for all three podspec publishes (MindboxLogger, MindboxNotifications, Mindbox).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/publish-reusable.yml | Routes CocoaPods trunk publishes through the new wrapper to make reruns succeed after a transient trunk failure. |
| .github/pod-trunk-push.sh | Implements the 409-as-success behavior for pod trunk push while preserving normal failure behavior otherwise. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Vailence
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.
CocoaPods trunk sometimes returns 504 Gateway Timeout while the spec still lands in CocoaPods/Specs. Re-running the failed publish job then fails again with 409 "Unable to accept duplicate entry", keeping the release red even though it is actually done.
Wrap pod trunk push in .github/pod-trunk-push.sh and treat 409 as a successful no-op so a single re-run closes the release cleanly.