Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.4.0] Compact execution log improvements #23713

Merged
merged 12 commits into from
Sep 30, 2024

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Sep 23, 2024

Cherry-picks the following changes:

The cherry-picks required introducing a Map<Artifact, RunfilesTree> shim to RunfilesSupplier that matches the Bazel 8 way of obtaining a RunfilesTree from a runfiles middleman via InputMetadataProvider.

Closes #23683
Closes #23710
Closes #23711
Closes #23734

Runfiles trees are now represented with a custom `RunfilesTree` message in the compact execution log. This allows using `InputSet`s to representing all artifacts staged at canonical locations, with only symlinks and root symlinks stored flattened and with explicit runfiles paths.

Since runfile paths can collide, this change makes it necessary to preserve the order of elements in an `InputSet`. The previous representation as repeated ID fields for each type (file, symlink, directory) made this impossible, so the representation has been modified to reference all direct entry IDs in a single repeated field. Since this also reduces the potential for type mismatches between the ID field type and the referenced message type, all other typed IDs are replaced with untyped ID fields. By slightly tweaking the way IDs are generated for nested entries and not emitting IDs for entries that are never referenced (e.g. `Spawn`s), IDs are now consecutive, which simplifies the (possibly concurrent) bookkeeping for consumers by allowing them to use an array to store the entries.

Progress on bazelbuild#18643.

RELNOTES: The compact execution log now stores runfiles in a more compact representation that should reduce the memory overhead and log output size, in particular for test spawns. This change required breaking changes to the (experimental) log format.

Closes bazelbuild#23321.

PiperOrigin-RevId: 676773599
Change-Id: I010653681ffa44557142bf25009e9178b5d68515
(cherry picked from commit c2f539c)
@fmeum fmeum marked this pull request as ready for review September 28, 2024 09:24
@fmeum fmeum requested a review from a team as a code owner September 28, 2024 09:24
@fmeum fmeum requested review from tjgq and removed request for a team September 28, 2024 09:25
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-Configurability platforms, toolchains, cquery, select(), config transitions team-Performance Issues for Performance teams team-Remote-Exec Issues and PRs for the Execution (Remote) team team-Rules-CPP Issues for C++ rules team-Rules-Python Native rules for Python labels Sep 28, 2024
@tjgq tjgq added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Sep 30, 2024
@iancha1992 iancha1992 added this pull request to the merge queue Sep 30, 2024
@iancha1992 iancha1992 removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Sep 30, 2024
Merged via the queue into bazelbuild:release-7.4.0 with commit 53b04fe Sep 30, 2024
51 checks passed
@fmeum fmeum deleted the 23321-cherry branch October 1, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions team-Performance Issues for Performance teams team-Remote-Exec Issues and PRs for the Execution (Remote) team team-Rules-CPP Issues for C++ rules team-Rules-Python Native rules for Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants