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

[Proposal] Go language version support #4841

Closed
mx-psi opened this issue Feb 10, 2022 · 5 comments · Fixed by #4903
Closed

[Proposal] Go language version support #4841

mx-psi opened this issue Feb 10, 2022 · 5 comments · Fixed by #4903

Comments

@mx-psi
Copy link
Member

mx-psi commented Feb 10, 2022

Overview

Given recent efforts to reach v1.0.0 (see #4752) and the recent move towards being more explicit about breaking changes (see #4712) I think this is a good time to consider Go language version support of the Collector code when used as a library, since this is 'sort of' a breaking change (although one commonly ignored even when following semver), and since there have been discussions in the past about the use of new Go features (e.g. generics or Go workspaces).

There are two different but related Go versions to consider here: one is the minimum Go version supported for using the Collector as a library and the other is the Go version used to build the official binaries. This can be addressed separately: Go tooling honors the Go version declared in the go.mod file.

Questions to decide

  1. What should the policy be for the minimum Go version supported when using the Collector as a library?
  2. What should the policy be for the Go version used to build the official binaries?

Points to consider

  • Security: the Go version used to build the binaries should not have known security vulnerabilities. We should be able to quickly move to a new version if a security-related bugfix version is released.
  • Stability: the Go version used to build the binaries should be as stable as possible. Initial releases of a Go minor version cycle may be less stable than more mature ones, specially when it comes to less used platforms.
  • Availability of new language features: new Go versions may have features that are interesting from a development point of view. Use of this features would (usually) mean dropping support for older Go versions.
  • OS support: Go drops support for older platforms on minor versions. How long to support a given operating system may have different answers by the OpenTelemetry community than whatever the Go team chooses.
  • Testing burden: Supporting more Go versions means testing them on CI, which increases the testing burden.

Prior work

Relevant prior work includes open-telemetry/opentelemetry-go#2379, where the opentelemetry-go library chose to (roughly) follow Go's release policy. The precedent of #3887 is also relevant, where the version was bumped to Go 1.17 because of a security issue that was not fixed by the Go team on 1.16.

Proposal

My proposal is to answer the questions as follows:

  1. For the minimum Go version supported when using the Collector as a library, follow opentelemetry-go's approach and stick to Go's release policy (see their README for their specific wording).
  2. For the Go version used to build the official binaries, use a supported Go version that does not have known security vulnerabilities (this is mainly to address cases like the vulnerability addressed on Upgrade to Go 1.17 #3887, where a security fix was not backported to a supported Go version).
@codeboten
Copy link
Contributor

The policy used by otel-go makes sense to me, I would be happy to support the same policy for the collector/collector-contrib.

@tigrannajaryan
Copy link
Member

For the minimum Go version supported when using the Collector as a library, follow opentelemetry-go's approach and stick to Go's release policy (see their README for their specific wording).

@mx-psi I do not fully understand their wording. Can you expand here?

For the Go version used to build the official binaries, use a supported Go version

What does "supported" mean? Supported by whom?

@mx-psi
Copy link
Member Author

mx-psi commented Feb 16, 2022

What does "supported" mean? Supported by whom?

Supported by the Go team as defined in https://go.dev/doc/devel/release#policy

@mx-psi
Copy link
Member Author

mx-psi commented Feb 16, 2022

We discussed this on the February 16th Collector SIG meeting, where @Aneurysm9 gave some details on opentelemetry-go's approach. I will wait until next week for approvers and other community members to voice their opinion here and open a PR then to nail down the wording and figure out if we want to do the Go bump in lockstep or not.

@jpkrohling
Copy link
Member

I'm happy with opentelemetry-go's approach. If it turns out to not work for our case in the future, we can always tweak our policy.

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 a pull request may close this issue.

4 participants