Skip to content

Commit ec25a93

Browse files
committed
'run-analysis' script should schedule retries for A/B tests even after chart analysis failure.
https://bugs.webkit.org/show_bug.cgi?id=219116 Reviewed by Ryosuke Niwa. Anlyzing charts and schedule retries for A/B tests on run-analysis script are independent task. It should not skip scheduling retries even when chart analysis part fails. * tools/run-analysis.js: (async analysisLoop): Change the logic so that chart analysis failure will not stop scheduling retries. Fix a typo for 'notificationRemoteAPI'. Canonical link: https://commits.webkit.org/231849@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 8944cd8 commit ec25a93

2 files changed

Lines changed: 26 additions & 8 deletions

File tree

Websites/perf.webkit.org/ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2020-11-20 Dewei Zhu <dewei_zhu@apple.com>
2+
3+
'run-analysis' script should schedule retries for A/B tests even after chart analysis failure.
4+
https://bugs.webkit.org/show_bug.cgi?id=219116
5+
6+
Reviewed by Ryosuke Niwa.
7+
8+
Anlyzing charts and schedule retries for A/B tests on run-analysis script are independent task.
9+
It should not skip scheduling retries even when chart analysis part fails.
10+
11+
* tools/run-analysis.js:
12+
(async analysisLoop): Change the logic so that chart analysis failure will not stop scheduling retries.
13+
Fix a typo for 'notificationRemoteAPI'.
14+
115
2020-11-18 Dewei Zhu <dewei_zhu@apple.com>
216

317
Fix a bug that platform groups cannot be updated on 'admin/platform'.

Websites/perf.webkit.org/tools/run-analysis.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ function main(argv)
2828

2929
async function analysisLoop(options)
3030
{
31-
let secondsToSleep;
31+
const secondsToSleep = options['--seconds-to-sleep'];
3232
try {
3333
const serverConfig = JSON.parse(fs.readFileSync(options['--server-config-json'], 'utf-8'));
34-
const notificationConfig = JSON.parse(fs.readFileSync(options['--notification-config-json'], 'utf-8'));
3534
const analysisRangeInDays = options['--analysis-range-in-days'];
36-
const maximumRetryFactor = options['--max-retry-factor'];
37-
secondsToSleep = options['--seconds-to-sleep'];
35+
3836
global.RemoteAPI = new RemoteAPI(serverConfig.server);
3937
PrivilegedAPI.configure(serverConfig.slave.name, serverConfig.slave.password);
4038

@@ -47,19 +45,25 @@ async function analysisLoop(options)
4745

4846
console.log(`Start analyzing last ${analysisRangeInDays} days measurement sets.`);
4947
await analyzer.analyzeOnce();
48+
} catch (error) {
49+
console.error(`Failed to analyze measurement sets due to ${error}`);
50+
}
5051

52+
try {
53+
const notificationConfig = JSON.parse(fs.readFileSync(options['--notification-config-json'], 'utf-8'));
54+
const maximumRetryFactor = options['--max-retry-factor'];
5155
const testGroupsMayNeedMoreRequests = await TestGroup.fetchAllThatMayNeedMoreRequests();
5256
await createAdditionalBuildRequestsForTestGroupsWithFailedRequests(testGroupsMayNeedMoreRequests, maximumRetryFactor);
5357

5458
const testGroupsNeedNotification = await TestGroup.fetchAllWithNotificationReady();
55-
const notificationRemoveAPI = new RemoteAPI(notificationConfig.notificationServerConfig);
59+
const notificationRemoteAPI = new RemoteAPI(notificationConfig.notificationServerConfig);
5660
const notificationMessageConfig = notificationConfig.notificationMessageConfig;
5761
const notifier = new AnalysisResultsNotifier(notificationMessageConfig.messageTemplate, notificationMessageConfig.finalizeScript,
58-
notificationMessageConfig.messageConstructionRules, notificationRemoveAPI, notificationConfig.notificationServerConfig.path, new Subprocess);
62+
notificationMessageConfig.messageConstructionRules, notificationRemoteAPI, notificationConfig.notificationServerConfig.path, new Subprocess);
5963

6064
await notifier.sendNotificationsForTestGroups(testGroupsNeedNotification);
61-
} catch(error) {
62-
console.error(`Failed analyze measurement sets due to ${error}`);
65+
} catch (error) {
66+
console.error(`Failed to retry test groups due to ${error}`);
6367
}
6468

6569
console.log(`Sleeping for ${secondsToSleep} seconds.`);

0 commit comments

Comments
 (0)