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

Avoid cloning the repo/downloading dependencies #2280

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

lucacome
Copy link
Member

Proposed changes

Problem: The VM clones the repo every time it's created and downloads the go dependencies. This is time consuming.

Solution: Clone the repo in the base image and run go mod download so that most of the dependencies are already present. When the VM starts and the repo is nginxinc it will just do a git fetch on the repo to sync it.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@lucacome lucacome requested a review from a team as a code owner July 24, 2024 03:04
@github-actions github-actions bot added the chore Pull requests for routine tasks label Jul 24, 2024
Problem: The VM clones the repo every time it's created and downloads
the go dependencies. This is time consuming.

Solution: Clone the repo in the base image and run `go mod download` so
that most of the dependencies are already present. When the VM starts
and the repo is nginxinc it will just do a git fetch on the repo to sync
it.
@lucacome lucacome requested a review from a team July 24, 2024 18:51
@lucacome lucacome enabled auto-merge (squash) July 24, 2024 18:55
@lucacome lucacome merged commit e1116fb into nginxinc:main Jul 24, 2024
37 checks passed
@lucacome lucacome deleted the chore/clone-repo branch August 1, 2024 20:30
@lucacome lucacome self-assigned this Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants