fix(publish): timeout + retry; one template's failure no longer aborts the run#21
Merged
Merged
Conversation
…longer aborts the run The marketplace publish died mid-run against staging: the control plane is a cold singleton, and a heavy version POST exceeded undici's default 5-min headers timeout, which threw and killed the whole script — so only the first template published and the rest never ran. - postJson: explicit AbortController timeout (PUBLISH_TIMEOUT_MS, default 240s) + retry (PUBLISH_RETRIES, default 4) with backoff on timeout / network error / 5xx. 4xx (incl. 409 "already published") returns immediately. On exhausted retries it returns a structured failure instead of throwing. - main loop: wrap publishOne in try/catch and continue — every template is attempted; failures are collected and reported, exit 1 only at the end. Net: a cold start or one stuck package no longer blocks the other templates from publishing, and transient timeouts self-heal on retry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The staging marketplace publish died mid-run: the control plane is a cold singleton, and a heavy version POST exceeded undici's default 5-min headers timeout → threw → killed the whole script. Only the first template (
compliance) published; the rest never ran.PUBLISH_TIMEOUT_MS, default 240s) + retry (PUBLISH_RETRIES, default 4) with backoff on timeout / network / 5xx. 4xx (incl. 409) returns immediately. Exhausted retries → structured failure, no throw.publishOnein try/catch + continue — every template is attempted; failures collected + reported; exit 1 only at the end.Net: a cold start or one stuck package no longer blocks the others, and transient timeouts self-heal on retry. Fixes the partial publish (only compliance@0.1.3 landed; runs 26935994124 + 26936304840 both died on
content).🤖 Generated with Claude Code