Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep compatibility-only features out of upgrade URLs

rcourtmanc0ef2d44f37a
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index 7a660e2849..449c67cd59 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -376,7 +376,10 @@ Community limit enforcement.
and `pulse-pro:license-server/self_hosted_feature_catalog.generated.go`
are generated projections of that source for app and public-pricing
consumers; those projections must not drift through hand-maintained
- parallel lists or page-local renaming.
+ parallel lists or page-local renaming. `pkg/licensing/upgrade.go` must
+ also treat `compatibility_only` entries as non-marketed compatibility
+ capabilities by returning only the generic pricing destination rather than
+ a feature-specific paid upgrade URL.
26. Keep hosted trial-activation verifier source selection compile-time owned.
`pkg/licensing/trial_activation.go`,
`pkg/licensing/trial_activation_public_key_override_dev.go`, and
diff --git a/pkg/licensing/upgrade.go b/pkg/licensing/upgrade.go
index c8667abdc8..663a711270 100644
--- a/pkg/licensing/upgrade.go
+++ b/pkg/licensing/upgrade.go
@@ -73,6 +73,10 @@ func validateExternalUpgradeURLOverride(raw string) (string, bool) {
// UpgradeURLForFeature returns the canonical upgrade URL for a capability key.
func UpgradeURLForFeature(feature string) string {
+ if IsCompatibilityOnlyFeature(feature) {
+ return DefaultUpgradeURL
+ }
+
switch feature {
case FeatureRelay:
return DefaultUpgradeURL + "&feature=relay"
@@ -86,8 +90,6 @@ func UpgradeURLForFeature(feature string) string {
return DefaultUpgradeURL + "&feature=ai_autofix"
case FeatureAIAlerts:
return DefaultUpgradeURL + "&feature=ai_alerts"
- case FeatureKubernetesAI:
- return DefaultUpgradeURL + "&feature=kubernetes_ai"
case FeatureRBAC:
return DefaultUpgradeURL + "&feature=rbac"
case FeatureAgentProfiles:
diff --git a/pkg/licensing/upgrade_test.go b/pkg/licensing/upgrade_test.go
index 2a49175d9f..db5d241ec6 100644
--- a/pkg/licensing/upgrade_test.go
+++ b/pkg/licensing/upgrade_test.go
@@ -119,6 +119,24 @@ func TestCompatibilityOnlyFeaturesStayOutOfGenericUpgradeReasons(t *testing.T) {
}
}
+func TestCompatibilityOnlyFeatureUpgradeURLsFallBackToGenericPricing(t *testing.T) {
+ foundCompatibilityOnlyFeature := false
+
+ for _, entry := range AllFeatureMetadata() {
+ if !IsCompatibilityOnlyFeature(entry.Key) {
+ continue
+ }
+ foundCompatibilityOnlyFeature = true
+ if got := UpgradeURLForFeature(entry.Key); got != DefaultUpgradeURL {
+ t.Fatalf("UpgradeURLForFeature(%q) = %q, want generic pricing URL %q", entry.Key, got, DefaultUpgradeURL)
+ }
+ }
+
+ if !foundCompatibilityOnlyFeature {
+ t.Fatal("expected at least one compatibility-only feature in metadata")
+ }
+}
+
func TestUpgradeReasonMatrixDerivesFromCanonicalFeatureMetadata(t *testing.T) {
expectedOrder := []string{
FeatureMobileApp,