-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
stdlib not being cached on remote server #1531
Comments
This might be related to the fact that the standard library is a directory output, not regular file outputs. Buildfarm, for example, doesn't work because of this. I don't have a setup to debug this with cloudbuild right now, but I'm working with that team to get something online. Will let you know as soon as I have more information. |
Ok, thanks.
If there is any way to assist with testing or even developing (working my
way into bazel) feel free to post me more information or issues.
On Thu, Jun 7, 2018, 9:17 PM Jay Conrod ***@***.***> wrote:
This might be related to the fact that the standard library is a directory
output, not regular file outputs. Buildfarm, for example, doesn't work
because of this.
I don't have a setup to debug this with cloudbuild right now, but I'm
working with that team to get something online. Will let you know as soon
as I have more information.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1531 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATxF_aT0bKzTFqyNxqHMu6gr9xCpa5RNks5t6XwzgaJpZM4Udk5M>
.
--
|
Is it possible, that this issue also occurs when using the google api packages? |
Unfortunately, I haven't had time to investigate this yet. I've been primarily working on unblocking #1548, which is causing conflicts for people mixing pre-generated proto code with code generated at build time. That may affect you as well, since we don't have a standard set of rules yet for googleapis. I expect that to be done by the end of next week. I hope to look into this issue before then though. Off the top of my head, I don't know what would cause the standard library not to be cached. We generated the standard library as a directory artifact rather than individual files, which is a little bit unusual, but I've been told that's fully supported. We use it in our toolchains; toolchains and remote execution are both relatively new, and it's possible there's some functionality in there that isn't fully integrated yet. How are you building the google api packages? Are you building from github.com/googleapis/googleapis with custom rules or are you building pre-generated code out of google.golang.org/genproto? |
Okay, good to hear. Take your time and feel free to involve me if I can help. Happy to learn more about Bazel. Maybe we are using all of this completely wrong...
All our dependencies are managed using deps and are stored in /vendor and are checked in as well (we made this decission some time ago). Our WORKSPACE looks like this:
I saw in one docs file, that defining external dependencies in WORKSPACE or BUILD is possible, but as we are using I get, that building all those deps is necessary somehow, but doing this with go build is much faster and doesn't take 10min+ at the first time, so I guess we are doing it wrong... |
I am using Google Cloud Builder and I've tried to setup remote caching on Google Cloud Storage so my step looks like:
Build with this configuration always times out, and step is stuck on the line:
|
+1 to @kubaj's comment. For some reason, building stdlib when remote cache is enabled takes significantly longer (or it's not built at all for non remote cache builds). Any idea why? Edit: the build takes ~15 minutes for stdlib in a 2 CPU 3.75Mb ram cloud machine with remote cache, but a negigilble amount of time without remote cache. |
I get way better performance with the new RBE but still caching for std and for example the Google API Client seems broken. |
This is still an issue. Does anyone have insight on where to start debugging? |
Alright, looks like the underlying issue is bazelbuild/bazel#6091. Lack of parallel uploads means that each file from a target is uploaded sequentially, which takes forever for stdlib. That explains the slow-down. Another thing I've noticed when running targets with large numbers of files is that occasionally my cache server might fail a single request, resulting in a file missing from the cache. I'm speculating that in this case, the entire target would need to be rebuilt. That could explain why it appears that the stdlib sometimes doesn't seem to get cached at all. |
With the release of 3.7.0 (which includes bazelbuild/bazel@159c3fe which parallelized this codepath), has anyone experienced better build times on this? |
My gut says no, or at least that it's still slow. I wasn't paying close attention since I didn't see this in the 3.7.0 release notes, but I think I recently experienced this when updating the go version. |
Closing old unlabelled issues. #2188 is probably the right general issue to follow for |
We finally got our project to build successfully using bazel, go and docker on cloudbuild but we are still seing very high build times on all cloud builds (up to 6mins) for all kinds of changes (changing just a comment or the readme).
This seems to be caused by the GoStdlib being built every time.
We are using this command to build:
This are the logs:
Any ideas why the files won't get cached?
The text was updated successfully, but these errors were encountered: