ci: always run pod install in the contract job, even on a Pods cache hit (#98) - #99
Merged
Merged
Conversation
…hit (#98) React Native codegen runs inside pod install and writes its generated sources to example/ios/build/generated, outside the cached Pods path, so skipping pod install on an exact cache hit leaves the ReactCodegen pod target pointing at files that do not exist and every iOS contract build fails within a minute. Keep the cache as a warm-checkout speedup only, mirroring the convention already documented in ci.yml. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
No changeset needed |
The contract job installs the packed candidate tarball and pod-installs for Release Detox builds, but saved that Pods tree under the same macOS-cocoapods-<Podfile.lock> key ci.yml uses for its Debug build. When build-ios restored the contract job's entry from main, pod install saw an in-sync sandbox (only Reorderable was reinstalled) and the Debug app linked against Release prebuilt React core binaries, failing on debug-only symbols such as Props::getDebugProps. Prefix the contract key so the two flavors can never alias; the poisoned main entry has been deleted from the Actions cache. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes #98.
Root cause
#97 added a
Podscache to the Exact package candidatecontractjob with two structural defects:1.
pod installwas skipped on an exact cache hit. React Native codegen runs insidepod installand writes its generated sources toexample/ios/build/generated/ios/— outside the cachedexample/ios/Podspath — so a cache hit restores a Pods project whoseReactCodegentarget references sources that were never generated. All three iOS contract jobs (ios27.native,ios27.fallback,ios26.auto-fallback) then fail in ~1 minute withBuild input file cannot be found: .../ReactCodegen/.... The first run after #97 passed because the cache was empty; every run since (push f3b11c7, run 34016165910, and the nightly 34020531106) hit the key on the unchangedPodfile.lockand failed deterministically.2. The cache key collides with ci.yml's cocoapods cache. Both workflows cached
example/ios/PodsundermacOS-cocoapods-<Podfile.lock hash>, but the contract job installs the packed candidate tarball and pod-installs for Release Detox builds, whileci.yml'sbuild-iosbuilds Debug withRCT_USE_PREBUILT_RNCORE=1. The 580b7f2 push run saved the Release-flavored tree onrefs/heads/main; this PR's firstbuild-iosrun restored it,pod installsaw an in-sync sandbox (onlyReorderablewas reinstalled), and the Debug app linked against Release prebuilt React core binaries — failing on debug-only symbols (facebook::react::Props::getDebugProps,DebugStringConvertiblevtable, …).Fix
bundle install+bundle exec pod installunconditionally in the contract job, keeping the cache purely as a speedup for the Pods checkout — mirroring the conventionci.ymlalready documents ("Always run the Gemfile-pinned pod install, even on a Pods cache hit") and restoring the pre-ci: make the exact package candidate the sole push-to-main gate (#74) #97 install behavior.macOS-contract-cocoapods-…) so the two configuration flavors can never alias.macOS-cocoapods-…entry onrefs/heads/main(cache id 7372072759) has been deleted from the Actions cache.Note on the fourth failed job
android.fallbackon run 34016165910 failed differently: thescoped-dropcase recorded a correct contract outcome, then Detox's internaladb reverse --remove tcp:37184teardown threw ("listener not found") and the case was classifiedcontract(so no retained retry). The same job passed on the nightly run — a transient Detox teardown flake, tracked separately in #100.🤖 Generated with Claude Code