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

Bug 1797974: fix overview status #4171

Merged
merged 2 commits into from Feb 4, 2020

Conversation

yaacov
Copy link
Member

@yaacov yaacov commented Feb 4, 2020

In #3949 I introduced an error in status rendering.

This PR fixes the status rendering in vm/vmi overview.

Screenshots
before:
OKD

after:
OKD(1)

@yaacov yaacov requested a review from atiratree February 4, 2020 10:14
@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 4, 2020
@yaacov
Copy link
Member Author

yaacov commented Feb 4, 2020

@suomiy please review

@openshift-ci-robot openshift-ci-robot added component/kubevirt Related to kubevirt-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 4, 2020
@yaacov yaacov changed the title kubevirt: fix oeverview status Bug 1797974: fix oeverview status Feb 4, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: This pull request references Bugzilla bug 1797974, which is invalid:

  • expected the bug to target the "4.4.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1797974: fix oeverview status

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Feb 4, 2020
@yaacov
Copy link
Member Author

yaacov commented Feb 4, 2020

/test analyze

@@ -145,7 +145,7 @@ export const VMDetailsList: React.FC<VMResourceListProps> = ({
idValue={prefixedID(id, 'vm-statuses')}
>
<VMStatusModal isOpen={isStatusModalOpen} setOpen={setStatusModalOpen} vmi={vmi} />
<VMStatuses vm={vm} vmi={vmi} pods={pods} migrations={migrations} />
<VMStatuses vm={isVM && vm} vmi={vmi} pods={pods} migrations={migrations} />
Copy link
Member

Choose a reason for hiding this comment

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

we shouldn't have a different approach for vm row and the details page.

Also we should try to infer the status from all the connected resources we are aware of. There might be some bug or wrong implementation in getVMStatus. We should be consistent for all statuses.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@yaacov
Copy link
Member Author

yaacov commented Feb 4, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Feb 4, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: This pull request references Bugzilla bug 1797974, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 4, 2020
@yaacov
Copy link
Member Author

yaacov commented Feb 4, 2020

@suomiy please re-review

@@ -29,8 +29,9 @@ export const VMDetailsFirehose: React.FC<VMTabProps> = ({
templates,
customData: { kindObj },
}) => {
const vm = kindObj === VirtualMachineModel && isVM(objProp) ? objProp : vmProp;
const vmi = kindObj === VirtualMachineInstanceModel && isVMI(objProp) ? objProp : vmiProp;
const vm = kindObj === VirtualMachineModel && isVM(objProp) ? objProp : isVM(vmProp) && vmProp;
Copy link
Member

Choose a reason for hiding this comment

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

how come? The types in VMTabProps should always corespond no? How does this help?

Are the objects different when you look at them in debug, and why are they different?

Copy link
Member Author

Choose a reason for hiding this comment

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

how come? The types in VMTabProps should always corespond no?
Are the objects different when you look at them in debug, and why are they different?

If we do not find an object with matching type. vmProp is an empty object when no matching vm is found, since we check if (vm) ... we get a false true becase {} is true.

How does this help?

So we need to check vmProp (and vmiProp) for empty objects.

Copy link
Member

Choose a reason for hiding this comment

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

ah I see, it is that weird behaviour when firehose gives empty object. Could we at least pass null instead of false when that happens?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure 👍 done

@yaacov
Copy link
Member Author

yaacov commented Feb 4, 2020

/test analyze
/test e2e-gcp-console

@atiratree
Copy link
Member

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: suomiy, yaacov

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

@spadgett spadgett changed the title Bug 1797974: fix oeverview status Bug 1797974: fix overview status Feb 4, 2020
@openshift-merge-robot openshift-merge-robot merged commit b677e2c into openshift:master Feb 4, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: All pull requests linked via external trackers have merged. Bugzilla bug 1797974 has been moved to the MODIFIED state.

In response to this:

Bug 1797974: fix overview status

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.4 milestone Feb 6, 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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/kubevirt Related to kubevirt-plugin lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants