-
Notifications
You must be signed in to change notification settings - Fork 4.4k
[7.5.0] Distinguish between input and output prefetching in request metadata #25057
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
Conversation
ea4ad30 added an action as context for prefetches with BwoB, but assumed that all callers would use the prefetcher for inputs to locally executed actions. However, since then, it has also been used to download outputs of completed actions that have been explicitly requested (e.g. as outputs of top-level targets or those matching the regex path patterns). This resulted in downloads with a `prefetcher` action ID and action details for the action that produced the file, rather than consumed it, resulting in confusing situations for observability tools. This is fixed by separately tracking the reason for the fetch. Using an action ID of `output` when the action has the requested file as an output, and "input" when the action has the requested file as an input. Closes bazelbuild#25040. PiperOrigin-RevId: 719246746 Change-Id: Ib95ff65ba68112b1a38ab3022e5b1a19ef74cc9f (cherry picked from commit 998e762)
|
Could you please add the relevant RELNOTES for this? Especially since I saw in the original PR that this is technically a breaking change (I assume we're aware of that and still think it's worth cherry-picking). |
|
The change during import made this technically breaking, but as it was the metadata was actually misleading, so I think this is still an improvement. Added RELNOTES. |
|
We could make this non-breaking by replacing @coeuvre What do you think, do the backwards compatibility guarantees extend this far? |
|
That said, since consumers would still need to support 7.4.0 and earlier, which use |
|
I would prefer to keep "input" and "output". |
|
Sounds good! |
84e9336
ea4ad30 added an action as context for prefetches with BwoB, but assumed that all callers would use the prefetcher for inputs to locally executed actions. However, since then, it has also been used to download outputs of completed actions that have been explicitly requested (e.g. as outputs of top-level targets or those matching the regex path patterns). This resulted in downloads with a
prefetcheraction ID and action details for the action that produced the file, rather than consumed it, resulting in confusing situations for observability tools.This is fixed by separately tracking the reason for the fetch. Using an action ID of
outputwhen the action has the requested file as an output, and "input" when the action has the requested file as an input.Closes #25040.
PiperOrigin-RevId: 719246746
Change-Id: Ib95ff65ba68112b1a38ab3022e5b1a19ef74cc9f
(cherry picked from commit 998e762)
RELNOTES: CAS requests made when Bazel downloads a blob with Build without the Bytes enabled now provide metadata with an action ID of
inputif the blob is downloaded as the input to a local action andoutputif it is a requested action output.