Skip to content

Commit

Permalink
Fix check-downgrading promise error handling (#19069)
Browse files Browse the repository at this point in the history
* Add catch to main function
* Update condition count base on tasks for downgrading check
  • Loading branch information
ivanduplenskikh authored Dec 7, 2023
1 parent 5bdfc46 commit 99b6c67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/build-all-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ steps:
condition: |
and(
succeeded(),
ne(variables['numTasks'], 0),
ne(variables['numTasksForDowngradingCheck'], 0),
ne(variables['COURTESY_PUSH'], 'true'),
eq(variables['build.reason'], 'PullRequest'),
eq(variables['System.PullRequest.TargetBranch'], 'master')
Expand Down
6 changes: 5 additions & 1 deletion ci/check-downgrading.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,8 @@ async function main({ task, sprint, week }) {
}
}

main(argv);
main(argv)
.catch(error => {
console.error(error);
process.exit(1);
});
1 change: 1 addition & 0 deletions ci/filter-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ var setTaskVariables = function(tasks, tasksForDowngradingCheck) {
console.log('##vso[task.setVariable variable=task_pattern;isOutput=true;]@(' + tasks.join('|') + ')');
console.log('##vso[task.setVariable variable=task_pattern_fordowngradingcheck]@(' + tasksForDowngradingCheck.join('|') + ')');
console.log('##vso[task.setVariable variable=numTasks]' + tasks.length);
console.log('##vso[task.setVariable variable=numTasksForDowngradingCheck]' + tasksForDowngradingCheck.length);
}

var buildReason = process.env['BUILD_REASON'].toLowerCase();
Expand Down

0 comments on commit 99b6c67

Please sign in to comment.