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
use go 1.13, replace glide with modules, add boilerplate docker_build #105
Conversation
d3e0b1a
to
4a64327
Compare
- removed bootstrap make target, since it was only needed to install glide and run glide install - updated Dockerfile stages to optimize dependency caching - update docker-compose to use the base stage of Dockerfile for consistency
4a64327
to
395e1a4
Compare
@lyft/network-team this is ready for review 🤞 |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Ping to ward off stale bot |
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.
I am in favor of moving the project to go modules, and publishing to dockerhub. I think both are very good for the project. Thanks for taking this on @jstewmon!
A couple questions for other folks:
- @rodaine is there any issue with the project moving to go modules even though internally Lyft is still using glide?
- @jonathanburns could you take a look at the boilerplate setup?
- @mattklein123 @wgallagher if we ultimately want to move the project to the envoyproxy org, do you have a preference if we merge the dockerhub publishing part of this PR before or after the move? I assume that after the move we would push to envoyproxy's dockerhub.
@@ -1,4 +1,4 @@ | |||
version: "3" | |||
version: "2.4" |
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.
why downgrade?
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.
I switched the the latest v2 release, so that I could make the ratelimit service depend on the redis service being healthy.
docker-compose removed support for depends_on conditions in v3 because it does not work with swarm mode.
Their current recommendation is to use v3 and have the application container await the upstream service dependency, which is more troublesome to implement.
Since we do not need swarm mode, I thought using v2 was the easier way to get the desired behavior.
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.
Here's a reference: docker/compose#4305 (comment)
I would do it after the move, though it will take a bit of time to get that sorted out. |
Boilerplate looks good. |
Not really, but you may need to finagle some stuff to get it to build properly. |
Thanks everyone for the reviews! If the desire is to move the project to the envoyproxy org before pushing to docker hub...
If the move will take some time, I can split this PR into separate patches for the transition to Go Modules and the boilerplate for building and publishing the docker image. That would allow us to merge the former now, which would in turn make it easier for users to build the project while awaiting a published image. |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
shoo stale bot |
Hi @jstewmon, sorry for the delay Kubecon/Envoycon and thanksgiving got in the middle. Do you mind splitting the PR into everything except pushing to dockerhub. And we can do the dockerhub change once we move the repo over? Thanks! |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Started going down a similar path when I tried I approached the project to get a local build going. I no longer have a GOPATH configured in my go dev environment (thank you modules!). Seems worthy to drive this guy across the finish line. |
Hi 👋, sorry for the long delay - I got very busy at work for a while... I ran into some trouble splitting this up as it relates to the desire to move the project from @junr03 or @jonathanburns do you have any guidance on how you'd like to proceed? I can setup a bespoke docker build for this repo if there is not a clear path forward using boilerplate to publish for the |
glide and run glide install
consistency
fixes #57: Per the conversation there, maintainers can provide lyft credentials for docker.io registry if this is accepted.
duplicates #101
I realize this PR could be controversial, so I welcome all feedback...
I took the liberty of replacing glide with go modules because it simplified the setup. For example, docker-compose no longer depends on the user running
glide install
on their host machine; GOPATH is no longer required, etc.The go.mod and go.sum files should be reproducible by running:
go mod init github.com/lyft/ratelimit && go mod tidy
I tried to anticipate the desired direction implied by the boilerplate project.