Skip to content

Distinguish unavailable Maven repositories from missing prebuilt artifacts - #60552

Open
izbari wants to merge 1 commit into
react:mainfrom
izbari:fix/prebuilt-artifact-probe
Open

izbari wants to merge 1 commit into
react:mainfrom
izbari:fix/prebuilt-artifact-probe

Conversation

@izbari

@izbari izbari commented Dec 4, 2026

Copy link
Copy Markdown

Summary

Fixes #60198. When Maven cannot be reached, the CocoaPods scripts can select a source build of React Native or Hermes. A connection failure provides no evidence that the corresponding prebuilt binary is missing. In particular, evaluating the Hermes podspec against a refused connection produced a valid Git source spec for the stable branch.

Use the same HEAD probe for React Native Core, its dependencies and Hermes. Retry transient failures and check the next configured repository if one cannot answer. Cache successful and missing responses. If no repository supplies the artifact, allow the existing source fallback when the probes confirm absence (404/410), and report an inconclusive lookup otherwise. Local tarball overrides bypass these probes.

Changelog

[IOS] [FIXED] - Prevent CocoaPods from silently selecting a source build when it cannot verify prebuilt artifact availability.

Test Plan

  • Wrote the regression tests first. With a local HTTP server returning 503 and then 200, the unmodified Hermes source selector chose its stable Git branch. A persistent 403 also let the Core, dependencies and Hermes release probes report the artifact as missing.
  • Ran the three Ruby test files under packages/react-native/scripts/cocoapods/__tests__ individually with ruby: prebuilt_artifact-test.rb, maven_mirror_flag-test.rb, and rndependencies-test.rb. All 17 tests and 37 assertions passed. Coverage includes recovery from 503, confirmed 404, alternate repository success, and mixed inconclusive/missing results.
  • Ran pod ipc spec hermes-engine.podspec in packages/react-native/sdks/hermes-engine with ENTERPRISE_REPOSITORY set to a loopback port refusing connections. On unmodified main CocoaPods exited 0 and emitted a Hermes Git source spec. With this change it exited 1 and reported the Maven probe failure (curl exit 7). A minimal Podfile depending on that local pod also stopped at dependency analysis in an actual pod install, with the same diagnostic. No iOS application build was run.

Codex assisted with implementation and local verification.

…facts

Signed-off-by: izbari <73957984+izbari@users.noreply.github.com>
@github-actions github-actions Bot added the Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. label Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] pod install silently falls back to building from source when the prebuilt-artifact probe fails transiently (curl error / HTTP 000)

1 participant