Closed Bug 1525270 Opened 6 years ago Closed 6 years ago

[tc-github] flaky tests, unhandled promises

Categories

(Taskcluster :: Services, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1542405

People

(Reporter: dustin, Unassigned)

Details

No description provided.

https://tools.taskcluster.net/groups/MaZOhUlMRAy5WZiuxRbSZg/tasks/VfDUVWKqTFi1zyYbHeTtlg/runs/0/logs/public%2Flogs%2Flive_backing.log

  handlers (mock)
    jobHandler
      ✓ valid push (owner is collaborator) creates a taskGroup
      ✓ valid pull_request (user is collaborator) creates a taskGroup
      ✓ valid push (but not collaborator) creates a taskGroup
      ✓ valid tag push (but not collaborator) creates a taskGroup
      ✓ invalid YAML results in a comment
(node:168) UnhandledPromiseRejectionWarning: #<Object>
(node:168) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)
(node:168) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
      ✓ error creating task is reported correctly
(node:168) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 9)
      ✓ not an org member or collaborator is reported correctly for pull requests
      ✓ specifying allowPullRequests: public in the default branch allows all
      ✓ specifying allowPullRequests: collaborators in the default branch disallows public
      ✓ user name not checked for pushes, so status is created

...

  1) webhook (mock)
       Pull Request Closed:
      AssertionError [ERR_ASSERTION]: 403 == 204
      + expected - actual
      -403
      +204
      
      at Context.<anonymous> (test/webhook_test.js:21:14)
      at process._tickCallback (internal/process/next_tick.js:68:7)
  2) webhook (real)
       Pull Request Closed:
      AssertionError [ERR_ASSERTION]: 403 == 204
      + expected - actual
      -403
      +204
      
      at Context.<anonymous> (test/webhook_test.js:21:14)
      at process._tickCallback (internal/process/next_tick.js:68:7)

I haven't seen "Promise rejection was handled asynchronously" before!

Ah, I think these failures occurred because of a change to https://github.com/taskcluster/taskcluster/blob/master/services/github/test/data/webhooks/webhook.pull_request.close.json which caused the X-Hub-Signature to no longer match. So the errors are to be expected -- but the unhandled rejections suggest something wrong with the async/await handling, and should probably be addressed.

Component: Github → Services
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.