From 04d62e072bce5cf678c55ec2312fef1f0e5b7b58 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 30 May 2026 16:43:10 +0200 Subject: [PATCH] Fix schema minimum for refresh and fetch intervals The schema annotated refreshInterval and fetchInterval with minimum=0, but the background routines reject a value of 0 (they require interval > 0 and otherwise log it as invalid and disable the feature). So 0 is not actually a valid value; switch to exclusiveMinimum=0 so the schema matches what the code accepts. --- pkg/config/user_config.go | 4 ++-- schema-master/config.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index d1f760ed1..0f0b4792f 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -44,10 +44,10 @@ type UserConfig struct { type RefresherConfig struct { // File/submodule refresh interval in seconds. // Auto-refresh can be disabled via option 'git.autoRefresh'. - RefreshInterval int `yaml:"refreshInterval" jsonschema:"minimum=0"` + RefreshInterval int `yaml:"refreshInterval" jsonschema:"exclusiveMinimum=0"` // Re-fetch interval in seconds. // Auto-fetch can be disabled via option 'git.autoFetch'. - FetchInterval int `yaml:"fetchInterval" jsonschema:"minimum=0"` + FetchInterval int `yaml:"fetchInterval" jsonschema:"exclusiveMinimum=0"` } func (c *RefresherConfig) RefreshIntervalDuration() time.Duration { diff --git a/schema-master/config.json b/schema-master/config.json index b95c5c980..ff50ab185 100644 --- a/schema-master/config.json +++ b/schema-master/config.json @@ -3539,13 +3539,13 @@ "properties": { "refreshInterval": { "type": "integer", - "minimum": 0, + "exclusiveMinimum": 0, "description": "File/submodule refresh interval in seconds.\nAuto-refresh can be disabled via option 'git.autoRefresh'.", "default": 10 }, "fetchInterval": { "type": "integer", - "minimum": 0, + "exclusiveMinimum": 0, "description": "Re-fetch interval in seconds.\nAuto-fetch can be disabled via option 'git.autoFetch'.", "default": 60 }