What happens to your app during a `pre-upgrade` migration if the migration is not backward compatible?
AdvancedConceptHooks, Tests & Validation
Answer
During a pre-upgrade hook the old application pods are still serving traffic against the newly migrated schema. If the migration drops or renames a column the old code uses, you get errors until the rollout finishes. And if the upgrade then fails with --atomic, Helm rolls back the pods but not the schema.
The fix is the expand/contract pattern: release N adds the new column (both versions work), release N+1 switches the code, release N+2 drops the old column.