forge: typed error for a close refused by open dependencies #1922
Notifications
Due Date
No due date set.
Blocks
#1920 Effective Go: critical paths
sam/archie
Reference: sam/archie#1922
Reference in new issue
Block a user
closeIssueOrRecordBlock matches "dependenc" in the forge error text, and natsrpc.Envelope flattens every error to a string so a sentinel cannot cross it. Add forge.ErrBlockedByDependencies, carry a code through natsrpc.Envelope, map FailedPrecondition + ErrorInfo BLOCKED_BY_DEPENDENCIES in forgeext, and have archipelago's Gitea forge return it on HTTP 412 (SDK maps it to the status).
Done when control_steps uses errors.Is and a test shows the sentinel survives the envelope. Ships in the same release as the archipelago change.
Done in
60c0f19e(core) and archipelago 882a215 (SDK maps the sentinel to FailedPrecondition + ErrorInfo BLOCKED_BY_DEPENDENCIES; the Gitea forge returns it on HTTP 412). natsrpc envelopes carry a code so the sentinel survives the NATS hop; TestEnvelopeKeepsSentinel failed on the old envelope. A Gitea extension built before 882a215 makes a refused close park instead of recording the block. task check passed.