Skip to content

Commit

Permalink
chore: Remove flakiness dashboard
Browse files Browse the repository at this point in the history
We're not using it at all so might as well cut down on code in the
codebase.
  • Loading branch information
jackfranklin committed Apr 6, 2020
1 parent 4ee2c43 commit a71c27d
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 312 deletions.
4 changes: 0 additions & 4 deletions .appveyor.yml
@@ -1,14 +1,10 @@
environment:
matrix:
- nodejs_version: "10.18.1"
FLAKINESS_DASHBOARD_NAME: Appveyor Chromium (Win + node10)
FLAKINESS_DASHBOARD_PASSWORD:
secure: g66jP+j6C+hkXLutBV9fdxB5fRJgcQQzy93SgQzXUmcCl/RjkJwnzyHvX0xfCVnv

build: off

install:
- ps: $env:FLAKINESS_DASHBOARD_BUILD_URL="https://ci.appveyor.com/project/aslushnikov/puppeteer/builds/$env:APPVEYOR_BUILD_ID/job/$env:APPVEYOR_JOB_ID"
- ps: Install-Product node $env:nodejs_version
- npm install
- if "%nodejs_version%" == "10.18.1" (
Expand Down
3 changes: 0 additions & 3 deletions .cirrus.yml
@@ -1,8 +1,5 @@
env:
DISPLAY: :99.0
FLAKINESS_DASHBOARD_PASSWORD: ENCRYPTED[b3e207db5d153b543f219d3c3b9123d8321834b783b9e45ac7d380e026ab3a56398bde51b521ac5859e7e45cb95d0992]
FLAKINESS_DASHBOARD_NAME: Cirrus ${CIRRUS_TASK_NAME}
FLAKINESS_DASHBOARD_BUILD_URL: https://cirrus-ci.com/task/${CIRRUS_TASK_ID}

task:
matrix:
Expand Down
6 changes: 0 additions & 6 deletions .travis.yml
Expand Up @@ -31,16 +31,10 @@ jobs:
- node_js: "12.16.1"
env:
- CHROMIUM=true
- FLAKINESS_DASHBOARD_NAME="Travis Chromium (node12 + linux)"
- FLAKINESS_DASHBOARD_BUILD_URL="${TRAVIS_JOB_WEB_URL}"
- node_js: "10.18.1"
env:
- CHROMIUM=true
- FLAKINESS_DASHBOARD_NAME="Travis Chromium (node10 + linux)"
- FLAKINESS_DASHBOARD_BUILD_URL="${TRAVIS_JOB_WEB_URL}"
- node_js: "10.18.1"
env:
- FIREFOX=true
- FLAKINESS_DASHBOARD_NAME="Travis Firefox Nightly (node10 + linux)"
- FLAKINESS_DASHBOARD_BUILD_URL="${TRAVIS_JOB_WEB_URL}"
- FIREFOX_HOME=$TRAVIS_HOME/firefox-latest
1 change: 0 additions & 1 deletion test/test.js
Expand Up @@ -116,7 +116,6 @@ new Reporter(testRunner, {
});

(async() => {
await utils.initializeFlakinessDashboardIfNeeded(testRunner);
testRunner.run();
})();

77 changes: 0 additions & 77 deletions test/utils.js
Expand Up @@ -18,7 +18,6 @@ const fs = require('fs');
const path = require('path');
const expect = require('expect');
const GoldenUtils = require('./golden-utils');
const {FlakinessDashboard} = require('../utils/flakiness-dashboard');
const PROJECT_ROOT = fs.existsSync(path.join(__dirname, '..', 'package.json')) ? path.join(__dirname, '..') : path.join(__dirname, '..', '..');

const COVERAGE_TESTSUITE_NAME = '**API COVERAGE**';
Expand Down Expand Up @@ -177,80 +176,4 @@ const utils = module.exports = {
});
});
},

initializeFlakinessDashboardIfNeeded: async function(testRunner) {
// Generate testIDs for all tests and verify they don't clash.
// This will add |test.testId| for every test.
//
// NOTE: we do this on CI's so that problems arise on PR trybots.
if (process.env.CI)
generateTestIDs(testRunner);
// FLAKINESS_DASHBOARD_PASSWORD is an encrypted/secured variable.
// Encrypted variables get a special treatment in CI's when handling PRs so that
// secrets are not leaked to untrusted code.
// - AppVeyor DOES NOT decrypt secured variables for PRs
// - Travis DOES NOT decrypt encrypted variables for PRs
// - Cirrus CI DOES NOT decrypt encrypted variables for PRs *unless* PR is sent
// from someone who has WRITE ACCESS to the repo.
//
// Since we don't want to run flakiness dashboard for PRs on all CIs, we
// check existence of FLAKINESS_DASHBOARD_PASSWORD and absense of
// CIRRUS_BASE_SHA env variables.
if (!process.env.FLAKINESS_DASHBOARD_PASSWORD || process.env.CIRRUS_BASE_SHA)
return;
const {sha, timestamp} = await FlakinessDashboard.getCommitDetails(__dirname, 'HEAD');
const dashboard = new FlakinessDashboard({
commit: {
sha,
timestamp,
url: `https://github.com/puppeteer/puppeteer/commit/${sha}`,
},
build: {
url: process.env.FLAKINESS_DASHBOARD_BUILD_URL,
},
dashboardRepo: {
url: 'https://github.com/aslushnikov/puppeteer-flakiness-dashboard.git',
username: 'puppeteer-flakiness',
email: 'aslushnikov+puppeteerflakiness@gmail.com',
password: process.env.FLAKINESS_DASHBOARD_PASSWORD,
branch: process.env.FLAKINESS_DASHBOARD_NAME,
},
});

testRunner.on('testfinished', test => {
// Do not report tests from COVERAGE testsuite.
// They don't bring much value to us.
if (test.fullName.includes(COVERAGE_TESTSUITE_NAME))
return;
const testpath = test.location.filePath.substring(utils.projectRoot().length);
const url = `https://github.com/puppeteer/puppeteer/blob/${sha}/${testpath}#L${test.location.lineNumber}`;
dashboard.reportTestResult({
testId: test.testId,
name: test.location.fileName + ':' + test.location.lineNumber,
description: test.fullName,
url,
result: test.result,
});
});
testRunner.on('finished', async({result}) => {
dashboard.setBuildResult(result);
await dashboard.uploadAndCleanup();
});

function generateTestIDs(testRunner) {
const testIds = new Map();
for (const test of testRunner.tests()) {
const testIdComponents = [test.name];
for (let suite = test.suite; !!suite.parentSuite; suite = suite.parentSuite)
testIdComponents.push(suite.name);
testIdComponents.reverse();
const testId = testIdComponents.join('>');
const clashingTest = testIds.get(testId);
if (clashingTest)
throw new Error(`Two tests with clashing IDs: ${test.location.fileName}:${test.location.lineNumber} and ${clashingTest.location.fileName}:${clashingTest.location.lineNumber}`);
testIds.set(testId, test);
test.testId = testId;
}
}
},
};
218 changes: 0 additions & 218 deletions utils/flakiness-dashboard/FlakinessDashboard.js

This file was deleted.

3 changes: 0 additions & 3 deletions utils/flakiness-dashboard/index.js

This file was deleted.

0 comments on commit a71c27d

Please sign in to comment.