Skip to content

feat(TKC-6726): Use license identity for cli init demo telemetry - #8193

Open
Valentin-Marko wants to merge 2 commits into
mainfrom
tkc-6726-use-license-identity-for-cli-init-demo-telemetry
Open

feat(TKC-6726): Use license identity for cli init demo telemetry#8193
Valentin-Marko wants to merge 2 commits into
mainfrom
tkc-6726-use-license-identity-for-cli-init-demo-telemetry

Conversation

@Valentin-Marko

@Valentin-Marko Valentin-Marko commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Pull request description

testkube init demo now validates the license against license.testkube.io/validate before installing, and uses the license name as the telemetry user ID for the demo onboarding events instead of the environment ID.

Checklist (choose whats happened)

  • breaking change! (describe)
  • tested locally
  • tested on cluster
  • added new dependencies
  • updated the docs
  • added a test

Breaking changes

Changes

  • init demo calls the license /validate endpoint at the "license validated" step. On a definitive "invalid" response it fails fast with a clear Invalid license key error (before the multi-minute Helm install); a network/transport error is non-fatal and the install proceeds (the control plane remains the authoritative gate).
  • The demo telemetry (testkube_init_demo) now sends the license name from the validate response as the userId for the steps from license validated onward, replacing the environment ID. sendTelemetry gained an optional userID override so the dashboard command is unaffected.
  • Removed the redundant local license format check (length / key/ prefix) and its now-unused licenseFormat const — validation is handled by /validate.

Fixes

@testkubebot

testkubebot Bot commented Aug 31, 2026

Copy link
Copy Markdown

✅ Testkube GitHub Integration

Review based on commit ba44845.

All tests and quality gates passed.


Phase Status
Test Workflow Execution ✅ Passed
Quality Gate ✅ Passed

7 workflows executed

lint-go passed
in 4m17s (🚀 31. Aug. 2026 - 14:25:28 UTC / 🏁 31. Aug. 2026 - 14:29:46 UTC)

lint-proto passed
in 25s (🚀 31. Aug. 2026 - 14:25:28 UTC / 🏁 31. Aug. 2026 - 14:25:53 UTC)

integration-tests passed
in 7m51s (🚀 31. Aug. 2026 - 14:25:28 UTC / 🏁 31. Aug. 2026 - 14:33:19 UTC)

unit-tests passed
in 4m8s (🚀 31. Aug. 2026 - 14:25:28 UTC / 🏁 31. Aug. 2026 - 14:29:36 UTC)

verify-crds passed
in 2m13s (🚀 31. Aug. 2026 - 14:25:28 UTC / 🏁 31. Aug. 2026 - 14:27:41 UTC)

verify-protobuf passed
in 16s (🚀 31. Aug. 2026 - 14:25:28 UTC / 🏁 31. Aug. 2026 - 14:25:45 UTC)

lint-pr passed
in 21s (🚀 31. Aug. 2026 - 14:25:28 UTC / 🏁 31. Aug. 2026 - 14:25:50 UTC)


Manage this Integration

@Valentin-Marko

Copy link
Copy Markdown
Contributor Author

@greptileai please review

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR validates demo licenses before installation, uses the validated license identity for subsequent onboarding telemetry, and adds a ten-second request deadline that resolves the previously reported validation hang.

  • Invalid licenses now fail before Helm installation.
  • Validation transport failures remain non-fatal.
  • Dashboard telemetry retains its existing user identity behavior.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
cmd/kubectl-testkube/commands/init.go Adds pre-install license validation and applies the returned license name as the demo telemetry identity while preserving the non-fatal transport-error path.
pkg/diagnostics/validators/license/client.go Adds a request-scoped ten-second deadline that bounds the HTTP request and response-body processing.

Reviews (3): Last reviewed commit: "fix: add timeout to license validation r..." | Re-trigger Greptile

Comment thread cmd/kubectl-testkube/commands/init.go
@Valentin-Marko

Copy link
Copy Markdown
Contributor Author

@greptileai please review again

@Valentin-Marko
Valentin-Marko marked this pull request as ready for review August 31, 2026 14:25
@Valentin-Marko
Valentin-Marko requested a review from a team as a code owner August 31, 2026 14:25
@Valentin-Marko
Valentin-Marko requested a review from buarki August 31, 2026 14:25
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.

1 participant