Skip to content
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

Support the comma as default string param separator #921

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

wzhanw
Copy link
Contributor

@wzhanw wzhanw commented Apr 21, 2022

Which issue is resolved by this Pull Request:
Resolves #
We have a use case like that:
The iteration parameter string value is 1,2,3,4,5, but the separator is not set.
User wants the default separator should be a comma (,)

Description of your changes:
Try the default separator , in the last when interationParam string is not empty and contains the comma.

Environment tested:
Unit test passed.

  • Python Version (use python --version):
  • Tekton Version (use tkn version):
  • Kubernetes Version (use kubectl version):
  • OS (e.g. from /etc/os-release):

Checklist:

@wzhanw
Copy link
Contributor Author

wzhanw commented Apr 21, 2022

@Tomcli could you please review this PR? Thanks, this is a valid case on our customer side.

@wzhanw wzhanw changed the title support the comma as default string param separator Support the comma as default string param separator Apr 21, 2022
@wzhanw
Copy link
Contributor Author

wzhanw commented Apr 21, 2022

The ut failure was not caused by my code, it was caused by the cache store.

@Tomcli
Copy link
Member

Tomcli commented Apr 21, 2022

@wzhanw Although the caching code is returning error logs due to not running on Kubernetes, that didn't cause the unit test to fail. The only failed unit test is missing this error message.

name: "iterate parameter not an array",
pipelineloop: aPipelineLoop,
run: runWithIterateParamNotAnArray,
reason: pipelineloopv1alpha1.PipelineLoopRunReasonFailedValidation,
wantEvents: []string{
"Normal Started ",
`Warning Failed Cannot determine number of iterations: The value of the iterate parameter "current-item" can not transfer to array`,

@Tomcli
Copy link
Member

Tomcli commented Apr 21, 2022

@wzhanw Thanks for the PR. Your use case make sense. Once the unit tests are fixed, I can merge this PR

@wzhanw
Copy link
Contributor Author

wzhanw commented Apr 22, 2022

@Tomcli thanks, let me fix the failure in the unit test.

@wzhanw wzhanw requested a review from Tomcli April 22, 2022 02:25
@wzhanw
Copy link
Contributor Author

wzhanw commented Apr 22, 2022

@Tomcli please review again, I fixed the unit test failure.

@Tomcli
Copy link
Member

Tomcli commented Apr 22, 2022

thanks @wzhanw
/lgtm
/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Tomcli, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 892bbaa into kubeflow:master Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants