-
Notifications
You must be signed in to change notification settings - Fork 371
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-72030] Add checkbox to enable/disable Avatar retrieval #738
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.
this will change behaviour for everyone - including those where it works today. Why opt in vs opt out where it causes issues?
The linked conversation does not seem relevant here as we will be backing off in the presence of a rate limit? otherwise the Jenkins ticket would not exist as the page would not hang - just failback or produce a broken icon..
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
Outdated
Show resolved
Hide resolved
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, what does this have to do with #653? IIUC it does at least partly follow my suggestion in #700 (comment).
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
Outdated
Show resolved
Hide resolved
src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator/config.jelly
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
Outdated
Show resolved
Hide resolved
Allright, maybe I misunderstood the point in the discussion as anonymous calls were mentioned in the discussion. Will change the default to enable the fetch of the avatar. |
To be clear, #738 (comment) meant switching the default to “do not fetch” for new org folders, and just retaining the fetch for existing folders unless the box is unchecked. #738 (review) is ambiguous
|
1fe845b
to
1646ef2
Compare
1646ef2
to
43d7905
Compare
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
Outdated
Show resolved
Hide resolved
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.
Looks OK, but have not tried it.
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jesse Glick <[email protected]>
*/ | ||
@NonNull | ||
@SuppressWarnings("unused") // stapler | ||
public boolean getEnableAvatar() { |
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 think this should be isEnableAvatar
? (and then a NIT that the field should not be an action (enable x) but so isAvatarEnabled
and avatarEnabled
)
@jtnord Yes this is something I mentioned in https://issues.jenkins.io/browse/JENKINS-72030?focusedId=441495&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-441495. |
not sure on the specific base class you would need if there is a common one for this setting but yes that is the idea. There is the |
Have not followed details, but my offhand opinion is that the value of the avatar on the org folder icon is low (just something implemented in the early days of multibranch as a neat demo feature) and if there are any field reports of performance problems as a result it should just be ripped out unless and until someone has the time to reimplement it better. Not worth spending years debating the best approach. It also seems inappropriate to expect a user to uncheck an obscure option to avoid known performance problems; if something is potentially expensive, they should have to opt into it with informed consent about the implications. |
SCM API implementation actually don't have a requirement for a dependency on
The proposed option is opted out by default and the help message mentions the implication. |
Description
Proposing a field configuration to enable / disable the Avatar action fetch that can be causing issues because of the anonymous call. Even with recent addition of a cache, this can still be a problem.
See JENKINS-72030 for further information.
I thought it would be a better to disable it by default after seeing recent discussions in #653 (comment).
Submitter checklist
Reviewer checklist
Documentation changes
Users/aliases to notify
@jglick @bitwiseman @rsandell