Skip to content

Conversation

@tjgq
Copy link
Contributor

@tjgq tjgq commented Oct 16, 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

Closes #26898.

PiperOrigin-RevId: 819717587
Change-Id: If658fcf239b0923450fdf394556268caaeded247

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 #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

Closes #26898.

PiperOrigin-RevId: 819717587
Change-Id: If658fcf239b0923450fdf394556268caaeded247
@tjgq tjgq requested a review from a team as a code owner October 16, 2025 07:37
@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 Oct 16, 2025
@iancha1992 iancha1992 added this pull request to the merge queue Oct 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2025
@iancha1992 iancha1992 added this pull request to the merge queue Oct 21, 2025
Merged via the queue into release-8.5.0 with commit 577ed86 Oct 21, 2025
50 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Oct 21, 2025
@tjgq tjgq deleted the 8.5.0-inmemory-outputs branch November 4, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants