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
[FIX-JENKINS-41421] Extend StepImpl to pass along submitterParameter #820
[FIX-JENKINS-41421] Extend StepImpl to pass along submitterParameter #820
Conversation
@i386 I tried to add the |
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 is alarming that you are copying all this code from InputStepExecution
. Probably this should all be rewritten.
@jglick where is it copied from? What should be all rewritten? |
@scherler the ticket linked talks about text areas - which I don't think this addresses. I am confused as to what this is about. |
|
@jglick yeah, since we have our own implementation of it. Maybe @vivek has some thoughts. @michaelneale the ticket talks about that the |
@scherler but not about Text input (text area?) which seemed one of the other subjects? @vivek will be reviewing this, and this may be related to: https://issues.jenkins-ci.org/browse/JENKINS-41044 which he also wanted to look at, so lets see what he thinks. |
@michaelneale textarea had been supported by the first implementation. The problem is that without the PR the linked pipeline cannot be submitted in BO without causing an error. |
@@ -241,6 +243,12 @@ private Object parseValue(InputStepExecution execution, JSONArray parameters, St | |||
} | |||
mapResult.put(name, convert(name, v)); | |||
} | |||
// If a destination value is specified, push the submitter to it. | |||
String valueName = input.getSubmitterParameter(); | |||
if (valueName != null && !valueName.isEmpty()) { |
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.
Perhaps use StringUtils.isNotBlank(valueName)?
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.
@vivek as @jglick pointed out, this comes from https://github.com/jenkinsci/pipeline-input-step-plugin/blob/1031ad8008f2b84e1ca331e3eff7839d97922169/src/main/java/org/jenkinsci/plugins/workflow/support/steps/input/InputStepExecution.java how could we reduce that redundancy?
...but yeah good point!
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.
Yeah, possibly InputStepImpl.parseValue() should be refactored to avoid working off form submission and work just off JSONArray and also expose this and some other method public. I noted that time in PR/comment but missed to follow it up with JIRA/PR in pipeline-onput-step plugin. I will follow it up.
@michaelneale BTW this PR fixes https://issues.jenkins-ci.org/browse/JENKINS-41044 |
@scherler LGTM 🐝 pending ATH run and a test case to cover submitter parameter:) Thanks for fixing:) |
Description
See JENKINS-41421.
Basic change in PipelineStepImpl.java rest is to adopt to the v. 2.5 of pipeline-input-step
Submitter checklist
Reviewer checklist
@reviewbybees