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

[20.10 backport] Update GOPROXY to use default with fallback #747

Merged
merged 1 commit into from Aug 20, 2022

Conversation

thaJeztah
Copy link
Member

Use the default proxy, to assist with LTS distros that use old git versions
but fallback on any error (instead of only on 404 and 410).

From the Go documentation; https://go.dev/ref/mod#goproxy-protocol

List elements may be separated by commas (,) or pipes (|), which determine error
fallback behavior. When a URL is followed by a comma, the go command falls back
to later sources only after a 404 (Not Found) or 410 (Gone) response. When a URL
is followed by a pipe, the go command falls back to later sources after any error,
including non-HTTP errors such as timeouts. This error handling behavior lets a
proxy act as a gatekeeper for unknown modules. For example, a proxy could respond
with error 403 (Forbidden) for modules not on an approved list (see Private proxy
serving private modules).

(cherry picked from commit 72d51db)

Use the default proxy, to assist with LTS distros that use old git versions
but fallback on any error (instead of only on 404 and 410).

From the Go documentation; https://go.dev/ref/mod#goproxy-protocol

> List elements may be separated by commas (,) or pipes (|), which determine error
> fallback behavior. When a URL is followed by a comma, the go command falls back
> to later sources only after a 404 (Not Found) or 410 (Gone) response. When a URL
> is followed by a pipe, the go command falls back to later sources after any error,
> including non-HTTP errors such as timeouts. This error handling behavior lets a
> proxy act as a gatekeeper for unknown modules. For example, a proxy could respond
> with error 403 (Forbidden) for modules not on an approved list (see Private proxy
> serving private modules).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 72d51db)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

all green 🎉

@thaJeztah thaJeztah merged commit 49a93e4 into docker:20.10 Aug 20, 2022
@thaJeztah thaJeztah deleted the 20.10_backport_less_goproxy_hacks branch August 20, 2022 13:53
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

Successfully merging this pull request may close these issues.

None yet

2 participants