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] Add retry places when GOPROXY is needed #789

Closed
xytan0056 opened this issue May 20, 2020 · 1 comment
Closed

[Feature] Add retry places when GOPROXY is needed #789

xytan0056 opened this issue May 20, 2020 · 1 comment

Comments

@xytan0056
Copy link

What version of gazelle are you using?

2078a44

What version of rules_go are you using?

9794aacb240809111dfb9d587d40475b2819310e

What version of Bazel are you using?

3.0.0

There are multiple places where GOPROXY is used to fetch module information
https://github.com/bazelbuild/bazel-gazelle/blob/master/cmd/fetch_repo/module.go#L77
https://github.com/bazelbuild/bazel-gazelle/blob/master/language/go/modules.go#L150
https://github.com/bazelbuild/bazel-gazelle/blob/master/repo/remote.go#L419
In an event where GOPROXY is not stable enough to provide 100% availability (especially considering an organization can maintain its own proxy to serve internal modules), go_repository would fail on a single try of these commands and cause the entire build to fail. Can we add an option to retry in this scenario?
This could be done in go 28194, but likely won't happen soon.

@jayconrod
Copy link
Contributor

I'd rather not add this to Gazelle or fetch_repo. golang/go#28194 would be the place to implement it, though I'm skeptical it should be there either. Retries add complication, and if they're done poorly, they can add load to an already overloaded system.

It's possible to workaround this already with a local GOPROXY service that does retries.

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

2 participants