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

[admin] Usage of GOPROXY in releases #7629

Open
mx-psi opened this issue May 4, 2023 · 9 comments
Open

[admin] Usage of GOPROXY in releases #7629

mx-psi opened this issue May 4, 2023 · 9 comments
Assignees
Labels
admin-issues tracker issues etc. discussion-needed Community discussion needed priority:p2 Medium release-retro Issues discussed in a release retrospective

Comments

@mx-psi
Copy link
Member

mx-psi commented May 4, 2023

During the v0.76.x we faced some issues with the Go proxy that delayed the release and caused confusion. We could disable the Go proxy by using GOPROXY=direct, although this would come at the expense of speed and possibly reliability. Another disadvantage is that we won't put the released libraries up in Go proxy ourselves, but rather wait until the first usage of them.

Even if we don't disable the Go proxy on release jobs, we may want to document that disabling the Go proxy may be useful during the release in the Troubleshooting section. (Done in #7597)

Relates to #7576

@mx-psi mx-psi added discussion-needed Community discussion needed priority:p2 Medium admin-issues tracker issues etc. release-retro Issues discussed in a release retrospective labels May 4, 2023
@mx-psi
Copy link
Member Author

mx-psi commented May 4, 2023

cc @open-telemetry/collector-approvers @open-telemetry/collector-contrib-approvers I will bring this up on the next Collector SIG if we haven't decided then, but would appreciate if you have an opinion about this.

@TylerHelmuth
Copy link
Member

@mx-psi I have PR open for another pass through the release doc that does add GOPROXY=direct to the troubleshooting section: #7597

@mx-psi
Copy link
Member Author

mx-psi commented May 4, 2023

@TylerHelmuth awesome, let's keep this open only for whether we should add GOPROXY=direct in CI or not then.

@Aneurysm9
Copy link
Member

I would definitely support having a CI workflow using GOPROXY=direct. I am required to use that setting and frequently run into issues with dependencies that have modified tags that are masked by the use of the proxy. It always seems to happen at the worst possible time, so any mechanism that could drive earlier detection of such issues would be appreciated.

@mx-psi
Copy link
Member Author

mx-psi commented May 10, 2023

One concern brought up by @MovieStoreGuy is that we might get rate limited by Github. Authenticating on the workflow (see here) may help here (although I don't see anything explicit on the docs?).

Per @bogdandrutu, we should ask on golang/go first for guidance. I will sync with @djaglowski about the specific problems we had.

@mx-psi mx-psi self-assigned this May 11, 2023
@seankhliao
Copy link
Contributor

From the related issues filed at the same time, I guess this is due to proxy.golang.org's 30min negative cache time? Upstream are unlikely to change it for now, ref: golang/go#42809

If the only issue was with collector components, you could consider the below config,
which would allow using the proxy for most dependencies, but use git directly for the collector components

GOPROXY='https://proxy.golang.org,direct' # default
GOPRIVATE='go.opentelemetry.io/collector,github.com/open-telemetry/opentelemetry-collector-contrib'

@mx-psi
Copy link
Member Author

mx-psi commented May 22, 2023

Thanks @seankhliao, I think we should try that. On the v0.76.x release cycle we were getting a 404 (concretely):

go: downloading go.opentelemetry.io/collector/pdata v1.0.0-rcv0011
go: go.opentelemetry.io/collector/pdata@v1.0.0-rcv0011: verifying module: go.opentelemetry.io/collector/pdata@v1.0.0-rcv0011: reading https://sum.golang.org/lookup/go.opentelemetry.io/collector/pdata@v1.0.0-rcv0011: 404 Not Found
        server response: not found: go.opentelemetry.io/collector/pdata@v1.0.0-rcv0011: invalid version: unknown revision pdata/v1.0.0-rcv0011

but it does sound like the same kind of issue. One of the Go team members on that issue now works at my company so I will reach out to them in private as well about this to confirm :)

@mx-psi
Copy link
Member Author

mx-psi commented May 24, 2023

I followed up with @katiehockman who used to work on this. An alternative to avoiding the Go proxy is to ensure we wait a few minutes to avoid the negative cache (the proxy caches the 404 for ~30 minutes max).

To sum up the discussion, we have four options so far:

  1. Option 0: Do nothing, keep the current state.
  2. Option 1: Do not use the Go proxy altogether in releases
  3. Option 2: Do not use the Go proxy, but only for OpenTelemetry Collector modules (see [admin] Usage of GOPROXY in releases #7629 (comment))
  4. Option 3: Introduce waiting time to avoid negative caching

And there are four dimensions that we can judge them by:

  • Whether we test for GOPROXY=direct users as mentioned in [admin] Usage of GOPROXY in releases #7629 (comment)
  • Whether we hit the negative cache issues that we are (pressumably) currently facing
  • The expected release speed, when compared with the current baseline
  • The expected release reliability, when compared with the current baseline

This table summarizes the dimension's values for each option and the current state:

Test of GOPROXY=direct? Negative cache issues? Release speed Release reliability
Current state No Yes Baseline Baseline
Option 1 (no proxy) Yes No Slowest Least reliable
Option 2 (some proxy) No No ~Baseline ~Baseline
Option 3 (just wait!) No No Slower ~Baseline

@mx-psi
Copy link
Member Author

mx-psi commented Oct 4, 2024

This happened again during the v0.111.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin-issues tracker issues etc. discussion-needed Community discussion needed priority:p2 Medium release-retro Issues discussed in a release retrospective
Projects
None yet
Development

No branches or pull requests

4 participants