Skip to content

[RN] Allow Gemfile evaluation before logger is installed - #59991

Open
cortinico wants to merge 1 commit into
mainfrom
ci-monitor/logger-bootstrap-D131766156
Open

cortinico wants to merge 1 commit into
mainfrom
ci-monitor/logger-bootstrap-D131766156

Conversation

@cortinico

Copy link
Copy Markdown
Contributor

Summary

Allow the three Gemfiles to be evaluated before the declared logger gem is installed, while retaining logger preloading for ActiveSupport/CocoaPods once it is available. Catch only a LoadError whose path is exactly logger; nested dependency failures and initialization exceptions continue to fail.

No gem constraints, lockfiles, test expectations, or CI policies change.

Diagnosis

The latest observed main SHA, 3f54cc20ed702f861fa4641e5ad0d1a95ab771c1, has a deterministic Dependabot failure in addressable update #1701385983:

dependency_file_not_evaluatable
There was an error parsing Gemfile: cannot load such file -- logger
Gemfile:11: require 'logger'

The same signature occurs on its parent a1f6da49ce22736152c98701534bf86690374a4c (job) and on a November 11 run (job). This is not a regression in the latest Flow tooling upgrade, and repeated identical failures across SHAs and updater images do not support treating it as flakiness.

The eager require was introduced by 96d3f911246f81a00644379da364a373fae1f0ca. Its parent evaluates successfully without logger under the same focused probe; the introducing version and current unpatched files fail. That identifies the source-level boundary, not the exact hosted Dependabot environment change that exposed it. No full hosted-image bisect was performed.

Removing the preload outright would reintroduce the older ActiveSupport logger failure. The guard instead permits dependency resolution before installation, preserving the preload in an installed environment and the explicit gem 'logger' declaration.

Test evidence

All change implementation and validation originated in the internal source-of-truth checkout, before this branch was created.

  • Before the fix: all three Gemfiles fail with a genuine Ruby cannot load such file -- logger when its library is absent from the load path.
  • After the fix: 12 focused cases pass across the three files: unavailable logger; available logger and successful preload; nested dependency LoadError propagates; runtime initialization error propagates.
  • Six additional evaluations using the lockfile's Bundler 2.4.12 pass with a simulated missing-logger load error and with logger installed. The installed cases also successfully initialize ActiveSupport 7.0.8 with concurrent-ruby 1.3.7.
  • Ruby syntax checks pass for all three modified Gemfiles.
  • Modified files were checked for lint issues in the internal checkout; none were found.
  • Complete open-PR enumeration (647 PRs at the time of inspection) and prior monitor outcomes were checked for duplicate logger/Gemfile work; no matching open fix was identified.

Risk and limitations

This is a three-file bootstrap fix, not a dependency upgrade. Only the absence of logger during Gemfile evaluation is deferred; other loading or initialization errors remain visible. The hosted Dependabot image/full security-update transaction was not run locally. A hosted updater rerun after the fix reaches main is the final end-to-end check; do not assume the addressable update has been applied by this PR.

Other CI on the observed SHA was progressing normally. Missing Meta Import, CLA, and Internal-Only contexts on that exact SHA remain a separate reporting caveat, not something this change suppresses.

Changelog

[INTERNAL] [FIXED] - Allow Gemfile dependency resolution before logger is installed.

Internal provenance

Created first: D131766156, draft version 472961500. This PR mirrors exactly its three Gemfile changes. Nothing has been merged or landed.

Mirror of internal draft D131766156.

Changelog: [Internal]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 13, 2026
@github-actions

Copy link
Copy Markdown

Warning

Missing Test Plan

Please add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.

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

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant