-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: GOTELEMETRY is not documented by go help environment #68928
Comments
like GOMOD, it's there only to report the current state, not to allow modifications. |
It is absolutely not the case. This issue should be re-opened. |
@golang/telemetry : Should setting the |
That's not how it behaves. See this comment from the proposal: #67111 (comment). I think this needs to be documented, at least at the bottom of I also recall that we've discussed making GOTELEMETRY settable, and I believe there has been no objection to supporting that, apart from the confusing asymmetry that we'd never support GOTELEMETRY=on (as @stapelberg astutely assessed). Let's reopen this issue to track improving the documentation, and open a separate issue for making GOTELEMETRY=off settable. The issue with GOMODCACHE is tracked by #68946, and I consider it a bug that we should fix for 1.23.1. |
Filed #68960 to formally consider supporting GOTELEMETRY=off in the environment. |
BTW, it looks |
@zigo101 you can install You can also delete files in |
Change https://go.dev/cl/607855 mentions this issue: |
This change adds documentation to "go help telemetry" and "go help environment" for the unsettable GOTELEMETRY and GOTELEMETRYDIR go env variables. For #68928 Change-Id: I8c139bd8585ffb0c45b9dd722ef6e7a9a33df192 Reviewed-on: https://go-review.googlesource.com/c/go/+/607855 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/616916 mentions this issue: |
Go version
go version go1.23.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
In a complex integration test setup which runs the go tool with a custom (ephemeral) XDG_CONFIG_HOME and HOME directory, I want to entirely turn off go telemetry: I found telemetry to trigger go module downloads that end up polluting my ephemeral module cache:
(This failure seems to have started with Go 1.23, but I’m having trouble reproducing it outside of GitHub Actions.)
What did you see happen?
I tried setting GOTELEMETRY in the environment, but it has no effect:
I also tried setting GOTELEMETRY in GOROOT/go.env, but it has no effect there either (whereas GOAMD64 has, so I’m editing the right file):
What did you expect to see?
I would have expected GOTELEMETRY=off to be honored.
In #67111, I can see mention of GOTELEMETRY being an unsettable environment variable. While I understand the rationale for
go telemetry on
being the only way to enable telemetry, I don’t think that applies to turning off telemetry, which I think should be possible via the environment.The text was updated successfully, but these errors were encountered: