Skip to content

fix(build): make the manifest retry cleanup work under sh - #30

Open
edbfi wants to merge 1 commit into
hotio:workflowsfrom
edbfi:fix/manifest-retry-cleanup
Open

edbfi wants to merge 1 commit into
hotio:workflowsfrom
edbfi:fix/manifest-retry-cleanup

Conversation

@edbfi

@edbfi edbfi commented Oct 7, 2026 •

Copy link
Copy Markdown

Problem

The on_retry_command of Create Manifests always fails. nick-fields/retry executes it with /bin/sh (it uses execSync without a shell; the shell input only applies to command), and the value has no |, so YAML folds the loop onto one line:

while read manifest; do docker manifest rm $(awk '{print $1}' <<< ${manifest}) || true done < manifest.list

dash rejects both the here-string and the missing ; before done:

/bin/sh: 1: Syntax error: redirection unexpected

The manifest lists created before the failure stay in place, so the retries hit refusing to amend an existing manifest list with no --amend flag and a transient registry error can fail the job.

Seen in my edbfi/sabnzbd run 37594116659, attempt 1, job publish (ghcr.io).

First try: five lists were created, then two docker manifest create calls hit ghcr.io client timeouts and the cleanup failed with the error above.
Second try: refusing to amend for those five, plus two more timeouts.
Third try: ghcr.io responded again, but six of the seven lists were refused, so the job failed.

Fix

-          on_retry_command:
+          on_retry_command: |
             while read manifest; do
-              docker manifest rm $(awk '{print $1}' <<< ${manifest}) || true
+              docker manifest rm "${manifest%% *}" || true
             done < manifest.list

${manifest%% *} is the first field of each manifest.list line, which is what the awk call extracted. The fixed block passes dash -n.

Signed-off-by: edbfi <326875205+edbfi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant