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

goproxy-forward-util-succuss-or-last #32199

Closed
wants to merge 1 commit into from
Closed

goproxy-forward-util-succuss-or-last #32199

wants to merge 1 commit into from

Conversation

storyicon
Copy link

@storyicon storyicon commented May 23, 2019

GOPROXY on the master node promises developers this

For each request, the go command tries each proxy in sequence,
only moving to the next if the current proxy returns a 404 or 410 HTTP response.

But after a rough look at the code, I think the code on the current master node may not work as expected.

What's more, I think this logic is not in line with the developer's expectations, GOPROXY should try all the proxies in its list until one of them does not return an error.

Even if any of the proxies in the GOPROXY list have an error, then golang’s attempt to other proxies should not be interrupted.

The fact is that most goproxy providers (such as athens, goproxy.io) return 500 when the server fails to pull locally.

More about it: https://github.com/storyicon/gos/blob/master/docs/on-goproxy.md

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label May 23, 2019
@gopherbot
Copy link
Contributor

This PR (HEAD: b04f386) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/178638 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/178638.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Jay Conrod:

Patch Set 1:

I think this is intended to solve the same problem as CL 177958, #31785. Or is there another open issue you're thinking of?


Please don’t reply on this GitHub thread. Visit golang.org/cl/178638.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 1: Code-Review-2

The behavior introduced by this change does not maintain the privacy-preserving characteristics of GOPROXY as designed — see https://golang.org/issue/31913 for more detail.


Please don’t reply on this GitHub thread. Visit golang.org/cl/178638.
After addressing review feedback, remember to publish your drafts!

@storyicon
Copy link
Author

@bcmills Now I think that only when an proxy in the GOPROXY list returns 403/200, golang's attempt on the next proxy should be interrupted. Do you have any ideas?

@bcmills
Copy link
Contributor

bcmills commented May 29, 2019

The behavior introduced by this change does not maintain the privacy-preserving characteristics of GOPROXY as designed — see #31913 for more detail.

@bcmills bcmills closed this May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants