linkerd2 icon indicating copy to clipboard operation
linkerd2 copied to clipboard

ci: policy container builds are slow

Open olix0r opened this issue 2 years ago • 0 comments

policy-controller container builds frequently take 9+ minutes in CI (i.e. for integration tests, etc). This isn't so much a problem when doing a proper release, but it is an extremely high cost to incur multiple times per CI run. Can we improve this?

I'm not sure if this slowness was caused by a dependency change or code change (or if it's always been this way? i'd be a little surprised...)

My first thought is that we should just stop doing cargo build --release in CI. It would be fine to build the policy controller in debug mode, which should be quite a bit faster in most cases. However, our docker build bash script infrastructure makes it extremely cumbersome to pass build-args to docker (which we would want to optionally enable release builds).

See this post for more hints about how to understand/attack slow rust builds.

olix0r avatar Jul 14 '22 14:07 olix0r