fix: restore write_result on pre-docker error paths in _launch_runner_docker
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

Prevents infinite retry loops when secret resolution or mount alias
validation fails before the docker run is attempted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-16 00:33:55 +00:00
parent ef40433fff
commit 4487d1512c

View file

@ -427,6 +427,7 @@ _launch_runner_docker() {
secret_val=$(load_secret "$secret") || true secret_val=$(load_secret "$secret") || true
if [ -z "$secret_val" ]; then if [ -z "$secret_val" ]; then
log "ERROR: Secret '${secret}' could not be resolved for action ${action_id}" log "ERROR: Secret '${secret}' could not be resolved for action ${action_id}"
write_result "$action_id" 1 "Secret not found: ${secret}"
return 1 return 1
fi fi
cmd+=(-e "${secret}=${secret_val}") cmd+=(-e "${secret}=${secret_val}")
@ -451,6 +452,7 @@ _launch_runner_docker() {
;; ;;
*) *)
log "ERROR: Unknown mount alias '${mount_alias}' for action ${action_id}" log "ERROR: Unknown mount alias '${mount_alias}' for action ${action_id}"
write_result "$action_id" 1 "Unknown mount alias: ${mount_alias}"
return 1 return 1
;; ;;
esac esac