Skip to content

fix(cli): add backwards compat for old telemetry env and tests #15476

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

Merged

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Nov 11, 2024

This PR adds a backwards compatible CODER_TELEMETRY env, currently this is called CODER_TELEMETRY_ENABLE.

Depends on coder/serpent#23

Fixes coder/internal#209
Refs #15467

@mafredri mafredri self-assigned this Nov 11, 2024
@mafredri mafredri force-pushed the mafredri/fix-cli-add-backcompat-for-telemetry-and-tests branch from d23ad21 to e4eaf58 Compare November 11, 2024 16:12
@mafredri mafredri force-pushed the mafredri/fix-cli-add-backcompat-for-telemetry-and-tests branch from f3fa0ba to 1ebcb3b Compare November 13, 2024 11:06
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

// Set the default telemetry to true (normally disabled in tests).
t.Setenv("CODER_TEST_TELEMETRY_DEFAULT_ENABLE", "true")

//nolint:paralleltest // No need to reinitialise the variable tt (Go version).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we should fix our linter.

Suggested change
//nolint:paralleltest // No need to reinitialise the variable tt (Go version).
//nolint:paralleltest // No need to reinitialise the variable tt (as of go v1.22).

@mafredri mafredri merged commit e55e8ee into main Nov 13, 2024
26 checks passed
@mafredri mafredri deleted the mafredri/fix-cli-add-backcompat-for-telemetry-and-tests branch November 13, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The telemetry toggle in coder/coder is lacking tests and backwards compatibility
3 participants