Description
When Jenkins reports a pending node-test-pull-request, node-test-commit-v8-linux or node-test-pull-request-lite-pipeline build, pushStarted() in lib/push-jenkins-update.js posts a "CI: " comment on the PR. It calls createPrComment() without awaiting the promise or attaching a .catch():
case 'node-test-pull-request':
createPrComment(Object.assign({ issue_number: pr }, options), `CI: ${build.url}`)
breakcreatePrComment() logs the error and then rethrows it. So when the GitHub API rejects the comment (5xx, rate limit, a locked PR, a timeout, and so on), the promise rejection goes unhandled. server.js treats unhandledRejection as fatal and calls process.exit(1). One failed CI-link comment therefore kills the bot, including any status updates and other webhook work still in progress.
Steps to reproduce: call pushStarted() with a pending node-test-pull-request build while POST /repos/nodejs/node/issues/12345/comments returns 500. The Node.js test runner reports the test as failing with failureType: 'unhandledRejection'. In production, the process exits.
Expected: the comment is best effort. The error gets logged once (createPrComment() already does that) and the bot keeps running.
Activity