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

Feature: Serve as a proxy for the go tool #9

Closed
bketelsen opened this issue Feb 27, 2018 · 5 comments
Closed

Feature: Serve as a proxy for the go tool #9

bketelsen opened this issue Feb 27, 2018 · 5 comments

Comments

@bketelsen
Copy link
Contributor

if a user sets the GOPROXY environment variable to our domain name, they should use our service to download modules, zip files, metadata, etc from our servers where it is cached from the upstream sources.

This reduces load on upstream VCS servers, and allows us to provide a better experience for end-users by using a CDN for content.

@arschles
Copy link
Member

arschles commented Mar 1, 2018

@bketelsen we said in the registry section that if a user specifies a module name:

That rule would make the world look like this:

  1. I connect my github.com/my/module repo to athens (this is always required, whether we're proxying or serving as a registry)
  2. Athens picks up the module name(s) from the repository's go.mod file(s)
  3. Athens serves the module at gomods.io/$NAME, where name is what was found in the go.mod
  4. I commit a change to my go.mod file that changes the module name
  5. Athens rejects that change so that go get gomods.io/$NAME doesn't fail (i.e. we don't allow for another left-pad incident)

I wanted to note the naming rules, because I think they indicate a solution to the problem you posed (reducing load on upstream VCS servers and serving from a CDN):

We can remove the concept of proxying altogether and always cache upstream VCS code. We can roughly enable that with the webhook flow, but there might be fancier ways to do it like doing automatic synchs or something (Heroku does automatic deploys based on CI results, for example).

In removing proxying, always caching, and always deriving the name from the go.mod file, we only have to support one behavior (instead of proxying or fetching from a CDN) and we only have to define one way to name modules, and we only have to enforce one naming scheme (including the restrictions above).

@ghost
Copy link

ghost commented Jul 15, 2018

would this be solved by #238?

@arschles
Copy link
Member

I think it is? @bketelsen can you close if you agree?

@ghost ghost added on hold Issues and pull requests that shouldn't be closed yet, but shouldn't be worked on yet either and removed on hold Issues and pull requests that shouldn't be closed yet, but shouldn't be worked on yet either labels Jul 26, 2018
@michalpristas
Copy link
Member

@bketelsen ping pong

@arschles
Copy link
Member

This is currently how the proxy works, and when we're running on a public domain name (we are currently doing that with an experimental server, but see #772 for more concrete plans), developers will set GOPROXY to the new DNS entry. Closing

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

No branches or pull requests

3 participants