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

vendor dependencies and speedup container build #264

Merged
merged 1 commit into from
Jul 26, 2022
Merged

vendor dependencies and speedup container build #264

merged 1 commit into from
Jul 26, 2022

Conversation

mariomac
Copy link

Having to download vendor dependencies on each build complicates the downstream compilation process. This PR vendors them.

It also slightly optimizes the container build process, separating the linting stage from the build_code stage. Having to download golangci-lint on each build made the process too slow.

Now the build time for a container is ~100seconds, which could be halved if we provided two different container images: a "production" FLP that only compiles and includes the flowlogs-pipeline binary (as we will have downstream), and a "debug" image that also includes the confgenerator, as well as the iputils, curl and net-tools packages.

@codecov-commenter
Copy link

Codecov Report

Merging #264 (8a483eb) into main (03e1e4e) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #264      +/-   ##
==========================================
- Coverage   60.24%   60.19%   -0.05%     
==========================================
  Files          69       69              
  Lines        4095     4095              
==========================================
- Hits         2467     2465       -2     
- Misses       1466     1469       +3     
+ Partials      162      161       -1     
Flag Coverage Δ
unittests 60.19% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/pipeline/ingest/ingest_collector.go 48.12% <0.00%> (-1.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03e1e4e...8a483eb. Read the comment docs.

@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jul 25, 2022
@github-actions
Copy link

New image: ["quay.io/netobserv/flowlogs-pipeline:dcd64a6"]. It will expire after two weeks.

@jotak
Copy link
Member

jotak commented Jul 25, 2022

/lgtm
About production image versus debug: maybe that's a difference we can leave between upstream and downstream (with the production image only built for downstream) ?

@eranra
Copy link
Collaborator

eranra commented Jul 26, 2022

@mariomac I very much like the idea of debug vs. production ... I also had discussions with @ronensc on how to use remote debug and enablement of a specific debug container might be a good way to achieve that

@mariomac mariomac merged commit d104d33 into netobserv:main Jul 26, 2022
@mariomac mariomac deleted the vendor branch July 26, 2022 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants