ci: fail publish pipeline loudly on registry/auth/network errors #396
Reference in New Issue
Block a user
Delete Branch "fix/publish-loud-errors"
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?
Summary
The
publish-npmstep ended with|| echo "[publish] Some packages may already exist at this version — continuing", which unconditionally converted any failure into success.That fallback silently masked a real Gitea registry 404 during the
@mosaic/*→@mosaicstack/*org rename — pipelines #681 and #684 reported green while every single@mosaicstack/*publish fell on the floor, blocking users from installing the gateway until the registry issue was independently resolved in #394.Change
Replace the blanket swallow with a targeted rule:
E404/E401/ENEEDAUTH/ECONNREFUSED/ETIMEDOUT/ENOTFOUNDEPUBLISHCONFLICT/cannot publish over/previously publishedWhy this matters
This pattern was hiding the exact class of bug I was investigating for the last several hours. Without this fix the next publish-drift will hide itself the same way.
Test plan
pnpm format:checkpassespython3 -c 'import yaml; yaml.safe_load(...)')437623a76fto43145745d7