-
Notifications
You must be signed in to change notification settings - Fork 370
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
[JENKINS-71849] Allow NoThrottle
to be used even on github.com
#653
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of this change; context in https://issues.jenkins.io/browse/JENKINS-71849
I doubt I understand the implications of this change. If you think you do, do you want to become a plugin maintainer? |
I'll consider it. Currently in the process of moving (to Apex). Once that settles I can take a deeper look. I've also wanted to get GraphQL integrated here and was considering a PR for that. |
I plan to roll this out to our staging environment and run this PR in production as part of additional testing (at scale). Stats for at-scale environment (single Jenkins controller)
|
I've deployed this patch to the version we're using in prod |
We're now seeing logs like:
But it shouldn't cause a problem. I reviewed the source code and it falls back to the global nothrottle configuration. I also notice #654 might fix these messages as well. I'll do a thread dump when I get the chance to verify the thread stack traces, with the thread IDs, and with the lines of code to be sure. I might consider bundling this other PR into our private fork as another hotfix but I'm going to let the current hotfix run to see how performance has changed. It doesn't appear to be an actual error, though. It does indeed fall back to the global checker which is what we want (no throttling). |
I also don't see how it would be possible for an individual thread to have a different rate limit checker than what the admin configured. Unless this is intended for plugins to implement directly to be "nice". |
This has conflicts; when you get a chance can you resolve the conflicts? |
Tried to resolve conflicts with #684 the smart way and completely failed. Falling back to doing it by hand. |
What I ended up doing is checking out the files from master and manually applying the patch copying snippets from the diff. I guess I could have opened a PR to your branch; I'll do that next time |
I eventually figured out #684 (comment) |
This has been running in prod for almost a week and builds appear to be serviced fine. |
NoThrottle
to be used even on github.comNoThrottle
to be used even on github.com
@jglick @samrocketman As I remember hearing, rate limit checking was originally added to this plugin because github.com decided that Jenkins clients (globally, beyond just the current user or Jenkins instance) were "abusive" and would be heavily penalized by GitHub.com. The GitHub REST API best practices make that story plausible:
The way GitHub identifies "an integration" is via user agent which is the same for all Jenkins instances using this plugin. Strongly suggest you revert this PR as the potential consequences are catastrophic. |
Will leave it to someone more knowledgeable to decide what to do, since I do not know the history and specifically whether the original problems with rate limits applied to a different category of account, or to PATs vs. Apps. |
We should probably revert this revert then? |
I think this comment is telling. @bitwiseman sorry I should have pinged you first for your input before I gave my okay. I believe you are correct in saying that the bug is that |
…com (jenkinsci#653)" This reverts commit 51d5810.
you mean |
@jtnord you're right, ThrottleOnOver 🤦 |
@car-roll |
Reverted in #730 FTR |
That's fair I'll raise this with GitHub support and get their opinion. In the mean time, unfortunately, we're going to have to maintain a fork of this plugin with this patch included for our production instance. The rate limiting bugs cause extreme user disruption. Somehow, the plugin forgets that it throttled a build and some builds will hang indefinitely in a waiting to run state. This patch resolved that issue for us. I still think by banning the integration GotHub is referring to the specific app (GitHub app) and not the useragent. It doesn't make sense to adversely affect non-abusers with abusers so I question the line of thinking that there will be dire consequences. Either way, I'll raise this with GitHub support and get their opinion. They did raise our limits upon request. We have Jenkins integrated with over 1000 repositories. This plugin should rely on a GraphQL client ideally. At some point, I plan to develop it; hopefully before we reach a scale that it becomes necessary. I'll get back with any findings. |
@jglick @bitwiseman looks like NoThrottle shouldn't be used but not for the reasons I'd expect. ReasoningGitHub App credential type should not ever hit SleuthingSee these lines of code; if NoThrottle check credential validity against github-branch-source-plugin/src/main/java/org/jenkinsci/plugins/github_branch_source/Connector.java Lines 553 to 565 in 7bec287
GitHub App credential checks its validity against the
However, GitHub documentation for The
Related lines of code:
When using NoThrottle I saw exceptions of two types (our GH App has 25000 req/hr limit):
The code checking for credential validity runs A LOT. So should always check validity against ThrottleOnOverI've switched back to ThrottleOnOver and I will continue debugging further. Any findings I have which I think can help other JENKINS Jira issues get resolved I will post directly in those Jira issues. In my case, we have a sufficiently large usage footprint that I think I can help the community squash some GHBS bugs. I already squashed a bug in my own plugin from this debugging jenkinsci/scm-filter-jervis-plugin#20 |
…kinsci#653) * [JENKINS-68321] Allow `NoThrottle` to be used even on github.com * Ignoring failing tests
…com (jenkinsci#653)" (jenkinsci#730) This reverts commit 51d5810.
While debugging NoThrottle I found this bug hub4j/github-api#1728 |
note @sgleske-ias is my proprietary GitHub account; so you know it is the same person |
Effectively reverts 7b39521 from #313. Whether this is actually safe to do (presuming you are a responsible adult and are using App authentication), and whether it in fact resolves JENKINS-68321 without introducing worse problems, I am unsure—use at your own risk.