Send correct params for starting a pipeline - #3286
Conversation
|
/kind bug |
andrewballantyne
left a comment
There was a problem hiding this comment.
Just a couple things to tidy up (*cough* tests *cough*)
There was a problem hiding this comment.
*cough* tests *cough*
There was a problem hiding this comment.
Added unit test.
There was a problem hiding this comment.
| ...(params && { params }), | |
| params, |
You're always giving this an array. (I'd move this also back to where it was for cleaner diffs)
getPipelineRunParams always returns an array (.map) and empty arrays are truthy.
360fada to
385ae5d
Compare
|
/retest |
andrewballantyne
left a comment
There was a problem hiding this comment.
LGTM, but I think we should write an explicit test scenario to prevent the root cause here. We cannot send default up.
There was a problem hiding this comment.
Maybe also:
| expect(params[0].value).toBe('default-app-name'); | |
| expect(params[0].value).toBe('default-app-name'); | |
| expect(params[0].default).toBeNotDefined(); |
We are really looking for this to never exist. Another test is also (and probably more-so) accepted.
There was a problem hiding this comment.
Although we do not need to explicitly test for default not being there in params since I've added proper types for both PipelineParams and PipelineRunParams, I've added an extra test in pipelines-actions.spec.ts to explicitly test it.
There was a problem hiding this comment.
I prefer both tbh. Makes the change harder to accidentally do. But you're right, the type would prevent this issue.
385ae5d to
532a09b
Compare
|
@spadgett It seems the bot is not working correctly for any of the PRs. Now even for this PR its ignoring |
|
/test e2e-gcp-console |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, rohitkrai03 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Bot hiccuped? It appears to be back. |
|
Yeah, seems to be back now. |
|
/test e2e-gcp-console |
1 similar comment
|
/test e2e-gcp-console |
Related Bug - https://jira.coreos.com/browse/ODC-2204
This PR -
paramsbeing sent in thePipelineRunfor starting a pipeline.