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

cmd/go: disabling telemetry causes telemetry files to be written #69269

Closed
AGWA opened this issue Sep 4, 2024 · 5 comments
Closed

cmd/go: disabling telemetry causes telemetry files to be written #69269

AGWA opened this issue Sep 4, 2024 · 5 comments
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. telemetry x/telemetry issues
Milestone

Comments

@AGWA
Copy link

AGWA commented Sep 4, 2024

Go version

go version go1.23.0 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/andrew/.cache/go-build'
GOENV='/home/andrew/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS='-modcacherw'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/andrew/.go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/andrew/.go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/golang/go1.23.0'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/golang/go1.23.0/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.0'
GODEBUG=''
GOTELEMETRY='off'
GOTELEMETRYDIR='/home/andrew/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='0'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2289507740=/tmp/go-build -gno-record-gcc-switches'

What did you do?

  1. Start with an empty home directory
  2. go telemetry off
  3. ls $HOME/.config/go/telemetry/local

What did you see happen?

I saw telemetry data in this directory:

'go@go1.23.0-go1.23.0-linux-amd64-2024-09-04.v1.count'	 upload.token   weekends

What did you expect to see?

I expected that this directory would be nonexistent since I have never before run a go command with this home directory, except for a command that expresses my desire to have telemetry disabled.

This wouldn't be an issue if telemetry could be disabled with an environment variable (#68960), and it would be less of an issue if telemetry data were written to a more appropriate location (#68988).

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Sep 5, 2024
@dmitshur
Copy link
Contributor

dmitshur commented Sep 5, 2024

CC @matloob, @samthanawalla, @findleyr.

@dmitshur dmitshur added this to the Go1.24 milestone Sep 5, 2024
@hyangah hyangah added the telemetry x/telemetry issues label Sep 6, 2024
@hyangah
Copy link
Contributor

hyangah commented Sep 6, 2024

Once go telemetry clean is implemented, go telemetry off && go telemetry clean could do the job.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/611456 mentions this issue: cmd/go: add an exception for 'go telemetry off' to not open counters

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Sep 9, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/611876 mentions this issue: cmd/go/testdata/script: skip part of test on unsupported platforms

gopherbot pushed a commit that referenced this issue Sep 9, 2024
The telemetry script test checks for the existence of telemetry data as
a baseline before checking that the act of setting telemtetry to off
while in local mode doesn't produce telemetry data. Of course, when
we're running on platforms where telemetry is not supported, telemetry
data won't be produced on disk either way. Only check for the existence
of telemetry data on supported platforms.

For #69269

Change-Id: I3a06bbc3d3ca0cf0203b84883f632ecfd9445aae
Reviewed-on: https://go-review.googlesource.com/c/go/+/611876
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. telemetry x/telemetry issues
Projects
None yet
Development

No branches or pull requests

5 participants