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

Fix error showing TaskRun steps that have not run #653

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

ncskier
Copy link
Member

@ncskier ncskier commented Oct 18, 2019

Changes

Fixes #644
This fix shows a neutral "Not run" status for steps that follow a step with an
error. Previously, these steps showed a misleading green "Completed" status.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide
for more details.

@tekton-robot tekton-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 18, 2019
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 18, 2019
@ncskier
Copy link
Member Author

ncskier commented Oct 18, 2019

/uncc @dibbles
/uncc @vtereso
/cc @a-roberts
/cc @steveodonovan

@tekton-robot tekton-robot requested review from a-roberts and steveodonovan and removed request for dibbles and vtereso October 18, 2019 19:01
@ncskier ncskier marked this pull request as ready for review October 18, 2019 19:13
@tekton-robot tekton-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 18, 2019
Copy link
Member

@AlanGreene AlanGreene left a comment

Choose a reason for hiding this comment

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

We should not hide steps that have not executed, and the current behaviour where we do not display Task(Run)s that have not begun executing is a known issue we've been tracking for a while.

When we introduce the pipeline diagram we will display all nodes, decorated appropriately to indicate their status.

A fix for #644 should ensure steps that have not run are displayed as such, the component already supports this state, we may need to make some minor changes to ensure the correct props are passed to render this as expected: https://alangreene.github.io/dashboard/?path=/story/step--default

@ncskier
Copy link
Member Author

ncskier commented Oct 21, 2019

Thanks for the feedback @AlanGreene! I'll update this PR to show the default step state instead of hiding the steps 👍
/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 21, 2019
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 21, 2019
@ncskier
Copy link
Member Author

ncskier commented Oct 21, 2019

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 21, 2019
packages/components/src/components/Log/Log.js Outdated Show resolved Hide resolved
packages/components/src/components/Task/Task.js Outdated Show resolved Hide resolved
src/utils/index.js Outdated Show resolved Hide resolved
return steps;
}
let errorIndex = steps.length - 1;
return steps.map((step, index) => {
Copy link
Member

@AlanGreene AlanGreene Oct 22, 2019

Choose a reason for hiding this comment

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

I think it's worth raising tektoncd/pipeline#1439 in the next working group meeting at least to ask for feedback on the issue.

It also looks like the behaviour when cancelling a PipelineRun is different, I see steps marked as Waiting instead of Completed. Maybe this would be more appropriate than Error?

Having this workaround in the dashboard for now resolves the immediate user-facing issue for users of the dashboard, but users of kubectl or other tools still have the same misleading information presented (i.e. a step that hasn't executed is marked as Completed), and each tool needs to handle this themselves.

@AlanGreene
Copy link
Member

AlanGreene commented Oct 22, 2019

@ncskier can you also update the PR title + description to reflect the change in approach taken here? Looks like the commit message is already updated. Thanks

@ncskier ncskier changed the title Hide TaskRun steps that are not executed Fix error showing TaskRun steps that have not run Oct 22, 2019
@ncskier ncskier force-pushed the issue644 branch 5 times, most recently from 7bb486c to b927224 Compare October 22, 2019 18:22
@ncskier
Copy link
Member Author

ncskier commented Oct 22, 2019

Thanks for the feedback @AlanGreene! I've updated the PR title & description, and I think I've addressed all of your concerns. Let me know if there's anything else that I can do 🙂

Copy link
Member

@AlanGreene AlanGreene left a comment

Choose a reason for hiding this comment

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

almost there, just a couple of imports that need updating to reference the utils package instead

packages/components/src/components/Task/Task.js Outdated Show resolved Hide resolved
Fixes tektoncd#644
This fix shows a neutral "Not run" status for steps that follow a step with an
error. Previously, these steps showed a misleading green "Completed" status.
@ncskier
Copy link
Member Author

ncskier commented Oct 23, 2019

Ah, thanks @AlanGreene! I just fixed the imports 😁

Copy link
Member

@AlanGreene AlanGreene left a 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 making those changes 👍

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2019
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlanGreene

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 24, 2019
@tekton-robot tekton-robot merged commit c1aa3e4 into tektoncd:master Oct 24, 2019
AlanGreene added a commit to AlanGreene/dashboard that referenced this pull request Nov 29, 2019
This reverts commit c1aa3e4.

Reverts tektoncd#653

Tekton Pipelines now correctly sets the status of skipped steps
tektoncd/pipeline#1439
tekton-robot pushed a commit that referenced this pull request Nov 29, 2019
This reverts commit c1aa3e4.

Reverts #653

Tekton Pipelines now correctly sets the status of skipped steps
tektoncd/pipeline#1439
ncskier pushed a commit to ncskier/dashboard that referenced this pull request Jan 16, 2020
This fixes the error seen when using the Tekton Dashboard with Tekton
Pipelines v0.8.0. In order to support users on Tekton Pipelines v0.8.0
and earlier, the fix from tektoncd#653
is going back into the Dashboard codebase.
The fix was previously reverted when Tekton Pipelines v0.9.0 fixed the
root cause of the issue
(https://github.com/tektoncd/dashboard/pull/795/files).
ncskier pushed a commit to ncskier/dashboard that referenced this pull request Jan 16, 2020
This fixes an error seen when using the Tekton Dashboard with Tekton
Pipelines v0.8.0. In order to support users on Tekton Pipelines v0.8.0
and earlier, the fix from tektoncd#653
is going back into the Dashboard codebase.
The fix was previously reverted when Tekton Pipelines v0.9.0 fixed the
root cause of the issue
(https://github.com/tektoncd/dashboard/pull/795/files).
tekton-robot pushed a commit that referenced this pull request Jan 17, 2020
This fixes an error seen when using the Tekton Dashboard with Tekton
Pipelines v0.8.0. In order to support users on Tekton Pipelines v0.8.0
and earlier, the fix from #653
is going back into the Dashboard codebase.
The fix was previously reverted when Tekton Pipelines v0.9.0 fixed the
root cause of the issue
(https://github.com/tektoncd/dashboard/pull/795/files).
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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If the build step in tekton pipeline fails, tekton dashboard shows the push step as green
3 participants