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
Update TaskRun List Page Columns & PipelineRun Tab #6840
Update TaskRun List Page Columns & PipelineRun Tab #6840
Conversation
/kind feature |
@@ -10,33 +10,39 @@ const TaskRunsHeader = () => { | |||
props: { className: tableColumnClasses[0] }, | |||
}, | |||
{ | |||
title: 'Namespace', |
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.
Can you really remove Namespace? I think if you go to the Admin tab page and do all projects, you'll be missing this column, no?
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.
@andrewballantyne Thank you for pointing this out. I noticed in the pipelines list page that the namespace column shows up when the user is not in the context of a project. I have incorporated that in my PR and have added a GIF in PR description
8a8f8ba
to
75a7be7
Compare
/cc @bgliwa01 |
import TaskRunsList from './TaskRunsList'; | ||
import { TaskRunModel } from '../../../models'; | ||
import { runFilters as taskRunFilters } from '../../pipelines/detail-page-tabs/PipelineRuns'; | ||
|
||
interface TaskRunsListPageProps { | ||
hideBadge?: boolean; | ||
showCreateButton?: 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.
Why do we need this? Is it passed by a parent component somewhere?
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.
removed it
const TaskRuns: React.FC = (props) => ( | ||
<TaskRunsListPage | ||
showTitle={false} | ||
selector={{ 'tekton.dev/pipelineRun': _.get(props, 'obj.metadata.name') }} |
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.
we could replace the lodash _.get with optional chaining and remove the lodash import. why to import for this simple usage, WDYT?
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.
Done
@@ -24,6 +25,11 @@ const PipelineRunDetailsPage: React.FC<DetailsPageProps> = (props) => { | |||
pages={[ | |||
navFactory.details(PipelineRunDetails), | |||
navFactory.editYaml(viewYamlComponent), | |||
{ | |||
href: 'TaskRuns', |
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.
Please change this to lower case hyphenated words in the url, so that we are using similar url segments in both the perspectives.
href: 'TaskRuns', | |
href: 'task-runs', |
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.
Odd, the Pipeline Details Page has a "Runs" Tab for Pipeline Runs 😕
Definitely agree we should kebab-case
the route names though.
75a7be7
to
236a58c
Compare
Is there a tooltip on the failed status showing the error? |
will there be a separate PR adding a task run details page? |
@bgliwa01 I don't think we have a convention for showing a tooltip on any status 🤔 Can you point me at a case where we do this? |
@andrewballantyne the only reason I'm asking is because it's in the ACs. I can't get a pipeline run to fail to validate if we have it or not currently. |
Just verified that we don't show error in tooltip...I will ask PM |
Damn, good catch @bgliwa01! I did not at all see that when I was validating the AC. I guess I saw "status" and assumed "well that's pretty standard". I have asked a question on the Epic. |
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.
@debsmita1 could we also change the default order of TaskRuns to the "started" date (newest first), similar to PipelineRuns?
Imo this makes sense in the overall search list as well in the PipelineRun > TaskRuns tab.
edit: Hmmm, but we have then in the Pipeline Run > TaskRuns the inverted order then the logs tab...
Tested it locally, everything else works as expected. 👍
)} | ||
</TableData> | ||
<TableData className={tableColumnClasses[4]}> | ||
{obj.status.podName ? ( |
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.
I got a NPE on this line. status
is optional by the K8sResourceKind
type -- which happens to be all that the TaskRun is right now.
</TableData> | ||
<TableData className={tableColumnClasses[3]}> | ||
<Timestamp timestamp={obj?.status?.startTime} /> | ||
{obj.spec.taskRef?.name ? ( |
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.
We need to define the TaskRunKind
type before we start digging into spec
. Now that this is an officially supported page we should definitely try to expand our types to handle these properties.
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.
I have expanded the TaskRunKind
in this PR #6867
|
||
const TaskRunsRow: RowFunction<TaskRunKind> = ({ obj, index, key, style }) => { | ||
const taskRunsReference = referenceForModel(TaskRunModel); | ||
const taskReference = referenceForModel(TaskModel); | ||
const pipelineReference = referenceForModel(PipelineModel); |
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 static references, I wonder if we don't just want to define them outside of the TaskRunsRow component. They don't ever change.
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.
moved them oustide of the TaskRunsRow
component
import { K8sResourceKind } from '@console/internal/module/k8s'; | ||
|
||
interface TaskRunsProps { | ||
obj: K8sResourceKind; |
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.
obj: K8sResourceKind; | |
obj: TaskRunKind; |
return ( | ||
<ListPage | ||
{...props} | ||
canCreate={false} | ||
canCreate={kind?.includes(referenceForModel(TaskRunModel)) ?? false} |
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.
Curious, why this change?
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 adds the create task run
button in the search page when the Task Runs resource type is selected
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.
confirmed with PM that tooltip on error will be taken out of ACs for this epic...lgtm!!
Verified locally, works fine |
e82afd7
to
d5876d9
Compare
d5876d9
to
771fbf8
Compare
/retest |
1 similar comment
/retest |
771fbf8
to
1867591
Compare
Verified locally, works fine |
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.
lgtm
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bgliwa01, debsmita1, karthikjeeyar, rohitkrai03 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 |
/test e2e-gcp-console |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
JIRA story:
https://issues.redhat.com/browse/ODC-4800
Solution Description:
Task Runs
tab in the pipelineRun details page which lists all the Task Runs associated with the Pipeline Runpipeline
,task
&pod
& removedduration
TaskRunsRow
GIF/Screenshots:
Test Coverage: