Replies: 4 comments 7 replies
-
|
As a starting point I have 2 initial questions:
|
Beta Was this translation helpful? Give feedback.
-
|
The commit message contains this:
Do I interpret this correctly to mean that I need to allow Bazel to write to the remote AC directly? Since repository rules still run locally (unless they are cached), this design makes a lot of sense. |
Beta Was this translation helpful? Give feedback.
-
|
I discussed this with @Wyverald at BazelCon: This feature is really good at helping CI operators reduce the typical size of their CI environment. By not having to materialize the The current implementation relies on an Action Cache(AC) write to the remote cache. AC in most enterprise setups is heavily gated and can only be written from a trusted CI worker/pipeline. This is recommended since 2018 through this talk https://youtu.be/5a0ENnZivo0?t=1041 When a user were to introduce a new external dependency, or upgrade a current one, the trusted CI worker machine will have to (a) download the new external deps and (b) calculate the new AC entry to update the remote cache accordingly. This process may require significant disk space to store the downloaded data. Because of this, CI server operators, like myself, will see a typical cached CI workspace using very little disk space, but occasionally, there can be workspaces with 10-50x the disk size. This makes it really hard for us to schedule resources for these CI environments. In addition to this, our CI offering (BuildBuddy Workflows) utilizes a VM snapshot system, which may retain the disk content after each build. The bigger the VM, the harder it is to do the snapshot and distribute it among multiple workers. For this reason, I think the current setup can be improved: a. Providing separate tools to manually create and populate the AC entries without Bazel. Dependency upgrades / newly added can then go through a separate CI step that would prepopulate the AC entry. This means that all Bazel Workspaces in CI will get a cache hit and expect no disk inflation. b. Allowing the reproducible repo rules to run remotely using RBE. This would let us offload the downloads and preparation steps to the remote worker. All downloads are expected to be verified by a checksum to ensure reproducibility. |
Beta Was this translation helpful? Give feedback.
-
|
I could be wrong, but the request metadata seems to be a little bit off from the usual convention: I think the repo name should be placed in the label and the action id should be a fixed constant (i.e. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use this discussion to provide feedback on the new remote repository cache introduced in Bazel 9 as an experimental feature.
FAQs
How do I enable the remote repo contents cache?
--experimental_remote_repo_contents_cachestartup flag.--remote_cacheor--remote_executor.Which repo rules are supported?
repository_ctx.repo_metadata(reproducible = True)to be eligible for caching.repository_ctx.watchor.getenv) are supported. We hope to lift this restriction in the future. You can check a repo with canonical name@@<repo_name>for runtime deps by opening the file$(bazel info output_base)/external/@<repo_name>.marker- all lines after the first one are runtime deps.Beta Was this translation helpful? Give feedback.
All reactions