Conversation
oleg-nenashev
left a comment
There was a problem hiding this comment.
Minor comments so far. Need to finalize the upstream PT's review before approval
|
|
||
| public static final String defaultEncoding = "UTF-8"; | ||
|
|
||
| public FormValidation doCheckEncoding(@QueryParameter boolean returnStdout, @QueryParameter String encoding) { |
There was a problem hiding this comment.
Not part of this PR, but sure.
| public static final String defaultEncoding = "UTF-8"; | ||
|
|
||
| public FormValidation doCheckEncoding(@QueryParameter boolean returnStdout, @QueryParameter String encoding) { | ||
| if (encoding.isEmpty()) { |
There was a problem hiding this comment.
Check for null just in case the form is messed up. Ideally it makes sense to use StringUtils.isBlank() here and in the constructor
There was a problem hiding this comment.
If the form is messed up, there is a product bug and validation will fail. No need to be unreasonably defensive.
| } catch (UnsupportedOperationException x) { | ||
| getContext().onFailure(x); | ||
| } catch (Exception x) { // as below | ||
| LOGGER.log(Level.FINE, node + " is evidently offline now", x); |
There was a problem hiding this comment.
Apparently it's not documented in jenkinsci/durable-task-plugin#60
There was a problem hiding this comment.
Execution link in the log would be helpful
| if (!directory) { | ||
| throw new AbortException("missing workspace " + remote + " on " + node); | ||
| } | ||
| LOGGER.log(Level.FINE, "{0} seems to be online", node); |
There was a problem hiding this comment.
DEBUG/FINEST? maybe also makes sense to print Execution#toString() to the log so we understand from where it comes
|
|
||
| @DataBoundSetter public void setEncoding(String encoding) { | ||
| this.encoding = encoding; | ||
| this.encoding = Util.fixEmpty(encoding); |
There was a problem hiding this comment.
Does not handle blank strings 🐜
There was a problem hiding this comment.
Sorry, what?
Convert empty string to null.
That is exactly what I want here.
Jenkinsfile
Outdated
| @@ -1 +1 @@ | |||
| buildPlugin(jenkinsVersions: [null, '2.73.1']) | |||
|
Please do not perform line-by-line reviews in this PR. Rather, review component PRs. |
|
Now covered by #63. |
Integrates #63 & #64. Downstream of jenkinsci/durable-task-plugin#62.
@reviewbybees