Skip to content

Fix: update processing aborting when APPRISE_SIDECAR_URL is unreachable - #138

Open
databloat wants to merge 1 commit into
containrrr:masterfrom
databloat:fix-notification-failure-aborts-run
Open

databloat wants to merge 1 commit into
containrrr:masterfrom
databloat:fix-notification-failure-aborts-run

Conversation

@databloat

Copy link
Copy Markdown

What i changed

  • Guard curl in send_notification() against failures
  • Log notification errors instead of aborting the whole script

Why

The script runs with set -euo pipefail, so an unreachable APPRISE_SIDECAR_URL
caused the entire run to exit instantly. This could prevent updates for all
remaining services from being processed.

I tested with an unreachable notification URL under set -euo pipefail:
Before it exited with curl code 6.
Now it logs the failure and continiues

Cheers

send_notification() runs under the script-wide `set -euo pipefail`. The
curl call to APPRISE_SIDECAR_URL was unguarded, so any failure to reach
it (DNS, connection refused, timeout, ...) immediately terminated the
whole script - aborting update processing for all remaining services,
even though the notification is purely informational and has no
bearing on whether updates should continue.

Wrap the curl call in an `if` so a failed notification is logged and
the run continues. Verified with a script sourcing send_notification()
under `set -euo pipefail` against an unreachable URL: previously exited
with code 7 before reaching the next statement, now logs the failure
and continues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants