From 42db6a6a80be3800cf170b2d610c1c7a1c1c641e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rio=20Val=C3=A9rio?= Date: Sun, 9 Nov 2025 14:43:59 +0200 Subject: [PATCH] Don't warn when parsing storeOptions for 'memory' cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, a fresh Backstage installation prints the following warning at app startup: "backstage warn No configuration found for cache store 'memory' at 'backend.cache.memory'. type="cacheManager"" The 'memory' cache store does not have any extra config, like 'redis' or 'infinispan'. Warning about missing configuration can cause confusion to the users. See config here: https://github.com/backstage/backstage/blob/master/packages/backend-defaults/config.d.ts#L623 This warning was introduced here: https://github.com/backstage/backstage/pull/30743/files#diff-42975462070406316e4534ce0579d1d12d54fc5cd62e239d1ae676c1e290b473R137 Signed-off-by: Valério Valério --- .changeset/short-cloths-tie.md | 5 +++++ .../backend-defaults/src/entrypoints/cache/CacheManager.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/short-cloths-tie.md diff --git a/.changeset/short-cloths-tie.md b/.changeset/short-cloths-tie.md new file mode 100644 index 0000000000..90b84af830 --- /dev/null +++ b/.changeset/short-cloths-tie.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-defaults': minor +--- + +Don't warn when parsing storeOptions for 'memory' cache diff --git a/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts b/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts index 06b2b0c57b..428a4b7592 100644 --- a/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts +++ b/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts @@ -134,7 +134,7 @@ export class CacheManager { ): CacheStoreOptions | undefined { const storeConfigPath = `backend.cache.${store}`; - if (!config.has(storeConfigPath)) { + if (store !== 'memory' && !config.has(storeConfigPath)) { logger?.warn( `No configuration found for cache store '${store}' at '${storeConfigPath}'.`, );