Skip to content

Conversation

ulrfa
Copy link
Contributor

@ulrfa ulrfa commented Sep 4, 2025

The documentation for --experimental_inmemory_dotd_files and --experimental_inmemory_jdeps_files states '...instead of being written to disk', but the files were actually written to both memory and disk (unless combined with BwoB). This caused two problems:

  1. Unnecessary overhead from remotely downloading all in-memory files twice.

  2. Paradoxically reduced robustness of --remote_download_all: that flag normally increases Bazel’s resilience to remote cache issues, but because these outputs were kept in memory instead of being written to disk by RemoteSpawnCache.lookup (which handles cache issues gracefully), action finalization treated them as missing on disk and attempted a more fragile download, increasing the risk for "unable to finalize action" failures (see Bazel 7 unable to finalize action due to missing digest for .d files when --experimental_inmemory_dotd_files is set. #22387).

This change ensures that in-memory files are kept exclusively in memory and are not written to disk. This aligns with the documentation and addresses both problems.

Fixes #22387

@ulrfa ulrfa marked this pull request as ready for review September 4, 2025 16:10
@ulrfa ulrfa requested a review from a team as a code owner September 4, 2025 16:10
@github-actions github-actions bot added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Sep 4, 2025
The documentation for --experimental_inmemory_dotd_files
and --experimental_inmemory_jdeps_files states
'...instead of being written to disk,' but the files were
actually written to both memory and disk (unless combined
with BwoB). This caused two problems:

1) Unnecessary overhead from remotely downloading all
   in-memory files twice.

2) Paradoxically reduced robustness of
   --remote_download_all: that flag normally increases
   Bazel’s resilience to remote cache issues, but because
   these outputs were kept in memory instead of being
   written to disk by RemoteSpawnCache.lookup (which
   handles cache issues gracefully), action finalization
   treated them as missing on disk and attempted a more
   fragile download, increasing the risk for
   "unable to finalize action" failures (see bazelbuild#22387).

This change ensures that in-memory files are kept
exclusively in memory and are not written to disk. This
aligns with the documentation and addresses both problems.

Fixes bazelbuild#22387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bazel 7 unable to finalize action due to missing digest for .d files when --experimental_inmemory_dotd_files is set.
1 participant