Summary
Fixes a bug where enterprise v8 apps could be incorrectly escalated from soft redeploy to hard redeploy.
Problem
- Soft redeploy checks v8 component structure changes.
- Enterprise app specs stored locally can have redacted
compose(compose: []). - That caused false structure mismatch detection and triggered hard redeploy escalation (
Component structure changed...), which is risky for app data.
Root Cause
The structure-change comparison used local installed specs directly, without accounting for enterprise redaction.
Changes
ZelBack/src/services/appLifecycle/advancedWorkflows.js
- In
softRedeploy:- For v8 enterprise apps with redacted/missing local
compose, decrypt installed specs before comparing. - Only escalate to hard redeploy when structure is safely comparable.
- If comparison cannot be done safely, skip destructive escalation.
- For v8 enterprise apps with redacted/missing local
- Applied the same enterprise-safe comparison handling to the periodic redeploy path.
tests/unit/advancedWorkflows.test.js
- Added/updated tests to validate:
- v8 real component structure changes still escalate.
- enterprise redacted local compose does not false-escalate.
- existing v4-v7 behavior remains intact for this path.
Validation
- Ran targeted tests:
env NODE_CONFIG_DIR=$PWD/tests/unit/globalconfig npx mocha tests/unit/advancedWorkflows.test.js --exit
- Added explicit coverage for enterprise redacted compose soft-redeploy behavior.
Impact
- Prevents false hard redeploys for enterprise image/tag updates.
- Keeps intended hard-redeploy behavior for true v8 component structure changes.