Fix Boolean Omission In Velero Restore Specs
When restoring from the Velero UI, boolean fields often disappear - even when users explicitly pick false. This mismatch happens because the backend ignores false values during field assignment, treating unset as truthy. The result? Restores default to Velero’s unset state, not what the user selected.
Here’s the core fix: update the restore form logic to check for null or undefined, not just truthy values. This way, false stays in the spec - no more silent dropouts.
What’s at stake? Users relying on restore accuracy for disaster recovery could end up with unexpected node port settings or missing protections. A false pick meant ‘disable,’ but the spec reads ‘disabled by default.’
Blind spots include assuming boolean fields auto-serialize - nope, UIs and backends diverge. To prevent this, always validate boolean inputs explicitly. Use null checks instead of truthy traps.
Controversy: Some argue ‘false’ is redundant and should be skipped - wrong. It’s intentional state, not noise. Ignoring it undermines user control.
Safety take: Always test boolean persistence in restore flows. When in doubt, log the spec output post-gen - catch silent drops before they cause headaches.
The bottom line: true or false, it’s not about presence - it’s about precision. Does your restore reflect the user’s intent? If not, fix the spec, not the assumptions.