netobserv / flowlogs-pipeline

Transform flow logs into metrics
Apache License 2.0
69 stars 21 forks source link

Build time optimization #257

Open jotak opened 1 year ago

jotak commented 1 year ago

FLP takes quite a long time to build and it seems like there could be some optimizations.

One thing that seems not optimal and taking quite some time is, for every code change, re-downloading/installing golangci-lint. As it's part of make build_code, it's in the same docker cache layer than code build, hence is retriggered for every code change. We should see how we could decouple them.

Other possible improvements to consider:

ronensc commented 1 year ago

I found that this line is run before make build_code https://github.com/netobserv/flowlogs-pipeline/blob/0e670baa5d6ad1ffde74053c9821a5b0287b0d18/contrib/docker/Dockerfile#L12

Doesn't it download golangci-lint?

jotak commented 1 year ago

Doesn't it download golangci-lint?

Despite this download, I often see the output stuck at that point:

(re)installing /app/bin/golangci-lint-v1.43.0

But maybe I am mislead by lacking output at different steps, it's possible that this "(re)installing golangci-lint" is actually finished but there's another hidden step behind .. like linting