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

use go 1.13, replace glide with modules, add boilerplate docker_build #105

Closed
wants to merge 1 commit into from

Conversation

jstewmon
Copy link

@jstewmon jstewmon commented Oct 29, 2019

  • 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

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.

- 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
@jstewmon
Copy link
Author

@lyft/network-team this is ready for review 🤞

@jstewmon
Copy link
Author

jstewmon commented Nov 4, 2019

@junr03 @rodaine 👋 , sorry to nag, but it looks like the @lyft/network-team tag from the contributing guidelines is inactive, and I would love to get your feedback on this!

@stale
Copy link

stale bot commented Nov 11, 2019

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!

@stale stale bot added the stale label Nov 11, 2019
@jstewmon
Copy link
Author

Ping to ward off stale bot

@stale stale bot removed the stale label Nov 11, 2019
Copy link
Member

@junr03 junr03 left a 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:

  1. @rodaine is there any issue with the project moving to go modules even though internally Lyft is still using glide?
  2. @jonathanburns could you take a look at the boilerplate setup?
  3. @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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why downgrade?

Copy link
Author

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.

Copy link
Author

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)

@mattklein123
Copy link
Member

I assume that after the move we would push to envoyproxy's dockerhub.

I would do it after the move, though it will take a bit of time to get that sorted out.

@jonathanburns
Copy link

Boilerplate looks good.

@rodaine
Copy link
Member

rodaine commented Nov 14, 2019

is there any issue with the project moving to go modules even though internally Lyft is still using glide?

Not really, but you may need to finagle some stuff to get it to build properly.

@jstewmon
Copy link
Author

Thanks everyone for the reviews!

If the desire is to move the project to the envoyproxy org before pushing to docker hub...

  1. Is there anything I can do to help with that? e.g. Submit a PR that replace 'lyft/ratelimit' with 'envoyproxy/ratelimit'

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.

@stale
Copy link

stale bot commented Nov 26, 2019

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!

@stale stale bot added the stale label Nov 26, 2019
@jstewmon
Copy link
Author

shoo stale bot

@stale stale bot removed the stale label Nov 26, 2019
@junr03
Copy link
Member

junr03 commented Dec 2, 2019

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!

@stale
Copy link

stale bot commented Dec 9, 2019

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!

@stale stale bot added the stale label Dec 9, 2019
@stale
Copy link

stale bot commented Dec 16, 2019

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!

@stale stale bot closed this Dec 16, 2019
@jacobstr
Copy link

jacobstr commented Feb 6, 2020

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.

@jstewmon
Copy link
Author

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 lyft to envoyproxy because the boilerplate docker setup assumes lyft is the docker user.

@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 envoyproxy project.

@stevesloka stevesloka mentioned this pull request Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public docker image
6 participants