Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: fix flakiness dashboard for projects with no metadata (#12426)

Andrey Lushnikov4a1878e00efe
diff --git a/utils/flakiness-dashboard/README.md b/utils/flakiness-dashboard/README.md
index 5a8671e1c6..43cbd7d4ac 100644
--- a/utils/flakiness-dashboard/README.md
+++ b/utils/flakiness-dashboard/README.md
@@ -2,3 +2,8 @@
This directory contains source code for the Azure function that we use to aggregate test reports.
The data is consumed by https://devops.aslushnikov.com/flakiness2.html
+
+To publish function:
+- install [Azure Functions Core Tools version 3.x.](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Cmacos%2Ccsharp%2Cportal%2Cbash#v2).
+- install Azure CLI && login via `az login`
+- run `func azure functionapp publish folio-flakiness-dashboard --javascript`
diff --git a/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js b/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js
index 1973091a82..b098768ea9 100644
--- a/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js
+++ b/utils/flakiness-dashboard/processing/dashboard_compressed_v1.js
@@ -36,6 +36,7 @@ function compressReports(reports) {
const projectNameToMetadata = new Map();
if (report.config && report.config.projects) {
for (const project of report.config.projects) {
+ project.metadata = project.metadata || {};
if (project.metadata.headful === false)
delete project.metadata.headful;
if (project.metadata.mode === 'default')