Bernedotcom2312 opened a new pull request, #42995:
URL: https://github.com/apache/superset/pull/42995

   ### SUMMARY
   
   The chart ships **both** `minAvailable: 1` and `maxUnavailable: 1` in every 
`podDisruptionBudget` block, while `templates/pdb*.yaml` `fail` the render when 
both are set:
   
   ```gotemplate
   {{- if and .minAvailable .maxUnavailable }}
     {{- fail "Only one of minAvailable or maxUnavailable should be set" }}
   {{- end}}
   ```
   
   Helm merges user values *on top of* the chart defaults, so a consumer who 
sets only the documented minimal switch — `podDisruptionBudget.enabled: true` — 
inherits the chart's own default `maxUnavailable: 1` alongside the default 
`minAvailable: 1`. The guard then trips and aborts **the entire chart render**, 
not just the PDB:
   
   ```
   Error: execution error at (superset/templates/pdb.yaml:23:6):
     Only one of minAvailable or maxUnavailable should be set
   ```
   
   In other words, the chart's committed defaults violate the invariant its own 
templates enforce. There is no way to turn a PDB on without already knowing you 
must null out one of the two fields, which isn't documented in the values 
comments or the README. Setting `minAvailable: 2` fails for the same reason.
   
   This has been present since #27163 (Feb 2024) and affects all six blocks: 
`supersetNode`, `supersetWorker`, `supersetCeleryBeat`, `supersetCeleryFlower`, 
`supersetWebsockets`, `supersetMcp`.
   
   **Changes**
   
   - `values.yaml`: default `maxUnavailable` to null (`~`, matching the chart's 
existing nil style such as `database.uri: ~`) in all six blocks, so `enabled: 
true` renders a PDB with the chart's own `minAvailable: 1`. The 
`maxUnavailable` comment now states that `minAvailable` must be unset to use it.
   - `templates/pdb*.yaml`: the `fail` guard is **kept** — setting both 
explicitly should still fail loudly — but the message now names the offending 
values path and says how to resolve it. This is what the mirror case needs: 
setting only `maxUnavailable: 2` still trips the guard against the default 
`minAvailable: 1`, and the old message identified neither the component nor the 
remedy.
   - `tests/pdb_test.yaml`: new helm-unittest suite over all six PDB templates.
   - `Chart.yaml` / `README.md`: chart version 0.22.5 → 0.22.6 (patch, per the 
chart's Versioning section) and README regenerated with helm-docs.
   
   **Backwards compatibility:** non-breaking. Anyone already overriding 
`maxUnavailable` explicitly keeps their exact current behaviour; only the 
previously-unrenderable default combination changes.
   
   ### TESTING INSTRUCTIONS
   
   Reproduce on the released chart (fails):
   
   ```bash
   helm repo add superset https://apache.github.io/superset
   helm repo update
   
   cat > pdb-repro.yaml <<'YAML'
   supersetNode:
     podDisruptionBudget:
       enabled: true
   supersetWorker:
     podDisruptionBudget:
       enabled: true
   YAML
   
   helm template superset superset/superset --version 0.22.5 -f pdb-repro.yaml
   # Error: execution error at (superset/templates/pdb.yaml:22:4):
   #   Only one of minAvailable or maxUnavailable should be set
   ```
   
   With this branch (renders):
   
   ```bash
   helm dependency build helm/superset
   helm template superset helm/superset -f pdb-repro.yaml \
     -s templates/pdb.yaml -s templates/pdb-worker.yaml
   ```
   
   Both PDBs render with `minAvailable: 1` and no `maxUnavailable` key. 
`minAvailable: 2` alone also works now.
   
   Automated checks:
   
   ```bash
   helm unittest helm/superset   # 11 suites, 110 tests pass (5 new)
   helm lint helm/superset       # clean
   ```
   
   The new suite is a genuine regression test: reverting `values.yaml` to 
`maxUnavailable: 1` makes 2 of its 5 cases fail with the render error above. It 
covers no PDB rendered by default, `enabled: true` alone yielding 
`minAvailable: 1` with no `maxUnavailable`, an overridden `minAvailable`, 
`maxUnavailable` with `minAvailable` unset, and both-set still failing.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to