-
Notifications
You must be signed in to change notification settings - Fork 343
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
Add go mod vendor to atc.dev.sh #7180
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing about adding go mod vendor
to the t3c
service is that the trafficops
and trafficmonitor
services also fail to build binaries and run i go mod vendor
is not run for them.
So maybe the trafficops
and trafficmonitor
services could add a check to see if vendor/golang.org/x
and vendor/modules.txt
(which indicates that vendoring is complete) exist, and if not, wait until it does before continuing?
dev/atc.dev.sh
Outdated
if [ ! -d "vendor/golang/x" ]; then | ||
go mod vendor | ||
fi | ||
docker-compose up -d --build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If atc-build
is run before docker-compose up
, go mod vendor
can be run in a container so the user doesn't need go
(or the latest go
version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So run go mod vendor in the traffic ops Dockerfile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, running go mod vendor
from one of the docker-compose services using docker-compose run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, go mod vendor
would go between docker-compose build
and docker-compose up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand, but if you want to just add it to your open PR: #7142 I can close this and review that.
Adds the
go mod vendor
command to the t3crun.sh
file, for when a user has a clean repo t3c won't fail to start up due to missing packagesWhich Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Have a clean repo or delete /vendor/golang.org/x/
Should find that t3c starts correctly and you will see /vendor/golang.org/x/ has been created and contains packages
PR submission checklist