Skip to content

chore: add comment that explains require_telemetry behavior #6211

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
merged 7 commits into from
Feb 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! feat: support licenses that require telemetry
  • Loading branch information
ammario committed Feb 13, 2023
commit 81bca12aace229a9f740209c7ec785fb7e15c15d
9 changes: 7 additions & 2 deletions enterprise/coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"crypto/ed25519"
"crypto/tls"
"crypto/x509"
"fmt"
"net/http"
"sync"
"time"
Expand Down Expand Up @@ -255,7 +254,13 @@ func (api *API) updateEntitlements(ctx context.Context) error {
}

if entitlements.RequireTelemetry && !api.DeploymentConfig.Telemetry.Enable.Value {
return xerrors.New("telemetry disabled, but a license requires telemetry")
// We can't fail because then the user couldn't remove the offending
// license w/o a restart.
entitlements.Errors = append(
entitlements.Errors, "License requires telemetry but telemetry is disabled",
)
api.Logger.Error(ctx, "license requires telemetry enabled")
return nil
}

entitlements.Experimental = api.DeploymentConfig.Experimental.Value || len(api.AGPL.Experiments) != 0
Expand Down