-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Increase timeout of addon-resizer build job #34380
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
/assign @BenTheElder |
Do we know if the actual build is taking that long, as opposed to the prowjob hanging fetching logs? Some of these are running in shared projects and the prowjob sometimes times out just on streaming the build logs due to exceeding quota, not the actual build in cloudbuild taking long. What timeout does the cloudbuild have? |
Yeah as far as I can tell, the build is indeed taking that long. The latest build was triggered on 03-05 14:25 EDT. I can see the various architecture images built in our GCR repo: And then the Prow workflow fails with this error message:
We have the Cloud Build timeout set to 6 hours. @BenTheElder - do you see anything weird here? To me it looks like the build is eating up most of the 2 hour time limit here but I'd love to lean on your experience here and see if you can spot anything :) |
wow! that's a lot
I'd bump up the machine size in the cloudbuild. https://cloud.google.com/build/docs/api/reference/rest/v1/projects.builds#machinetype
EDIT: this seems to be done to the extent possible already? |
The other thing you can do is avoid compiling under emulation versus cross compiling, since you are building static go binary you can take advantage of: https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ Basically you can tell docker "build in step one on the host platform, then copy it to an image from the target platform" I think that would be a better move, but we can bump the timeout in the meantime |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, raywainman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I would prioritize this, compiling under emulation is unnecessarily slow, running the build steps as cross-compilation on the host platform instead of emulating the target platform via docker and binfmt_misc + qemu-userspace has big performance wins. It's also usually a pretty small change. You need to set GOARCH and the --from platforms. |
Thanks Ben! Let me try it and will report back. |
Look at that, kubernetes/autoscaler#7975 brought our build time down to 20 minutes which is well under the timeout deadline. Thanks a lot for the advice here @BenTheElder!! |
Awesome! |
The current addon-resizer build job is taking just over 2 hours to complete (this is a slow process due to it building 5 different images) which is much slower in a Cloud Build environment than locally.
The default timeout is 2 hours.
Looking to override this to 3 hours to give the job enough time to finish.
See https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/post-autoscaler-push-addon-resizer-images/1892289674458697728 for a recent failure.
This work is part of the onboarding of this repo into automatic builds, see kubernetes/autoscaler#7615.