From 3f180927b478ceb4a49d36f4a0ed8fb1c0aefe47 Mon Sep 17 00:00:00 2001 From: endigma Date: Tue, 26 Aug 2025 10:19:54 +0100 Subject: [PATCH 1/3] fix: don't log errors when execution config watcher shuts down gracefully --- router/cmd/main.go | 6 +++--- router/core/router.go | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/router/cmd/main.go b/router/cmd/main.go index 577696cd7d..547b80bb4a 100644 --- a/router/cmd/main.go +++ b/router/cmd/main.go @@ -183,7 +183,7 @@ func Main() { ) } - watchFunc, err := watcher.New(watcher.Options{ + w, err := watcher.New(watcher.Options{ Interval: result.Config.WatchConfig.Interval, Logger: ll, Paths: *configPathFlag, @@ -203,9 +203,9 @@ func Main() { // different instances of the router time.Sleep(startupDelay) - if err := watchFunc(rootCtx); err != nil { + if err := w(rootCtx); err != nil { if !errors.Is(err, context.Canceled) { - ll.Error("Error watching execution config", zap.Error(err)) + ll.Error("Error watching router config", zap.Error(err)) } else { ll.Debug("Watcher context cancelled, shutting down") } diff --git a/router/core/router.go b/router/core/router.go index 9da0049560..7a5c3f6102 100644 --- a/router/core/router.go +++ b/router/core/router.go @@ -1201,8 +1201,11 @@ func (r *Router) Start(ctx context.Context) error { go func() { if err := w(ctx); err != nil { - r.logger.Error("Error watching execution config", zap.Error(err)) - return + if !errors.Is(err, context.Canceled) { + ll.Error("Error watching execution config", zap.Error(err)) + } else { + ll.Debug("Watcher context cancelled, shutting down") + } } }() From 2159a715bc001c159b42840082379925706be086 Mon Sep 17 00:00:00 2001 From: endigma Date: Tue, 26 Aug 2025 10:20:08 +0100 Subject: [PATCH 2/3] chore: allow using .env for CDN JWT secret --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 86bb931434..f82155e7d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -188,7 +188,7 @@ services: environment: PORT: 11000 NODE_ENV: development - AUTH_JWT_SECRET: fkczyomvdprgvtmvkuhvprxuggkbgwld + AUTH_JWT_SECRET: ${CDN_AUTH_JWT_SECRET:-fkczyomvdprgvtmvkuhvprxuggkbgwld} AUTH_ADMISSION_JWT_SECRET: uXDxJLEvrw4aafPfrf3rRotCoBzRfPEW S3_STORAGE_URL: ${S3_STORAGE_URL:-http://${MINIO_ROOT_USER:-minio}:${MINIO_ROOT_PASSWORD:-changeme}@minio:9000/cosmo} S3_REGION: ${S3_REGION_CDN:-${S3_REGION:-auto}} From 7b1aec01790e3b40aa83b41e4552d2b802e3b048 Mon Sep 17 00:00:00 2001 From: endigma Date: Tue, 26 Aug 2025 10:20:30 +0100 Subject: [PATCH 3/3] chore: uncomment local execution config for debug JSON --- router/debug.config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/router/debug.config.yaml b/router/debug.config.yaml index 3aca6ec4da..6aa036f9b0 100644 --- a/router/debug.config.yaml +++ b/router/debug.config.yaml @@ -5,9 +5,10 @@ version: '1' -# execution_config: -# file: -# path: './__schemas/config.json' +execution_config: + file: + path: './__schemas/config.json' + watch: true log_level: debug