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
Bug 1835228: handle embedded pipeline spec in pipelinerun scenario #5425
Bug 1835228: handle embedded pipeline spec in pipelinerun scenario #5425
Conversation
@karthikjeeyar: This pull request references Bugzilla bug 1835228, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind bug |
@karthikjeeyar: This pull request references Bugzilla bug 1835228, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1 similar comment
@karthikjeeyar: This pull request references Bugzilla bug 1835228, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -399,3 +399,6 @@ export const getResourceModelFromTask = (task: PipelineTask): K8sKind => { | |||
|
|||
return getResourceModelFromTaskKind(kind); | |||
}; | |||
|
|||
export const pipelineExists = (pipelineRun: PipelineRun): boolean => |
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.
this should be pipelineRunExists
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.
No @debsmita1, this function checks if pipeline reference is availble in a pipelineRun object, maybe we should change it to pipelineRefExists
.
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.
oh yes, pipelineRefExists
sounds good. Thank you for clarifying
795015d
to
6f90bb1
Compare
verified this locally |
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.
Looks good. Thanks for this fix. This will need to be backported once it merges. We don't officially support the pipelineSpec
yet, but we do need to support not white-screening when it is used.
const pipelineRunWithoutPipelineRef = { | ||
...pipelineTestData[PipelineExampleNames.SIMPLE_PIPELINE].pipelineRuns[DataState.SUCCESS], | ||
spec: { | ||
...pipelineTestData[PipelineExampleNames.SIMPLE_PIPELINE].pipelineRuns[DataState.SUCCESS] | ||
.spec, | ||
pipelineRef: undefined, | ||
}, | ||
}; |
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.
Since we don't actually support the pipelineSpec with this change... we can keep this test as just omit the pipelineRef
. Which can be simplified if we just use lodash to omit the field.
const pipelineRunWithoutPipelineRef = { | |
...pipelineTestData[PipelineExampleNames.SIMPLE_PIPELINE].pipelineRuns[DataState.SUCCESS], | |
spec: { | |
...pipelineTestData[PipelineExampleNames.SIMPLE_PIPELINE].pipelineRuns[DataState.SUCCESS] | |
.spec, | |
pipelineRef: undefined, | |
}, | |
}; | |
const pipelineRunWithoutPipelineRef = _.omit( | |
pipelineTestData[PipelineExampleNames.SIMPLE_PIPELINE].pipelineRuns[DataState.SUCCESS], | |
'spec.pipelineRef', | |
); |
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.
updated it.
6f90bb1
to
cacf5bf
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, debsmita1, karthikjeeyar 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 |
@karthikjeeyar: All pull requests linked via external trackers have merged: openshift/console#5425. Bugzilla bug 1835228 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes: https://issues.redhat.com/browse/ODC-3675
Problem:
Devconsole UI breaks when user creates
pipelinerun
with embedded pipeline spec and visits the pipeline run details pageSolution:
Add checks and conditionally rendering the pipelinerun visualization component based on the
pipelineRef
field in the pipelinerun spec.Screenshots:
The pipeline Visualization component and Pipeline resource links will not be rendered, if there is no pipelineRef attached to it.
Unit coverage:
Broswer confromance:
cc: @openshift/team-devconsole-ux @serenamarie125 @andrewballantyne