Skip to content

Surface StorageVersionMigrator behind chart feature flag (opt-in)#5418

Merged
ChrisJBurns merged 1 commit into
mainfrom
chris/svm-chart-surface
Jun 2, 2026
Merged

Surface StorageVersionMigrator behind chart feature flag (opt-in)#5418
ChrisJBurns merged 1 commit into
mainfrom
chris/svm-chart-surface

Conversation

@ChrisJBurns
Copy link
Copy Markdown
Collaborator

@ChrisJBurns ChrisJBurns commented Jun 1, 2026

Summary

Exposes the StorageVersionMigrator controller (PR-A, #5362) to operator users via a new helm chart feature flag.

The feature stays opt-in via the chart value (default false). Admins who want auto-migration set operator.features.storageVersionMigrator: true at install or upgrade time. A future release can flip the default if/when we want the feature on by default — that flip is intentionally a separate decision.

User-facing reference docs and the upgrade-guide walkthrough are deliberately not in this PR — they land separately.

Part of #4969. Depends on #5362 (merged) and #5391 (merged).

Medium level
  • New operator.features.storageVersionMigrator value in deploy/charts/operator/values.yaml, defaulting to false. helm-docs comment explains what the feature does — no temporal claims about when the default might change.
  • deployment.yaml wires TOOLHIVE_ENABLE_STORAGE_VERSION_MIGRATOR env var from the chart value.
  • deploy/charts/operator/README.md regenerated by task helm-docs to reflect the new value.
  • No operator-code change. The default in cmd/thv-operator/app/app.go's isStorageVersionMigratorEnabled() stays false — chart-level opt-in is sufficient for helm-installed operators, and keeping the operator-code default unchanged matches PR-A's posture.
Low level
File Change
deploy/charts/operator/values.yaml New operator.features.storageVersionMigrator: false value (+6 lines)
deploy/charts/operator/templates/deployment.yaml New env-var block wiring TOOLHIVE_ENABLE_STORAGE_VERSION_MIGRATOR (+2 lines)
deploy/charts/operator/README.md helm-docs regeneration (+2 / -1)

Type of change

  • New feature (additive — extends an existing env-var-driven feature flag with a chart-level surface)
  • Bug fix
  • Breaking change
  • Refactoring
  • Documentation
  • Other

Test plan

  • task build clean
  • helm lint deploy/charts/operator clean
  • task helm-docs produces no further diff after the value is added
  • TOOLHIVE_ENABLE_STORAGE_VERSION_MIGRATOR env var wiring matches the constant the controller reads in cmd/thv-operator/app/app.go

Why default false

Opt-in posture for one release:

  • Lets operators try the feature on staging before flipping their production charts.
  • Avoids the situation where users on helm upgrade get a behavioural change they didn't anticipate.
  • Defers the "feature must be on for the version-removal release to be safe" coupling to a deliberate later flip, when the upgrade story is more visible to users.

A future release will flip the chart default to true. That flip is intentionally a separate decision.

Follow-ups (separate PRs / issues)

  • User-facing reference docs and upgrade-guide walkthrough (will land in a follow-up PR).
  • Operator-code default flip in app/app.go (paired with the chart-default flip).
  • Chart-conditional RBAC gating (template the migrator's RBAC rules behind if .Values.operator.features.storageVersionMigrator).
  • CRD-level MigrationStuck Condition + Warning event for better SRE visibility.
  • Full Prometheus metrics suite (crs_processed_total, reconcile_duration_seconds, cache_size, consecutive_conflict_passes).

Generated with Claude Code

@github-actions github-actions Bot added the size/L Large PR: 600-999 lines changed label Jun 1, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.77%. Comparing base (05ca226) to head (cf9c977).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5418      +/-   ##
==========================================
+ Coverage   68.76%   68.77%   +0.01%     
==========================================
  Files         629      629              
  Lines       63937    63937              
==========================================
+ Hits        43964    43972       +8     
+ Misses      16721    16712       -9     
- Partials     3252     3253       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds an opt-in chart value (`operator.features.storageVersionMigrator`,
default `false`) and wires `TOOLHIVE_ENABLE_STORAGE_VERSION_MIGRATOR`
into the operator deployment. helm-docs README regenerated.

The controller (PR-A, #5362) and the opt-in labels + CI guard
(PR-B, #5391) are on main. This PR is the chart-side surface that
lets operators opt in via `helm install --set` or values.yaml.

Reference and upgrade-guide docs are intentionally separate — they
land in a follow-up PR.

Closes #4969.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisJBurns ChrisJBurns force-pushed the chris/svm-chart-surface branch from ff9a780 to cf9c977 Compare June 1, 2026 17:27
@github-actions github-actions Bot added size/XS Extra small PR: < 100 lines changed and removed size/L Large PR: 600-999 lines changed labels Jun 1, 2026
@ChrisJBurns ChrisJBurns changed the title Surface StorageVersionMigrator behind chart feature flag (opt-in) + docs Surface StorageVersionMigrator behind chart feature flag (opt-in) Jun 1, 2026
@github-actions github-actions Bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Jun 1, 2026
@ChrisJBurns ChrisJBurns merged commit 974aab5 into main Jun 2, 2026
43 checks passed
@ChrisJBurns ChrisJBurns deleted the chris/svm-chart-surface branch June 2, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants