Add telemetry enable/disable commands#1301
Conversation
- Fix confirmation message showing wrong path when --config flag is used
- Use strconv.FormatBool instead of fmt.Sprintf("%t") in settings list
- Add unit tests for IsTelemetryEnabled covering env var × stored preference
- Pin TestTelemetryNoArgs assertion to stdout instead of stdout||stderr
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d552538 to
792eb86
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…etenv in handler - Handle config.Path() error instead of silently discarding it in both enable and disable handlers; pass resolvedPath (not original configPath) to SetTelemetryEnabled so the written path and success message always agree - Unexport NoTelemetryEnvVars → noTelemetryEnvVars; add ActiveTelemetryOverrides() to expose only the currently-set overrides without handing callers a mutable slice - Replace os.Getenv loop in enable handler with config.ActiveTelemetryOverrides(), removing the direct os import from the command layer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This looks good, but I believe we should manage the setting under the |
Good call - so pretty much take what I've got here and put it under e.g. |
Telemetry enable/disable now live at `circleci settings telemetry enable` and `circleci settings telemetry disable` rather than as a top-level command group. Settings imports the telemetry package and registers it as a subcommand; root no longer registers telemetry directly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@pete-woods this is updated to be |
| @@ -0,0 +1,90 @@ | |||
| // Copyright (c) 2026 Circle Internet Services, Inc. | |||
There was a problem hiding this comment.
These files still look like they need moving.
Stamping, assuming that will be done, though.
|
Have stamped under the assumption of moving those files. |
The internal/cmd/telemetry package is removed entirely. The three files are recreated as package settings under internal/cmd/settings/, and settings.go now calls newTelemetryCmd() directly with no cross-package import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ahhh sorry about that, I've clearly been juggling too many Claude sessions. They're fully moved over now rather than duplicated. |
Adds
circleci settings telemetry enableandcircleci settings telemetry disable. Preference is persisted to the config file; env vars (CIRCLECI_NO_TELEMETRY,NO_ANALYTICS,DO_NOT_TRACK,CI) always win.telemetry_enabledis also surfaced incircleci settings list.Design notes
circleci settings telemetryrather than as a top-level command group — telemetry is a CLI setting, so it belongs alongsidesetandlist--jsonon enable/disable — pure mutation commands; read path is covered bysettings list --json--config), not the XDG defaultTest plan
circleci settings telemetry enable/disablewrite the correct value and print the right pathcircleci --config /tmp/custom.yml settings telemetry enableconfirmation shows/tmp/custom.ymlCIRCLECI_NO_TELEMETRY=1 circleci settings telemetry enablesaves the preference but prints the override noticecircleci settings listand--jsonboth includetelemetry_enabledtask test🤖 Generated with Claude Code