-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Document strategy to support experimental methods on stable interfaces #5882
Comments
The API could be E.g. Maybe the experimental SDK would coordinate with the stable SDK through functions in an internal folder? |
This approach means duplicate packages will need to be maintained. It also means users will need to rewrite their code switch between stable/experimental. Why are branches and forks not a valid place for this type of code? |
👍 While I hate "long-living branches" (because of maintainability burden), I do not think we have any other user-friendly alternatives. I would not use build tags as all Go codebases depending on experimental features would have to be build with these build flags. This would be very user-unfriendly. |
Got it. I've added that to the description. |
I think you can add this comment to these as well. |
This is not a viable solution if you want to use opentelemetry-go types as part of your library's public API, is it? If that is the case, then
|
I would go as far as saying as a user of opentelemetry-go, I would rather have to deal with (properly namespaced) build tags than have to use a fork. |
@pellared are you referring to the approach used by gRPC where they label certain methods "Experimental", e.g. here? This is experimental methods within otherwise a stable package. |
I think this comment may be relevant in this discussion: open-telemetry/opentelemetry-collector#4832 (comment) It summarizes ways in which grpc-go's policy has caused harm to the Go ecosystem |
@mx-psi, I think only a long-living branch with releases like |
@pellared can you expand on this? Why is this very user-unfriendly? Also as an alternate to build flags, perhaps we could have runtime feature-flags to enable experimental APIs? |
That would definitely be an improvement. I am not sure how it would work with Go's MVS, but if it can work nicely with it, then that's definitely a solution |
AFAIK it works like described here: https://semver.org/#spec-item-11 |
I have not heard a single good experience of using a custom build tags to control the API surface for a package. Related issue: golang/go#33389 |
This is no different than having experimental package live in a separate local package. |
Additionally to what @pellared mentioned, things like the kube API, which have a dependency on OTel, are not able to set build flags in their CI pipeline. |
@pellared Looking at the Go MVS doc that you linked (thanks for the link!) It looks like if a project has two dependencies, using
@MrAlias Indeed, I think the solution (whenever that is something we can do on Go) should not be that either. It seems like your hands are tied because of the spec and by the fact that most of the API is v1.x, so take my comment more as "if you can avoid a solution with these flaws, please do" |
Related Slack thread showcasing user-facing problems with we add new methods to interfaces in API packages: https://cloud-native.slack.com/archives/C01NPAXACKT/p1729262962637489 Actually, a fork and usage of |
My notes from the Spec SIG meeting:
Some ideas that were thrown around during the meeting:
It seemed like others on the call weren't as happy with (3). JS and Java both seem to have a single artifact with all of the experimental features. But that would put us in a position of needing to maintain + rebase a branch with patches each release. Both (1) and (3) can result in stale feature implementations, but it isn't clear to me if feature branches need to be maintained (with regular releases to update dependencies, etc). I'm inclined to treat that as a nice-to-have (people shouldn't use these features in production). Documentation for (2) would be simpler, since instructions for using the long-lived branch would always be the same. Documentation for (1) or (3) would need to be updated with the list of branches/PRs when new ones are added or removed. |
Forked from #5768, and related to open-telemetry/opentelemetry-specification#4257.
Problem Statement
We should document our policy for how we support for experimental things in the specification. It doesn't mean we will always accept such features, but should describe how it would work. This includes:
/internal/x
directories, andOTEL_GO_X_FOO
environment variables.This excludes:
Proposed Solution
Decide and document how we are going to handle the above.
The text was updated successfully, but these errors were encountered: