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

Remove go mod download from Dockerfiles #2383

Merged
merged 1 commit into from
May 17, 2023
Merged

Conversation

jdn5126
Copy link
Contributor

@jdn5126 jdn5126 commented May 12, 2023

What type of PR is this?
enhancement

Which issue does this PR fix:
N/A

What does this PR do / Why do we need it:
This PR removes the go mod download step from the init, main, and metrics-helper Dockerfile. The motivation is to speedup initial image build times, which should help in reducing the flakiness of builds in GitHub Actions. Running go mod download installs all go modules in the image builder workspace, including many which are not needed by the image being built. The downside of removing this step is that it removes a caching layer, so subsequent local builds cannot take advantage of the modules downloaded by previous local builds. This tradeoff is considered worth it since all GitHub Actions builds only happen once, and the overhead for local builds is not worth the flakiness or initial wait time.

If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
N/A

Testing done on this change:
Manually verified that images can still be built.

Automation added to e2e:
N/A

Will this PR introduce any new dependencies?:
No

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
N/A

Does this change require updates to the CNI daemonset config files to work?:
No

Does this PR introduce any user-facing change?:
No


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jdn5126 jdn5126 merged commit 1a4bf1f into aws:master May 17, 2023
4 checks passed
@jdn5126 jdn5126 deleted the image_build branch May 17, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants