Skip to content

[Feat] Check for updates automatically#1116

Merged
RichardAnderson merged 2 commits into
vitodeploy:4.xfrom
RichardAnderson:fix/pending-updates
May 23, 2026
Merged

[Feat] Check for updates automatically#1116
RichardAnderson merged 2 commits into
vitodeploy:4.xfrom
RichardAnderson:fix/pending-updates

Conversation

@RichardAnderson

Copy link
Copy Markdown
Member

This pull request introduces a new scheduled process to check for package updates on all servers and improves the accuracy of update counting. The main changes include adding a new Artisan command and job for checking updates, scheduling this check to run daily, and refining the logic for determining the number of available updates.

  • Modified the logic in OS.php to accurately count available updates by removing an unnecessary subtraction, ensuring the number does not go below zero.
  • Updated the shell command in available-updates.blade.php to filter out the header line and suppress error output, providing a more accurate count of upgradable packages.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an automated daily “check for package updates” workflow across all READY servers and updates the SSH parsing/counting logic used to compute the number of available OS package upgrades.

Changes:

  • Add servers:check-updates Artisan command plus a queued job (CheckForUpdatesJob) to run per-server update checks and broadcast server.updated.
  • Schedule the new command to run daily at 02:00.
  • Refine available-updates counting by adjusting the SSH script output and simplifying the parsing logic in OS::availableUpdates().

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
resources/views/ssh/os/available-updates.blade.php Adjusts the apt command pipeline used to count upgradable packages.
app/SSH/OS/OS.php Updates parsing/counting logic for “Available updates:” output.
app/Jobs/Server/CheckForUpdatesJob.php Introduces a queued job that runs update checks and broadcasts server updates.
app/Console/Kernel.php Schedules the new servers:check-updates command daily.
app/Console/Commands/CheckServerUpdatesCommand.php Adds a command that dispatches per-server update-check jobs for READY servers.

Comment thread app/Jobs/Server/CheckForUpdatesJob.php Outdated
Comment thread app/Jobs/Server/CheckForUpdatesJob.php
Comment thread app/SSH/OS/OS.php
Comment thread app/Console/Commands/CheckServerUpdatesCommand.php
Comment thread app/Jobs/Server/CheckForUpdatesJob.php Outdated
@RichardAnderson RichardAnderson merged commit c185399 into vitodeploy:4.x May 23, 2026
3 checks passed
@RichardAnderson RichardAnderson deleted the fix/pending-updates branch May 23, 2026 14:09
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.

3 participants