feat: add node-scoped opt-out for image update detection (#1715)

* feat: add node-scoped opt-out for image update detection

Operators who use an external update authority can disable Sencho registry
polling per node without losing explicit stack Update, pull, or redeploy.

* test: fix mocks and lint for image-update checks opt-out

Scheduler tests need isChecksEnabled on the ImageUpdateService mock, and the UpdatesSection older-node fixture must not leave an unused binding.

* fix: gate update-preview and recheck when detection is off

Anatomy was still calling stack update-preview (and contacting registries)
while checks were disabled. Short-circuit those routes and skip recheckStack
writes so disabled nodes stay quiet until detection is re-enabled.
This commit is contained in:
Anso
2026-07-28 10:10:04 -04:00
committed by GitHub
parent e175db8e62
commit fa503ddf27
23 changed files with 722 additions and 80 deletions
+9
View File
@@ -2022,6 +2022,9 @@ export class DatabaseService {
stmt.run('image_update_check_mode', 'interval');
stmt.run('image_update_check_cron', '');
stmt.run('image_update_sidebar_indicators', '1');
// Opt-out for background registry polling. Default on so upgrades keep
// current behavior; missing key is also treated as enabled at read time.
stmt.run('image_update_checks_enabled', '1');
stmt.run('notification_dispatch_retries', '0');
stmt.run('env_block_deploy_on_missing_required', '0');
stmt.run('auto_create_missing_external_networks', '0');
@@ -5005,6 +5008,12 @@ export class DatabaseService {
return result.changes;
}
/** Deletes every update row for a node. Returns deleted row count. */
public clearAllStackUpdateStatus(nodeId: number): number {
const result = this.db.prepare('DELETE FROM stack_update_status WHERE node_id = ?').run(nodeId);
return result.changes;
}
// --- Stack Scan Attempts ---
//
// Tracks the latest post-deploy scan attempt per (nodeId, stackName) so