Skip to content

fix(Mastercontainer): send notification when container image pulls fail during daily backup - #8511

Draft
szaimen with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-issue-8452
Draft

fix(Mastercontainer): send notification when container image pulls fail during daily backup#8511
szaimen with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-issue-8452

Conversation

Copilot AI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

When automatic updates are enabled, PullImage() silently swallows pull failures if the image already exists locally — it logs via error_log() but returns void, exits 0, and no notification is ever sent. Instances can run stale images indefinitely with no admin-visible signal.

Changes:

  • DockerActionManager::PullImage() — return type voidbool (false on skip/failure with local fallback, still throws if no local image exists)
  • DockerController::PerformRecursiveImagePull() — accumulates failed container names by reference
  • DockerController::PullAllContainerImages() — returns string[] of failures instead of void
  • PullContainerImages.php — writes failures to data/image_pull_failures, exits 1
  • daily-backup.sh — checks exit code, logs warning, adds elif branch to send notification even without daily backup enabled
  • BackupNotification.php — reads the failures file, sends "Container image update failed!" notification with affected image names, cleans up
  • DataConst.php — adds GetImagePullFailuresFile() path constant

Backup still proceeds with existing (older) images; the failure is reported, not blocking.

  • The PR was tested and verified that it works locally
  • Sign-off message is added to all commits
  • Tests (playwright if possible) are included
  • Screenshots before/after for front-end changes
  • Documentation has been updated or is not required
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone next added

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: GitHub Copilot (claude-sonnet-4)

…il during daily backup

When automatic updates are enabled and image pulls fail (e.g. due to
registry issues, disk space, or host-level problems), AIO now:

- Detects pull failures via PullImage() returning false
- Collects all failed container image names
- Writes failure details to a data file
- Exits PullContainerImages.php with code 1
- Logs a warning in the daily-backup.sh output
- Sends a notification to Nextcloud admins via BackupNotification.php

Previously, pull failures were silently swallowed when images already
existed locally, causing instances to run outdated images without any
user-visible indication.

Closes: #8452

Assisted-by: GitHub Copilot:claude-sonnet-4
Copilot AI requested a review from szaimen July 31, 2026 08:47
@szaimen szaimen added 3. to review Waiting for reviews enhancement New feature or request labels Jul 31, 2026
@szaimen szaimen added this to the next milestone Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic updates fail silently when image pulls fail — no notification, daily log still says successful

2 participants