From d614e1cd9a35d3289dbf8e8164a4b4c1283d11b3 Mon Sep 17 00:00:00 2001 From: Praveen Ranjan Keshri Date: Fri, 10 Dec 2021 22:53:31 +0530 Subject: [PATCH] Updates post review by @Rugvip: 1. Updated reloadIntervalSeconds example to 10 minutes 2. Updated config load error message 3. Fixed vocab error Signed-off-by: Praveen Ranjan Keshri --- .changeset/brave-impalas-switch.md | 4 ++-- packages/config-loader/src/loader.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/brave-impalas-switch.md b/.changeset/brave-impalas-switch.md index de7e2ee528..729a4ec96a 100644 --- a/.changeset/brave-impalas-switch.md +++ b/.changeset/brave-impalas-switch.md @@ -4,7 +4,7 @@ Fixed bug in backend-common to allow passing of remote option in order to enable passing remote url in --config option. The remote option should be passed along with reloadIntervalSeconds from packages/backend/src/index.ts (Updated the file as well) -These changes are needed in `packages/backend/src/index.ts` if remote urls are desired to be passed in --config option and read and watch remote files for config. +These changes are needed in `packages/backend/src/index.ts` if remote URLs are desired to be passed in --config option and read and watch remote files for config. ```diff @@ -86,7 +86,11 @@ async function main() { @@ -12,7 +12,7 @@ These changes are needed in `packages/backend/src/index.ts` if remote urls are d argv: process.argv, logger, + remote: { -+ reloadIntervalSeconds: 60 * 60 * 12 // Check remote config changes every 12 hours. Change to your desired interval in seconds ++ reloadIntervalSeconds: 60 * 10 // Check remote config changes every 10 minutes. Change to your desired interval in seconds + } }); + diff --git a/packages/config-loader/src/loader.ts b/packages/config-loader/src/loader.ts index e7aa3d4c10..d19cd691be 100644 --- a/packages/config-loader/src/loader.ts +++ b/packages/config-loader/src/loader.ts @@ -129,7 +129,7 @@ export async function loadConfig( if (remote === undefined) { if (configUrls.length > 0) { throw new Error( - `Please make sure you are passing the remote option when loading the configuration. See https://backstage.io/docs/conf/writing#configuration-files for detailed info.`, + `Please make sure you are passing the remote option when loading remote configurations. See https://backstage.io/docs/conf/writing#configuration-files for detailed info.`, ); } } else if (remote.reloadIntervalSeconds <= 0) {