You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like your CI jobs build from scratch on every build, and thus
take many hours of workflow time (e.g., 7 hours for this workflow).
These cause builds for the entire TF organization to queue.
Bazel has built-in support for incremental remote caching. This is
not a Travis-style giant opaque cache that needs to be sent to and from
the VM on each run. Instead, it’s a fine-grained key-value store that
stores the results for individual actions on a remote server. It has
transparent integration with GCS and can be used with just a backing
bucket.
Could you please investigate using this? It would make you happy, and it
would make us and everyone else happy.
We use this on TensorBoard. It speeds up our builds from ~75 minutes
(clean slate) to ~4 minutes (no-op). You can look at our workflow file
and our bazelrc for guidance.
@wchargin We will be happy to use bazel cache as this will help speed up our CI process as well. At the moment the biggest blocker is that we don't have a GCS account/credential.
@yongtang I started our internal "official" process for setting up a new GCP project to contain a bucket for SIGs to use, but unfortunately there's a production freeze and my request won't be processed until the 5th of January. This should cover due-diligence for any privacy/security related policy problems, although it's still possible we'll run into other nontechnical issues.
I'm still working on this. It's going slow because there's a complex internal approval process for things like the ability to export service account credentials for bazel.
Another update: I've been working on this with the following assumptions:
bazel build can only cache via a GCP service account credential file
There is no method that doesn't require a service account credential file
Our company security team can grant an exception allowing us to export service account keys, but they must have a prohibitively short lifespan. I'm now looking at whether or not I can automate a process that generates new keys regularly and automatically pushes them to a GitHub Actions secret.
Added a PR #1287 as a first step to introduce the bazel cache. The PR only adds support for git push commit. The forked PR by outside contributors still do not have access yet. We will see if we can address it later.
The read-only bazel cache has been enabled for forked PRs as well now (see PR #1294). We see immediate speedup in all PRs (with macOS build reducing from 1hour20min to 15min).
Thanks a lot to @angerson for the great work, and thanks a lot to tensowflow team, tensorflow community, and google for the support 👍 🎉 🎆 !
Reacted by Austin Anderson, vnghia and Vignesh Kothapalli
Activity
yongtang commentedon Dec 17, 2020
@wchargin We will be happy to use bazel cache as this will help speed up our CI process as well. At the moment the biggest blocker is that we don't have a GCS account/credential.
@angerson @ewilderj @martinwicke Wondering if you can help with GCS account/credential to speed up the build?
angerson commentedon Dec 22, 2020
FYI @theadactyl as well. I'm looking into the technical setup for a TF sub-project for this kind of thing.
angerson commentedon Dec 22, 2020
@yongtang I started our internal "official" process for setting up a new GCP project to contain a bucket for SIGs to use, but unfortunately there's a production freeze and my request won't be processed until the 5th of January. This should cover due-diligence for any privacy/security related policy problems, although it's still possible we'll run into other nontechnical issues.
FYI @perfinion
yongtang commentedon Dec 22, 2020
@angerson Thanks for the update 👍
angerson commentedon Jan 11, 2021
I'm still working on this. It's going slow because there's a complex internal approval process for things like the ability to export service account credentials for bazel.
angerson commentedon Jan 19, 2021
Another update: I've been working on this with the following assumptions:
bazel buildcan only cache via a GCP service account credential fileOur company security team can grant an exception allowing us to export service account keys, but they must have a prohibitively short lifespan. I'm now looking at whether or not I can automate a process that generates new keys regularly and automatically pushes them to a GitHub Actions secret.
kvignesh1420 commentedon Jan 21, 2021
Thanks @angerson !
yongtang commentedon Jan 29, 2021
Added a PR #1287 as a first step to introduce the bazel cache. The PR only adds support for git push commit. The forked PR by outside contributors still do not have access yet. We will see if we can address it later.
yongtang commentedon Jan 29, 2021
The latest master commit reduces macOS build time from
1 hours 24 minsto12 mins:https://github.com/tensorflow/io/runs/1788887957?check_suite_focus=true
ewilderj commentedon Jan 29, 2021
That's pretty cool!
wchargin commentedon Jan 29, 2021
That’s awesome—thanks very much to @angerson for setting this all up!
angerson commentedon Jan 29, 2021
Great!
We're still working on allowing PRs to use the cache, which depends on another policy exemption I'm requesting.
kvignesh1420 commentedon Jan 29, 2021
That would be great! thanks a lot, @angerson.
yongtang commentedon Feb 3, 2021
The read-only bazel cache has been enabled for forked PRs as well now (see PR #1294). We see immediate speedup in all PRs (with macOS build reducing from 1hour20min to 15min).
Thanks a lot to @angerson for the great work, and thanks a lot to tensowflow team, tensorflow community, and google for the support 👍 🎉 🎆 !
ci: turns up GH Action validating all Bazel {build|test} targets (#9110)