fix(ci): deploy-api gate needs always() — skipped postgres deploy silently skipped API deploy #837
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/deploy-api-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Since #826, deploy-api has needs: [changes, build-api, deploy-postgres] but WITHOUT always() in its if. In Forgejo/GHA semantics, when a needs-dependency is skipped (deploy-postgres on PRs that don't touch postgres), the job is skipped BEFORE the if expression is evaluated — even though the expression explicitly accepts 'skipped'. Consequence: runs 2742 (#831) and 2753 (#835) built the API image (success) but silently never deployed it — API containers in production stayed on older images while web deployed. User-visible as 404 on the new /unassign endpoint (#835's feature lives in the registry image, not in the running container).
deploy-web and all worker deploys already carry always() — deploy-api was the only one missing it (introduced by #826's needs-chain change).
Fix
if: always() && ... (mirroring deploy-web's pattern). Merging this triggers a full-rebuild workflow run (workflow change = full trigger per policy), which recreates memories-api from the latest image — bringing the undeployed #831/#835 API changes (incl. face unassign) live as a side effect.