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

This commit is contained in:
Andrey Lushnikov 2022-03-01 02:21:00 -07:00 committed by GitHub
parent 5efd7fb356
commit 4a1878e00e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -2,3 +2,8 @@
This directory contains source code for the Azure function that we use to aggregate test reports. 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 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`

View File

@ -36,6 +36,7 @@ function compressReports(reports) {
const projectNameToMetadata = new Map(); const projectNameToMetadata = new Map();
if (report.config && report.config.projects) { if (report.config && report.config.projects) {
for (const project of report.config.projects) { for (const project of report.config.projects) {
project.metadata = project.metadata || {};
if (project.metadata.headful === false) if (project.metadata.headful === false)
delete project.metadata.headful; delete project.metadata.headful;
if (project.metadata.mode === 'default') if (project.metadata.mode === 'default')