From 6bec8a0bd40efe76ff63d9b9731ae66305c5c54b Mon Sep 17 00:00:00 2001 From: Nicolas Thouvenin Date: Fri, 13 Sep 2024 13:45:16 +0200 Subject: [PATCH 1/2] add console.warn() for all workers process --- src/api/services/enrichment/enrichment.js | 2 ++ src/api/services/precomputed/precomputed.js | 1 + src/api/workers/import.js | 2 ++ src/api/workers/publisher.js | 2 ++ 4 files changed, 7 insertions(+) diff --git a/src/api/services/enrichment/enrichment.js b/src/api/services/enrichment/enrichment.js index 083304aaf..cb788a662 100644 --- a/src/api/services/enrichment/enrichment.js +++ b/src/api/services/enrichment/enrichment.js @@ -400,6 +400,8 @@ export const setEnrichmentError = async (ctx, err) => { }); jobLogger.info(ctx.job, logData); notifyListeners(room, logData); + // very useful for identifying the origin of production errors. + console.warn('handleEnrichmentError', err); notifyListeners(`${ctx.tenant}-enricher`, { isEnriching: false, success: false, diff --git a/src/api/services/precomputed/precomputed.js b/src/api/services/precomputed/precomputed.js index c82137e4d..08e7779b6 100644 --- a/src/api/services/precomputed/precomputed.js +++ b/src/api/services/precomputed/precomputed.js @@ -531,6 +531,7 @@ export const setPrecomputedError = async (ctx, err) => { progress.finish(ctx.tenant); jobLogger.info(ctx.job, logData); notifyListeners(room, logData); + console.warn('handlePrecomputedError', err); notifyListeners(`${ctx.tenant}-precomputer`, { isPrecomputing: false, success: false, diff --git a/src/api/workers/import.js b/src/api/workers/import.js index c4ae2c8b6..65bd3238d 100644 --- a/src/api/workers/import.js +++ b/src/api/workers/import.js @@ -58,6 +58,8 @@ const handleImportError = async (job, err) => { if (err instanceof CancelWorkerError) { await ctx.dataset.drop(); } + // very useful for identifying the origin of production errors. + console.warn('handleImportError', err); notifyListeners(`${job.data.tenant}-import`, { isImporting: false, success: false, diff --git a/src/api/workers/publisher.js b/src/api/workers/publisher.js index 6da85eb42..9392a166f 100644 --- a/src/api/workers/publisher.js +++ b/src/api/workers/publisher.js @@ -39,6 +39,8 @@ const startPublishing = async (job) => { const handlePublishError = async (job, error) => { const ctx = await prepareContext({ job }); await clearPublished(ctx); + // very useful for identifying the origin of production errors. + console.warn('handlePublisherError', error); notifyListeners(`${job.data.tenant}-publisher`, { isPublishing: false, success: false, From 0046511e3deddc0df5473b993f01c064e4e706c2 Mon Sep 17 00:00:00 2001 From: Nicolas Thouvenin Date: Fri, 13 Sep 2024 13:58:30 +0200 Subject: [PATCH 2/2] upload-artifact@v2 is deprecated --- .github/workflows/lodex-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lodex-ci.yml b/.github/workflows/lodex-ci.yml index 8a018b384..c515c9393 100644 --- a/.github/workflows/lodex-ci.yml +++ b/.github/workflows/lodex-ci.yml @@ -114,7 +114,7 @@ jobs: # Upload debug screenshots on failure - name: Upload screenshots - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: cypress-screenshots