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 pipelinerun visualization inprogress crash #7438

Merged

Conversation

karthikjeeyar
Copy link
Contributor

@karthikjeeyar karthikjeeyar commented Dec 7, 2020

Fixes:

https://issues.redhat.com/browse/ODC-5160

Analysis / Root cause:
When starting a Pipeline multiple times the console crashes sometimes with this JavaScript error

Solution Description:
If pipeline run is in progress and doesn't have enough information(pipelineSpec) to form the pipeline, then do not render the visualization graph.

Screen shots / Gifs for design review:
pipelinerun-loaded

Unit test coverage report:

image

Test setup:

  1. Install Openshift pipelines operator
  2. Create a pipeline using a add flow or yaml
  3. Start the pipeline run multiple times using start last run option.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

/kind bug
/assign @jerolimov

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 7, 2020
@karthikjeeyar
Copy link
Contributor Author

/test analyze

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.

Crash is solved. 👍

The update is visible to the user, so that visualization comes after the data is available.

/lgtm
/assign @andrewballantyne

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

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

I think we actually want the solution to be in frontend/packages/pipelines-plugin/src/components/pipelineruns/detail-page-tabs/PipelineRunVisualization.tsx... this is a problem with our pulling the Pipeline logic from the Pipeline Run... which is a matter of time.

Making the change in frontend/packages/pipelines-plugin/src/components/pipelines/detail-page-tabs/pipeline-details/PipelineVisualization.tsx sets us up for an awkward situation of allowing the creation of a PipelineVisualization without a Pipeline -- and that's not ideal.

The solution should also be a Loading indicator not a null as when I reproduce this scenario and get a null back from the Pipeline it removes the graph and then pops back in without warning. Probably a better use experience to spin.

@andrewballantyne
Copy link
Contributor

Crash is solved. 👍

Definitely solved the crash... so this is an okay solution to the problem, however...

The update is visible to the user, so that visualization comes after the data is available.

This is probably not the best user experiernce.

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2020
@karthikjeeyar karthikjeeyar force-pushed the fix-pipelinerun-viz branch 2 times, most recently from cff97ff to 1574bde Compare December 8, 2020 07:46
@karthikjeeyar
Copy link
Contributor Author

Moved the check to pipelineRunVisualization.tsx and added loader for better UX.

pipelinerun-loaded

Copy link
Contributor

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 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!

@andrewballantyne
Copy link
Contributor

/lgtm

Slight improvement on the solution @jerolimov lgtm'ed -- we talked about this solution and he was in agreement. Let's get this merged 😄

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, bgliwa01, jerolimov, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit a8d9195 into openshift:master Dec 9, 2020
@spadgett spadgett added this to the v4.7 milestone Dec 11, 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. kind/bug Categorizes issue or PR as related to a bug. 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

7 participants