From fcbfbe6fa1722854f1b1f1f271f36c2886457903 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 13 Jan 2021 14:15:38 +0300 Subject: [PATCH] devops: fix azure function bugs (#4998) This patch: - starts processing dashboards serially to avoid hitting node.js azure function heap limit - fixes typo in the new `dashboards_raw` processor --- utils/flakiness-dashboard/processing/dashboard_raw.js | 1 - utils/flakiness-dashboard/processing/index.js | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/utils/flakiness-dashboard/processing/dashboard_raw.js b/utils/flakiness-dashboard/processing/dashboard_raw.js index ed892db198..8c20599873 100644 --- a/utils/flakiness-dashboard/processing/dashboard_raw.js +++ b/utils/flakiness-dashboard/processing/dashboard_raw.js @@ -28,7 +28,6 @@ async function processDashboardRaw(context, report) { SHA: ${report.metadata.commitSHA} URL: ${report.metadata.runURL} timestamp: ${report.metadata.commitTimestamp} - added specs: ${addedSpecs} ===== complete in ${Date.now() - timestamp}ms ===== `); } diff --git a/utils/flakiness-dashboard/processing/index.js b/utils/flakiness-dashboard/processing/index.js index 63a346b443..cb5bd161e7 100644 --- a/utils/flakiness-dashboard/processing/index.js +++ b/utils/flakiness-dashboard/processing/index.js @@ -27,10 +27,9 @@ module.exports = async function(context) { const data = await gunzipAsync(context.bindings.newBlob); const report = JSON.parse(data.toString('utf8')); - // Upload report to both dashboards. - await Promise.all([ - processDashboardV1(context, report), - processDashboardV2(context, report), - processDashboardRaw(context, report), - ]); + // Process dashboards one-by-one to limit max heap utilization. + await processDashboardRaw(context, report); + await processDashboardV1(context, report); + // Disable V2 dashboard in favor of raw data. + // await processDashboardV2(context, report); }