From ba9abae536f5f26a5c132cef9131c36d31350e33 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 2 Feb 2023 13:15:58 +0000 Subject: [PATCH] fix: report if new digest could not be determined This fixes the issue where updates are silently omitted due to the new digest not being computable. Improving the situation as in: #20160. --- lib/workers/repository/process/lookup/index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts index 9e55551e009231..5e9e4fad1e8564 100644 --- a/lib/workers/repository/process/lookup/index.ts +++ b/lib/workers/repository/process/lookup/index.ts @@ -384,6 +384,19 @@ export async function lookupUpdates( // TODO #7154 update.newDigest = update.newDigest ?? (await getDigest(config, update.newValue))!; + + // If the digest could not be determined, report this as otherwise the + // update will be omitted later on without notice. + if (update.newDigest === null) { + logger.debug( + { depName, ...update }, + 'Could not determine new digest for update.' + ); + res.warnings.push({ + message: `Could not determine new digest for update (${update.newValue}).`, + topic: depName, + }); + } } if (update.newVersion) { const registryUrl = dependency?.releases?.find(