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

Update TaskRun List Page Columns & PipelineRun Tab #6840

Merged
merged 1 commit into from Oct 20, 2020

Conversation

debsmita1
Copy link
Contributor

@debsmita1 debsmita1 commented Oct 5, 2020

JIRA story:
https://issues.redhat.com/browse/ODC-4800

Solution Description:

  • added Task Runs tab in the pipelineRun details page which lists all the Task Runs associated with the Pipeline Run
  • Added columns pipeline , task & pod & removed duration
  • The pipeline column is not shown in the TaskRun Tab under Pipeline Run details page
  • fixed the TaskRun list in the Search page
  • added tests for TaskRunsRow

GIF/Screenshots:
PDtaskruns
taskruns1
TaskRuns
all-pro
search

Test Coverage:
test1

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 5, 2020
@debsmita1 debsmita1 changed the title {WIP] Update TaskRun List Page Columns & PipelineRun Tab [WIP] Update TaskRun List Page Columns & PipelineRun Tab Oct 5, 2020
@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Oct 5, 2020
@debsmita1
Copy link
Contributor Author

/kind feature

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 5, 2020
@debsmita1
Copy link
Contributor Author

/cc @andrewballantyne

@@ -10,33 +10,39 @@ const TaskRunsHeader = () => {
props: { className: tableColumnClasses[0] },
},
{
title: 'Namespace',
Copy link
Contributor

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?

Copy link
Contributor Author

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

@debsmita1 debsmita1 changed the title [WIP] Update TaskRun List Page Columns & PipelineRun Tab Update TaskRun List Page Columns & PipelineRun Tab Oct 6, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 6, 2020
@debsmita1
Copy link
Contributor Author

/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;
Copy link
Contributor

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?

Copy link
Contributor Author

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') }}
Copy link
Contributor

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?

Copy link
Contributor Author

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',
Copy link
Contributor

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.

Suggested change
href: 'TaskRuns',
href: 'task-runs',

Copy link
Contributor

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.

@bgliwa01
Copy link

bgliwa01 commented Oct 8, 2020

Is there a tooltip on the failed status showing the error?

@bgliwa01
Copy link

bgliwa01 commented Oct 8, 2020

will there be a separate PR adding a task run details page?

@debsmita1
Copy link
Contributor Author

will there be a separate PR adding a task run details page?

@bgliwa01 yes this is the PR #6851

Is there a tooltip on the failed status showing the error?

No, there isn't

@andrewballantyne
Copy link
Contributor

Is there a tooltip on the failed status showing the error?

No, there isn't

@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?

@bgliwa01
Copy link

bgliwa01 commented Oct 8, 2020

@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.

@bgliwa01
Copy link

bgliwa01 commented Oct 8, 2020

Just verified that we don't show error in tooltip...I will ask PM

@andrewballantyne
Copy link
Contributor

@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.

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.

Copy link
Member

@jerolimov jerolimov left a 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 ? (
Copy link
Contributor

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 ? (
Copy link
Contributor

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.

Copy link
Contributor

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);
Copy link
Contributor

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.

Copy link
Contributor Author

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 TaskRunsRowcomponent

import { K8sResourceKind } from '@console/internal/module/k8s';

interface TaskRunsProps {
obj: K8sResourceKind;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
obj: K8sResourceKind;
obj: TaskRunKind;

return (
<ListPage
{...props}
canCreate={false}
canCreate={kind?.includes(referenceForModel(TaskRunModel)) ?? false}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, why this change?

Copy link
Contributor Author

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

Copy link

@bgliwa01 bgliwa01 left a 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!!

@karthikjeeyar
Copy link
Contributor

Verified locally, works fine
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2020
@debsmita1 debsmita1 requested review from bgliwa01 and removed request for abhi-kn October 15, 2020 10:14
@debsmita1
Copy link
Contributor Author

/retest

1 similar comment
@debsmita1
Copy link
Contributor Author

/retest

@karthikjeeyar
Copy link
Contributor

Verified locally, works fine
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2020
Copy link

@bgliwa01 bgliwa01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 19, 2020
@debsmita1
Copy link
Contributor Author

/test e2e-gcp-console

@debsmita1
Copy link
Contributor Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 8373773 into openshift:master Oct 20, 2020
@spadgett spadgett added this to the v4.7 milestone Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dev-console Related to dev-console kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet