Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Pipeline summary: handle special case where the VM has an error but the current step does not #391

Merged
merged 4 commits into from Jan 19, 2021

Conversation

mturley
Copy link
Collaborator

@mturley mturley commented Jan 18, 2021

Resolves #390. (https://bugzilla.redhat.com/show_bug.cgi?id=1916963)

There is a special corner case we were not covering, which can be caused by a user suddenly deleting the VM Import CR after the migration starts (among other potential causes). In this case, the migration fails (and so the VM-level status has an error) but the pipeline step is still in a state of being started, not being completed, and not having an error. Because the VM was marked complete and no pipeline steps had errors, they were all showing green icons. And because the step during which the error happened was never marked complete, its elapsed time was continuing to tick forever.

This PR handles this case by making the current step icon red if there is a VM-level error even if there is not a pipeline step-level error. In this case, the VM-level error is displayed in the pipeline status column and the elapsed time is set to the difference between the step start time and the VM completed time.

Screen Shot 2021-01-18 at 5 24 27 PM

@mturley mturley requested a review from a team January 18, 2021 21:58
@konveyor-preview-bot
Copy link

🚀 Deployed Preview: http://konveyor-forklift-ui-pr-391-preview.surge.sh

Compare with current main branch: http://konveyor-forklift-ui-preview.surge.sh

@codecov
Copy link

codecov bot commented Jan 18, 2021

Codecov Report

Merging #391 (eea78b5) into main (af032ac) will decrease coverage by 0.07%.
The diff coverage is 15.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
- Coverage   62.91%   62.83%   -0.08%     
==========================================
  Files         121      121              
  Lines        3495     3501       +6     
  Branches      800      802       +2     
==========================================
+ Hits         2199     2200       +1     
- Misses       1279     1284       +5     
  Partials       17       17              
Impacted Files Coverage Δ
src/app/common/components/PipelineSummary.tsx 31.70% <0.00%> (-0.80%) ⬇️
src/app/common/helpers.ts 52.94% <0.00%> (+1.51%) ⬆️
src/app/Plans/components/VMStatusTable.tsx 36.36% <9.09%> (-13.64%) ⬇️
src/app/Plans/components/Step.tsx 41.17% <50.00%> (ø)
src/app/queries/mocks/plans.mock.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af032ac...eea78b5. Read the comment docs.

Copy link
Contributor

@gildub gildub left a comment

Choose a reason for hiding this comment

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

LGTM

@gildub gildub merged commit b8833ae into kubev2v:main Jan 19, 2021
gildub pushed a commit that referenced this pull request Jan 19, 2021
…error but the current step does not (#391) (#392)

* Add mock data to reproduce bug case

* Handle yellow steps (no error, but in progress when VM errored)

* Stop the elapsed time when there is a VM-level error, and show the error in the stalled step

* Make the yellow icon red
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BZ#1916963] 'Elapsed time' timer on migration plan doesn't stop after a migration is cancelled from OCPv
3 participants