Repository navigation
fix(linbo_upload): report failed uploads as failed - #198
Merged
Merged
Conversation
linbo_upload ignored the exit status of rsync and grepped the rsync log for " rsync --skip-compress=... error", a pattern a search and replace had made of " rsync error" and that never matches. Every failed upload, e.g. with a wrong password or refused by the server's pre-upload checks (rsync code 4), was therefore reported as "Successfully uploaded" with exit status 0. The exit status of rsync is now evaluated, and the log is searched for "rsync error" again. Signed-off-by: [email protected] Assisted-by: Claude
4 tasks done
HappyBasher
added a commit
that referenced
this pull request
Oct 24, 2026
linbo_upload ignored the exit status of rsync and grepped the rsync log for " rsync --skip-compress=... error", a pattern a search and replace had made of " rsync error" and that never matches. Every failed upload, e.g. with a wrong password or refused by the server's pre-upload checks (rsync code 4), was therefore reported as "Successfully uploaded" with exit status 0. The exit status of rsync is now evaluated, and the log is searched for "rsync error" again. Backport of d8d57ff (#198) from 7.4. Signed-off-by: [email protected] Assisted-by: Claude
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.
Summary
linbo_uploadreported every failed upload as successful (exit status 0):grep -q " rsync --skip-compress="$RSYNC_SKIP_COMPRESS" error"never matches. A search and replace turned the original" rsync error"into this (already in the 7.4 source import Refactor build process to use 100% Ubuntu components #151; 4.3 is affected the same way).With the new pre-upload checks of 7.4.21 (#133) this matters: an upload refused by the server (rsync code 4) was shown as "Successfully uploaded".
Fix: evaluate the exit status of rsync (
|| RC=1) and grep the log forrsync erroragain. Header converted.Backport to 4.3 to follow.
Test plan
busybox ash -nFailed to upload zzfail.qcow2(before:Successfully uploaded, reproduced)ubuntu.qcow2, refused by the pre-upload hook:Failed to upload ubuntu.qcow2, server image untouchedzzok.qcow2:Successfully uploaded(removed from the server afterwards)🤖 Generated with Claude Code