-
Notifications
You must be signed in to change notification settings - Fork 224
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
remote_execution: implement OSS write_action_result
for local_only
cache uploads
#764
Open
thoughtpolice
wants to merge
1
commit into
facebook:main
Choose a base branch
from
thoughtpolice:aseipp/push-lpnpzpoovqpr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
remote_execution: implement OSS write_action_result
for local_only
cache uploads
#764
thoughtpolice
wants to merge
1
commit into
facebook:main
from
thoughtpolice:aseipp/push-lpnpzpoovqpr
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-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
Sep 3, 2024
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
from
September 4, 2024 16:19
69c97fc
to
24771e8
Compare
@JakobDegen @ndmitchell PTAL if you get a chance. I think I've solved every major follow up for this change from the original PR, including Neil's (I know it's been a long time!), so I think this is OK to merge and strictly an improvement. |
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
4 times, most recently
from
September 6, 2024 01:11
586bb96
to
762456a
Compare
We're very interested in this - it would be a dramatic improvement for the way we use buck2 at System Initiative. Yum. |
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
2 times, most recently
from
September 8, 2024 22:26
bdad79a
to
a7dc8a3
Compare
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
2 times, most recently
from
September 20, 2024 22:15
b9d43ba
to
0878208
Compare
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
from
September 29, 2024 01:28
0878208
to
33b0fc1
Compare
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
2 times, most recently
from
October 16, 2024 20:35
b57bed5
to
f95ec50
Compare
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
from
October 20, 2024 20:35
f95ec50
to
ed6a836
Compare
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
from
October 28, 2024 19:48
ed6a836
to
895849d
Compare
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
2 times, most recently
from
November 12, 2024 22:29
ba3e981
to
5e8cc1d
Compare
…` cache uploads Forward port of part of <facebook#477>, which implements code in the OSS path for putting results of actions marked `local_only = True` into the RBE `ActionCache`. For people actually using the "remote execution" part of RBE and not just a cache, this rather large omission in the system will often be transparently mitigated because RBE services will not only record `ActionCache` entries on your behalf, they will also implement "EX-to-AC" forwarding where any execution calls will immediately get looked up in the `ActionCache` anyway as an optimization. Which means you'll never see this for things that properly hit CAS inputs/outputs. However, a `CommandExecutorConfig` configured with `remote_enabled = False` can still enable `remote_cache_enabled = allow_cache_uploads = True` which will both enable the ActionCache/CAS support, and also allow uploads to those interfaces too. The most useful example of this type of setup is in a CI system like GitHub Actions: where you run the build inside a container or image that provides something quasi-hermetic (e.g. including your toolchains), while the RBE system is purely a cache storing inputs/outputs/ActionCache entries and never uses remote execution. The hope is that this functionality will soon be plug-and-play on GitHub using an RBE-to-GHA caching proxy, so Buck2 projects will be able to get a quick and easy cache, but without RE. Therefore this functionality will become highly useful. Co-authored-by: Austin Seipp <aseipp@pobox.com>
thoughtpolice
force-pushed
the
aseipp/push-lpnpzpoovqpr
branch
from
November 19, 2024 23:05
5e8cc1d
to
f780555
Compare
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Forward port of part of #477, which implements code in the OSS path for putting results of actions marked
local_only = True
into the RBEActionCache
.For people actually using the "remote execution" part of RBE and not just a cache, this rather large omission in the system will often be transparently mitigated because RBE services will not only record
ActionCache
entries on your behalf, they will also implement "EX-to-AC" forwarding where any execution calls will immediately get looked up in theActionCache
anyway as an optimization. Which means you'll never see this for things that properly hit CAS inputs/outputs.However, a
CommandExecutorConfig
configured withremote_enabled = False
can still enableremote_cache_enabled = allow_cache_uploads = True
which will both enable the ActionCache/CAS support, and also allow uploads to those interfaces too.The most useful example of this type of setup is in a CI system like GitHub Actions: where you run the build inside a container or image that provides something quasi-hermetic (e.g. including your toolchains), while the RBE system is purely a cache storing inputs/outputs/ActionCache entries and never uses remote execution.
The hope is that this functionality will soon be plug-and-play on GitHub using an RBE-to-GHA caching proxy, so Buck2 projects will be able to get a quick and easy cache, but without RE. Therefore this functionality will become highly useful.
Testing
I can submit tests too, though I'm not sure where. But, using the testing example from #477, running
./buck2 clean && BUCK_LOG=buck2_execute_impl=debug ./buck2 build -v3 //:
where./buck2
is the dotslash build from the2024-09-02
tag gets me:The
(Not supported)
comes directly from the previous code and is the error mentioned by Neil and Cormac in the previous issue.Executing with this patch (truncated output of the exact same command above):
And then running the command again, showing a cache hit: