Skip to content

feat: rename the hyperdx values key to clickstack - #311

Merged
jordan-simonovski merged 3 commits into
mainfrom
jordansimonovski/clickstack-values-key
Nov 19, 2026
Merged

jordan-simonovski merged 3 commits into
mainfrom
jordansimonovski/clickstack-values-key

Conversation

@jordan-simonovski

Copy link
Copy Markdown
Contributor

Renames the chart's top-level hyperdx values key to clickstack, matching the chart's name. Values that still use hyperdx keep working: the chart merges them in and prints a deprecation warning in the install notes.

Key decisions

  • hyperdx wins where both keys set the same value. Making clickstack win would mean comparing every value against the shipped defaults inside the templates.
  • Resource names, templates/hyperdx/ and the clickstack.hyperdx.* helpers stay as they are, so an upgrade renames nothing in the cluster.
  • The warning lives in NOTES.txt, Helm's only channel for it. helm template and Argo CD users won't see it; the upgrade guide covers them.

Backwards compatibility

  • Existing values files and --set hyperdx.* flags render the same manifests as main. Checked for the examples and integration values under Helm 4.3 and 3.19.
  • A null under hyperdx still removes the default, so hyperdx.secrets: null keeps skipping the Secret.
  • tpl strings that read .Values.hyperdx.* still resolve.
  • helm upgrade --reuse-values from 3.5.0 renders the same as before. Moving settings to clickstack in that upgrade needs -f, because the stored hyperdx values win; the upgrade guide and the warning say so.

Other impact

Implementation detail

clickstack.normalizeValues runs once per render. It overlays a user-set hyperdx map onto clickstack (maps merge, lists and scalars replace, a null deletes), then points .Values.hyperdx at the result and records hyperdxKeyUsed for NOTES. Under --reuse-values from an older release clickstack is absent, so it starts from an empty map and the stored hyperdx values supply everything.

Existing tests moved to clickstack. New tests cover the legacy key overriding defaults, precedence, top-level and nested nulls, tpl aliasing, the --reuse-values shape (clickstack: null), and the warning. The 1.x hyperdx.usageStatsEnabled check keeps its legacy name. Coverage is 99.86% line and 91.67% branch.

@jordan-simonovski
jordan-simonovski requested a review from a team as a code owner November 11, 2026 23:11
@changeset-bot

changeset-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1a32754

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
helm-charts Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Helm template coverage

Metric Value
Line coverage 99.87%
Branch coverage 91.70%
Line threshold 99% (met)
Branch threshold 90% (met)
Uncovered details

charts/clickstack/templates/NOTES.txt

Uncovered lines: none

Uncovered branches: 38:default:fallback

charts/clickstack/templates/_helpers.tpl

Uncovered lines: 17

Uncovered branches: 163:range:empty, 165:range:empty, 16:if:true, 203:and(2):false, 234:or(1):true, 287:default:fallback, 297:default:fallback, 298:or(1):true, 314:if:false, 444:range:empty, 465:range:empty, 46:range:empty

charts/clickstack/templates/additional-manifests.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/clickhouse/cluster.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/clickhouse/keeper.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/hyperdx/configmap.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/hyperdx/cronjob-check-alerts.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/hyperdx/dashboard-configmap.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/hyperdx/dashboard-provisioner-rbac.yaml

Uncovered lines: none

Uncovered branches: 41:range:empty, 61:range:empty

charts/clickstack/templates/hyperdx/deployment.yaml

Uncovered lines: none

Uncovered branches: 122:default:fallback, 132:default:fallback, 197:default:fallback, 202:with:empty, 21:with:empty, 27:default:fallback, 42:if:false, 43:with:empty

charts/clickstack/templates/hyperdx/hpa.yaml

Uncovered lines: none

Uncovered branches: 17:with:empty

charts/clickstack/templates/hyperdx/ingress.yaml

Uncovered lines: none

Uncovered branches: 16:with:empty, 36:if:false, 41:range:empty, 46:range:empty, 49:with:empty, 55:range:empty, 59:range:empty, 60:or(2):true, 60:or(3):true

charts/clickstack/templates/hyperdx/networkpolicy.yaml

Uncovered lines: none

Uncovered branches: 12:with:empty

charts/clickstack/templates/hyperdx/pdb.yaml

Uncovered lines: none

Uncovered branches: 11:with:empty

charts/clickstack/templates/hyperdx/secret.yaml

Uncovered lines: none

Uncovered branches: 2:or(2):true, 2:or(3):true

charts/clickstack/templates/hyperdx/service.yaml

Uncovered lines: none

Uncovered branches: 10:with:empty, 15:default:fallback

charts/clickstack/templates/hyperdx/serviceaccount.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/mongodb/community.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/mongodb/password-secret.yaml

Uncovered lines: none

Uncovered branches: none

charts/clickstack/templates/otel-collector/custom-config.yaml

Uncovered lines: none

Uncovered branches: none

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Deep Review

Scope: 81 files vs base 3dd7921 — rename of the chart's top-level hyperdx values key to clickstack, with a backwards-compat merge helper and a deprecation warning.
Intent: Keep existing hyperdx.* values files and --set hyperdx.* rendering identical manifests; introduce clickstack.normalizeValues to overlay legacy hyperdx onto clickstack (hyperdx wins, maps deep-merge, lists/scalars replace, null deletes) and alias .Values.hyperdx → .Values.clickstack.

✅ No critical issues found. The core merge logic in _helpers.tpl is sound and well-tested (99.87% line / 91.70% branch coverage, both thresholds met). Verified first-hand:

  • All 19 rendered templates begin with {{- include "clickstack.normalizeValues" . -}} on line 1, so values are normalized before any read.
  • validateRemovedValues does not false-positive after the hyperdx→clickstack alias — the new clickstack schema has no legacy flat keys (ingress.tls, ingress.host, image, replicas), so those removed-key checks still read nil, and a legacy user who sets a genuinely removed key still trips the failure with the updated clickstack.* hint.
  • The --reuse-values path (absent/null clickstack) is handled: the helper seeds an empty dict then overlays the stored hyperdx values.
  • hyperdxKeyUsed is a top-level (not global) key, so it does not leak into the otel-collector subchart or rendered manifests.
  • docs/UPGRADE.md, AGENTS.md, README.md, examples, and integration-tests are consistently migrated; remaining hyperdx strings are legitimate resource names and the intentionally-unchanged clickstack.hyperdx.* helpers / templates/hyperdx/ directory.

🟡 P2 — recommended

  • AGENTS.md:167 — the invariant "every template must start with the clickstack.normalizeValues include" is enforced only by prose; a future template that omits it would silently serve un-merged clickstack defaults to legacy-only users, with no test or CI gate catching it.
    • Fix: add a helm-unittest/CI assertion that every rendered template includes the helper, or centralize the merge so individual templates can't skip it.
  • charts/clickstack/tests/app-configmap_test.yaml:152 — the --reuse-values shape case (clickstack: null plus legacy hyperdx) asserts only one ConfigMap key, so a regression that drops other values on the legacy-only path would pass unnoticed.
    • Fix: extend the legacy suite to render deployment.yaml and secret.yaml under clickstack: null with a full legacy value set and assert the complete result.
🔵 P3 nitpicks (2)
  • charts/clickstack/templates/_helpers.tpl:46 — the overlay's list-replacement and map-vs-scalar collision semantics are not directly asserted by any test, though they are exercised indirectly.
    • Fix: add a legacy-values case where a hyperdx list and a scalar-vs-map collision override clickstack defaults.
  • charts/clickstack/templates/NOTES.txt:54 — the deprecation warning is emitted only via NOTES.txt, so helm template and Argo CD / GitOps users never see it.
    • Fix: none required; the limitation is intentional and already covered by docs/UPGRADE.md.

Reviewers (7): correctness, adversarial, testing, maintainability, project-standards, api-contract, previous-comments.

Testing gaps: complete-render assertion for the legacy-only (clickstack: null) --reuse-values path; explicit coverage of overlay list-replacement and map/scalar collision semantics.

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR.

# Conflicts:
#	.changeset/browser-telemetry-endpoint.md
#	.changeset/usage-stats-old-key.md
#	AGENTS.md
#	charts/clickstack/README.md
#	charts/clickstack/templates/hyperdx/configmap.yaml
#	charts/clickstack/templates/hyperdx/pdb.yaml
#	charts/clickstack/tests/otel-collector_test.yaml
#	charts/clickstack/values.yaml
# Conflicts:
#	charts/clickstack/README.md
@jordan-simonovski
jordan-simonovski merged commit d6d89a9 into main Nov 19, 2026
11 checks passed
@jordan-simonovski
jordan-simonovski deleted the jordansimonovski/clickstack-values-key branch November 19, 2026 20:29
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.

2 participants