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

Rate-Limit: Thread fix, reset date #160

Closed
wants to merge 3 commits into from

Conversation

KostyaSha
Copy link
Contributor

for #159

@buildhive
Copy link

Kohsuke Kawaguchi » github-api #284 SUCCESS
This pull request looks good
(what's this?)

@@ -18,7 +18,7 @@
@Before
public void setUp() throws Exception {
Properties props = new Properties();
java.io.File f = new java.io.File(System.getProperty("user.home"), ".github.kohsuke2");
java.io.File f = new java.io.File(System.getProperty("user.home"), ".github");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub.connect() already looks for ~/.github, so I need to keep the original line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe better cal it .github.test then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general not critical in comparison to thread usage.

@KostyaSha
Copy link
Contributor Author

This issue is blocker for me :(

@KostyaSha
Copy link
Contributor Author

Added two related to rate limit info commits, can move in separate PR if you want.

@buildhive
Copy link

Kohsuke Kawaguchi » github-api #287 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

Kohsuke Kawaguchi » github-api #288 SUCCESS
This pull request looks good
(what's this?)

@KostyaSha KostyaSha changed the title Thread fix Rate-Limit: Thread fix, reset date Mar 8, 2015
@buildhive
Copy link

Kohsuke Kawaguchi » github-api #297 SUCCESS
This pull request looks good
(what's this?)

@KostyaSha
Copy link
Contributor Author

Removed one unrelated commit. Also if some trigger plugin uses this library it can stuck with the next execution time:

ar 16, 2015 6:44:10 PM INFO org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger run
End  GitHub Pull Request trigger check. Summary time: 3,421,366ms

@KostyaSha
Copy link
Contributor Author

Another one bug is that if you have bad password + rate limit 0, then rate_limit page http answer is treated as NotFound and sets rate limit to 10000 (it think that its enterprise).

kohsuke added a commit that referenced this pull request Mar 17, 2015
Strategy pattern is better for API rate limit handling as the current
behavior is quite valid for batch applications.

I'm not taking OkHttp version change so as not to introduce any unneeded
version requirement.
@kohsuke
Copy link
Collaborator

kohsuke commented Mar 17, 2015

I implemented a variant of this in 4093e53 and merged.

@KostyaSha
Copy link
Contributor Author

Could you also add "bad password" throw before looping?

Sent from my iPad

On Mar 17, 2015, at 5:46 PM, Kohsuke Kawaguchi [email protected] wrote:

Closed #160.


Reply to this email directly or view it on GitHub.

@KostyaSha
Copy link
Contributor Author

caused regression #198

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

Successfully merging this pull request may close these issues.

3 participants