From 2fcee5545c246a59bb5e5812a22edad39f23e347 Mon Sep 17 00:00:00 2001 From: mateuszziolkowski <88323671+mateuszziolkowski@users.noreply.github.com> Date: Thu, 7 May 2026 01:23:15 +0200 Subject: [PATCH] Allow excluding services from global auto update (#1279) * add ignore_polling_services for global auto update * rename ignore_polling_services to auto_update_skip_services and reorganize --- bin/core/src/api/write/stack.rs | 8 +++++++- client/core/rs/src/entities/stack.rs | 12 ++++++++++++ client/core/ts/src/types.ts | 6 ++++++ ui/public/client/types.d.ts | 6 ++++++ ui/src/resources/stack/config/index.tsx | 23 +++++++++++++++++++++++ 5 files changed, 54 insertions(+), 1 deletion(-) diff --git a/bin/core/src/api/write/stack.rs b/bin/core/src/api/write/stack.rs index e16b359a0..ebfa1e628 100644 --- a/bin/core/src/api/write/stack.rs +++ b/bin/core/src/api/write/stack.rs @@ -776,7 +776,13 @@ pub async fn check_stack_for_update_inner( if image.is_empty() || // Images with a hardcoded digest can't have update. - image.contains('@') + image.contains('@') || + // Services explicitly excluded from global auto-update checks. + // Manual checks should still evaluate all services. + (wait_for_auto_update && + stack.config.auto_update_skip_services.contains( + &service.service_name, + )) { service.image_digest = None; continue; diff --git a/client/core/rs/src/entities/stack.rs b/client/core/rs/src/entities/stack.rs index 99867ceae..1b62304bd 100644 --- a/client/core/rs/src/entities/stack.rs +++ b/client/core/rs/src/entities/stack.rs @@ -383,6 +383,17 @@ pub struct StackConfig { #[builder(default)] pub auto_update_all_services: bool, + /// Ignore certain services during Global Auto Update polling. + /// Services listed here are skipped only in the global auto-update flow. + /// Manual checks still include all services. + #[serde(default, deserialize_with = "string_list_deserializer")] + #[partial_attr(serde( + default, + deserialize_with = "option_string_list_deserializer" + ))] + #[builder(default)] + pub auto_update_skip_services: Vec, + /// Whether to run `docker compose down` before `compose up`. #[serde(default)] #[builder(default)] @@ -700,6 +711,7 @@ impl Default for StackConfig { poll_for_updates: Default::default(), auto_update: Default::default(), auto_update_all_services: Default::default(), + auto_update_skip_services: Default::default(), ignore_services: Default::default(), pre_deploy: Default::default(), post_deploy: Default::default(), diff --git a/client/core/ts/src/types.ts b/client/core/ts/src/types.ts index fbf7323b8..d414be242 100644 --- a/client/core/ts/src/types.ts +++ b/client/core/ts/src/types.ts @@ -2473,6 +2473,12 @@ export interface StackConfig { * Komodo will redeploy the whole Stack (all services). */ auto_update_all_services?: boolean; + /** + * Ignore certain services during Global Auto Update polling. + * Services listed here are skipped only in the global auto-update flow. + * Manual checks still include all services. + */ + auto_update_skip_services?: string[]; /** Whether to run `docker compose down` before `compose up`. */ destroy_before_deploy?: boolean; /** Whether to skip secret interpolation into the stack environment variables. */ diff --git a/ui/public/client/types.d.ts b/ui/public/client/types.d.ts index d493f9f45..aa1c42aa3 100644 --- a/ui/public/client/types.d.ts +++ b/ui/public/client/types.d.ts @@ -2617,6 +2617,12 @@ export interface StackConfig { * Komodo will redeploy the whole Stack (all services). */ auto_update_all_services?: boolean; + /** + * Ignore certain services during Global Auto Update polling. + * Services listed here are skipped only in the global auto-update flow. + * Manual checks still include all services. + */ + auto_update_skip_services?: string[]; /** Whether to run `docker compose down` before `compose up`. */ destroy_before_deploy?: boolean; /** Whether to skip secret interpolation into the stack environment variables. */ diff --git a/ui/src/resources/stack/config/index.tsx b/ui/src/resources/stack/config/index.tsx index 163230f46..7fea931ed 100644 --- a/ui/src/resources/stack/config/index.tsx +++ b/ui/src/resources/stack/config/index.tsx @@ -101,6 +101,8 @@ export default function StackConfig({ const disabled = global_disabled || !canWrite; const runBuild = update.run_build ?? config.run_build; + const poll_for_updates = update.poll_for_updates ?? config.poll_for_updates; + const mode = getStackMode(update, config); const gitProvider = update.git_provider ?? config.git_provider; @@ -395,6 +397,27 @@ export default function StackConfig({ /> ); }, + auto_update_skip_services: (values, set) => + poll_for_updates && ( + + } + placeholder={values?.length ? "Add services" : "Select services"} + value={values} + data={allServices} + onChange={(auto_update_skip_services) => + set({ auto_update_skip_services }) + } + disabled={disabled} + w="fit-content" + searchable + clearable + /> + + ), auto_update: { description: "Trigger a redeploy if a newer image is found.", },