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.
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
Add cache for commit responses based on hashes #839
Add cache for commit responses based on hashes #839
Changes from all commits
fda4056
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It seems a bit inconsistent that the maximum duration of
cachedCommits
is not configurable viaBitbucketCloudEndpoint
liketeamCacheDuration
andrepositoriesCacheDuration
; but I suppose it's okay because Bitbucket Cloud is expected to return the same information as in the immutable Git commit object. In particular,BitbucketCloudCommit
does not includegit notes
.Check warning on line 167 in src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java
Not covered lines
Check warning on line 546 in src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java
Partially covered line
Check warning on line 547 in src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java
Not covered line
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.
If I read right this catch eat any exception thrown by the callable. Before exception was log to the build console, now it is not logged and return null
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.
Hm, I think you might be right. Did you already create a new issue for this, as this PR is already merged?
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.
no, I was here because I check changes in jenkins plugin before update in production.
Feel free to create an issue and a PR with a unit test
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.
@thomas-boehm-tractive would you be able to create a PR?
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.
@thomas-boehm-tractive any news about fix for this issue?
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.
Sorry for the late response, I didn't get to this in the last weeks.
Honestly, I am not really sure if this really is an issue, as similar blocks in this file behave exactly like this (see e.g. getTeam or getTeamAvatar function). My PR changed the behavior, but change it to behave like the code does on several other positions.
Are you convinced I should change this?
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.
Yes I'm sure, what is the reason to eat the exception and not inform the user that something was wrong?
I was on these changes of this pull request, I did see other places. Eventually we should fix also other code.
In short what should do the jenkins user if something happens and there is no apparently reason? I should replicate with jenkins in debug mode
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.
Created a ticket, and will create a PR within the next days:
#850
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.
Created PR, I think this should bring back the behavior from before this PR was merged: #851
Check warning on line 552 in src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java
Not covered lines