Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lite-CI comments not posted #246

Closed
richardlau opened this issue Oct 11, 2019 · 6 comments
Closed

Lite-CI comments not posted #246

richardlau opened this issue Oct 11, 2019 · 6 comments

Comments

@richardlau
Copy link
Member

Refs: nodejs/node#29917 (comment)

on behalf of @Trott:

It seems like the bot doesn't post the lite CIs automatically anymore for some time. It only posts the full CI runs.

@phillipj
Copy link
Member

Sorry for the late response. Please let me know when you notice this again, and I'll do my best to dive into the bot logs quicker to see if there's any traces to that specific PR.

The only thing I found now was this:

02:48:11.721 FATAL bot: Unchaught exception, terminating bot process immediately
    TypeError: Cannot read property 'data' of undefined
        at githubClient.pullRequests.getCommits (/.../github-bot/lib/push-jenkins-update.js:92:29)
        at module.exports.sendError (/.../github-bot/node_modules/github/lib/index.js:874:7)
        at /.../github-bot/node_modules/github/lib/index.js:882:21
        at callCallback (/.../github-bot/node_modules/github/lib/index.js:738:9)
        at IncomingMessage.<anonymous> (/.../github-bot/node_modules/github/lib/index.js:807:13)
        at IncomingMessage.emit (events.js:194:15)
        at endReadableNT (_stream_readable.js:1125:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)

Although that looks related since it is trying to push a Jenkins status to GitHub, my first gut feeling leans towards https://github.com/nodejs/github-bot/issues/245 because that might make the bot try to find commits related to a PR that does not exist in the node repo. I'll ensure we don't get that error anymore, and see if we get more sensible errors logged in those scenarios, instead of crashing the process.

phillipj added a commit that referenced this issue Oct 17, 2019
While having a look at recent error logs, this fatal log stood out:

```
02:48:11.721 FATAL bot: Unchaught exception, terminating bot process immediately
    TypeError: Cannot read property 'data' of undefined
        at githubClient.pullRequests.getCommits (/.../github-bot/lib/push-jenkins-update.js:92:29)
        at module.exports.sendError (/.../github-bot/node_modules/github/lib/index.js:874:7)
        at /.../github-bot/node_modules/github/lib/index.js:882:21
        at callCallback (/.../github-bot/node_modules/github/lib/index.js:738:9)
        at IncomingMessage.<anonymous> (/.../github-bot/node_modules/github/lib/index.js:807:13)
        at IncomingMessage.emit (events.js:194:15)
        at endReadableNT (_stream_readable.js:1125:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)
```

Since we never want these kinds of errors to happen since they
end up killing the bot process, this fix is pushed to ensure we
don't naively read the response from github.com until we know the
request didn't fail for some reason.

Refs #246
@sam-github
Copy link

@phillipj should be easy to test, open a PR against node, trigger a lite ci. People might not notice failure, and if they do, might not know (or bother) to find this issue and comment.

@richardlau
Copy link
Member Author

@phillipj
Copy link
Member

Thanks!

The only thing that got logged was related to the linter job:

20:28:16.748Z  INFO bot: Jenkins / Github PR status updated (req_id=a5d07070-f11c-11e9-80b2-49db74176402, pr=30007, job=linter, gitRef=refs/pull/30007/head, status=pending)

Any easy way to know if anything has changed with the Lite-CI job lately, that could result in Jenkins not telling the github-bot about those jobs at all?

phillipj added a commit that referenced this issue Oct 17, 2019
While having a look at recent error logs, this fatal log stood out:

```
02:48:11.721 FATAL bot: Unchaught exception, terminating bot process immediately
    TypeError: Cannot read property 'data' of undefined
        at githubClient.pullRequests.getCommits (/.../github-bot/lib/push-jenkins-update.js:92:29)
        at module.exports.sendError (/.../github-bot/node_modules/github/lib/index.js:874:7)
        at /.../github-bot/node_modules/github/lib/index.js:882:21
        at callCallback (/.../github-bot/node_modules/github/lib/index.js:738:9)
        at IncomingMessage.<anonymous> (/.../github-bot/node_modules/github/lib/index.js:807:13)
        at IncomingMessage.emit (events.js:194:15)
        at endReadableNT (_stream_readable.js:1125:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)
```

Since we never want these kinds of errors to happen since they
end up killing the bot process, this fix is pushed to ensure we
don't naively read the response from github.com until we know the
request didn't fail for some reason.

Refs #246
@sam-github
Copy link

So, twice today when going to ci.nodejs.org, I've been bounced to a github page saying that jenkins has been doing excessive auth requests, and do I really want to allow it. I just push the yes button, but
I wonder, could this be happening to the API client?

@phillipj
Copy link
Member

Yes, but it should be able to do 5000 requests/hr as described in API docs' rate limiting section which I naively assume should be more than enough.

Currently no new related errors has been logged since the above.

@Trott Trott closed this as completed Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants