-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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-69032] Plugin manager update site URL can be saved empty #6886
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.
Does the FormValidation validate the input though? It looks like you'd be able to hit the submission button still, even if the field is empty.
@NotMyFault The FormValidation can only shows the error message at most, just like some input fields in the Configure System page. In my opinion, if a user change the update site url to empty accidently, he/she can reset back easily by clicking the "Reset to default" button. |
Given that accepting user submissions even if they're nonsensical is a fairly common pattern in Jenkins, validation + reset button doesn't seem like a bad solution. |
It might also be useful to review the error that appears when you check for updates from an empty URL update site to make sure that explains the configuration is screwed up and should be changed. Not necessary if you don't feel like adding that though. |
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
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 to me. Chinese translation passed the google translate check
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.
LGTM - left a few untested suggestions.
// Connect to the URL | ||
HttpURLConnection conn = (HttpURLConnection) ProxyConfiguration.open(url); | ||
conn.setRequestMethod("HEAD"); | ||
conn.setConnectTimeout(5000); |
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.
should this also have a read timeout?
conn.setConnectTimeout(5000); | |
conn.setReadTimeout(1000); |
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.
Will 1 sec too short? How about 5 sec which is same as connect timeout?
* Set the correct default value * Fix the indent
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.
Thanks for addressing the outstanding concerns, looks promising so far.
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
See JENKINS-69032.
Form validation and "Reset to default" button are implemented.
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgrade@Restricted
or have@since TODO
Javadoc, as appropriate.@Deprecated(since = "TODO")
or@Deprecated(forRemoval = true, since = "TODO")
if applicable.Desired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are accurate, human-readable, and in the imperative moodupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).