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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.