forked from nemccarthy/stash-pullrequest-builder-plugin
-
Notifications
You must be signed in to change notification settings - Fork 56
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
[BUGFIX] Fix handling of failures to fetch the PR list and the PR comments #93
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proski
commented
May 8, 2019
•
edited
Loading
edited
proski
changed the title
Fix starting PR builds if Stahs API is down
Fix starting PR builds if Stash API is down or very slow
May 8, 2019
proski
force-pushed
the
stampede-fix
branch
2 times, most recently
from
May 14, 2019 00:35
cce7629
to
6ebd94f
Compare
proski
changed the title
Fix starting PR builds if Stash API is down or very slow
[BUGFIX] Fix starting PR builds if Stash API is down or very slow
May 24, 2019
Merged
jakub-bochenski
requested changes
May 24, 2019
src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/stash/StashApiClient.java
Outdated
Show resolved
Hide resolved
proski
changed the title
[BUGFIX] Fix starting PR builds if Stash API is down or very slow
[BUGFIX] Fix handling of failures to fetch the PR list and the PR comments
Jun 2, 2019
Rewritten from scratch with a custom exception |
Added a separate commit to add Nonnull annotations in the functions that throw instead of returning null. The commit also removes null checks that are not necessary anymore. FindBugs reported one of those checks as a bug. |
proski
force-pushed
the
stampede-fix
branch
6 times, most recently
from
June 6, 2019 21:18
e77531e
to
095cc82
Compare
jakub-bochenski
approved these changes
Jun 21, 2019
src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/stash/StashApiClient.java
Show resolved
Hide resolved
Add a new exception StashApiException, throw it in both cases. Don't trigger a build on a failure to fetch PR comments. That issue has been observed creating a large number of builds if the connection between Jenkins and Stash is unstable.
In StashApiClient.java, getPullRequests() and getPullRequestComments() don't return null anymore, they throw StashApiException on error. extractComments() is used getPullRequestComments() and doesn't return null either, so annotate it as well. In StashRepository.java, remove null checks for the results of the @nonnull methods.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.