Skip to content
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

Optimize driver build time for multi arch/os images #668

Closed
aramase opened this issue Jul 27, 2021 · 4 comments
Closed

Optimize driver build time for multi arch/os images #668

aramase opened this issue Jul 27, 2021 · 4 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects

Comments

@aramase
Copy link
Member

aramase commented Jul 27, 2021

The binary is built inside the golang builder docker container. In case of prow image build in gcb, it takes ~1h10m for the image build to complete (linux/amd64, linux/arm64, windows/amd64/1809, windows/amd64/1903, windows/amd64/1909, windows/amd64/2004).

We can optimize this by building the binary once on host for different os/arch and load into the docker image.

/assign

@aramase aramase added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 27, 2021
@aramase aramase added this to To do in Roadmap Aug 3, 2021
@aramase
Copy link
Member Author

aramase commented Aug 4, 2021

Building the binary in the multi-stage docker build gives us a reproducible environment which is not the case with building on the host. Instead of building the binary on the host, I think we can

  1. maintain a vendor folder
  2. Use -mod=vendor in the builds

@aramase
Copy link
Member Author

aramase commented Aug 5, 2021

This improves the build time, so we'll go ahead with the vendor approach.

@aramase
Copy link
Member Author

aramase commented Aug 30, 2021

We bumped the machine type used in cloudbuild to N1_HIGHCPU_8 as part of #714.

With this change, the build time has significantly improved. It now takes 14m instead of the previous 1h10m.

/close

@k8s-ci-robot
Copy link
Contributor

@aramase: Closing this issue.

In response to this:

We bumped the machine type used in cloudbuild to N1_HIGHCPU_8 as part of #714.

With this change, the build time has significantly improved. It now takes 14m instead of the previous 1h10m.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Roadmap
To do
Development

Successfully merging a pull request may close this issue.

2 participants