-
Notifications
You must be signed in to change notification settings - Fork 123
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 954, trim whitespace and newline char for range input #961
Conversation
@Tomcli @ScrapCodes could you review and approve this? we required this fix asap. |
tekton-catalog/pipeline-loops/pkg/reconciler/pipelinelooprun/pipelinelooprun_test.go
Outdated
Show resolved
Hide resolved
for _, p := range run.Spec.Params { | ||
if p.Name == "from" { | ||
from, _ = strconv.Atoi(p.Value.StringVal) | ||
fromProvided = true | ||
from, err = getIntegerParamValue(p) |
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.
In practice, I have not seen a problem due to "\n" terminated strings passed as a value. My understanding was these are already taken care of by the parsers.
Can you provide an example ?
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.
@ScrapCodes , we have an example, the value of the range is from an upper task result, e.g: an output of a bash script task. The result is 3\n
I see.
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.
These are from
and to
parameters of a loop, do you think they are generated as a result of running a bash script?
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, we have a pipeline, the upper node is a bash script task and its output will be the input of the pipeline loop run.
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ScrapCodes, wzhanw The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* fix 954, trim whitespace and newline char for range input * address review comments
Which issue is resolved by this Pull Request:
Resolves # #954
Description of your changes:
Environment tested:
python --version
):tkn version
):kubectl version
):/etc/os-release
):Checklist: