You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/counter: don't write counters to disk if mode=off
It was decided in golang/go#63832 that when the telemetry mode is "off"
no telemetry data should be written to the file system. However, the
current implementation of "off" still creates the counter file -- it
just doesn't produce any reports.
Fix this to not even create the counter file when the mode is off. This
was rather tricky to implement, as it required auditing a lot of code to
see that we don't reach openMapped. However, per discussion with pjw@ it
should be sufficient to implement this check in Open, as is done here.
This broke some tests because
1. some tests were reading the wrong mode file (fixed by setting
telemetry.ModeFile in counter_test.go)
2. the E2E tests were incorrectly escaping the RunProg test.run regexp
(fixed by simplifying the RunProg logic)
For golang/go#63832
Change-Id: I47066a97a8fd17c4c2be776077d718e9cdbaf65a
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/542055
Auto-Submit: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Peter Weinberger <[email protected]>
0 commit comments