-
Notifications
You must be signed in to change notification settings - Fork 32
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
RHSTOR-6968: Disaster recovery UI for Kubevirt VM - managed application #1856
base: master
Are you sure you want to change the base?
RHSTOR-6968: Disaster recovery UI for Kubevirt VM - managed application #1856
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GowthamShanmugam 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 |
b52301d
to
963f3ca
Compare
963f3ca
to
064e1fd
Compare
@GowthamShanmugam: This pull request references RHSTOR-6968 which is a valid jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
Signed-off-by: Gowtham Shanmugasundaram <[email protected]>
064e1fd
to
aec7705
Compare
@GowthamShanmugam: The following test failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
|
||
const getGVK = (resource: K8sResourceCommon) => | ||
resource?.['apigroup'] | ||
? // ACM search API compatibile fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? // ACM search API compatibile fields | |
? // ACM search API compatible fields |
export const VirtualMachineModel: K8sModel = { | ||
label: 'VirtualMachine', | ||
labelPlural: 'VirtualMachines', | ||
apiVersion: 'v1', | ||
apiGroup: 'kubevirt.io', | ||
plural: 'virtualmachines', | ||
abbr: 'VM', | ||
namespaced: true, | ||
kind: 'VirtualMachine', | ||
crd: true, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is VM a new CRD, but in ACM it's represented as either AppSet or Subscription ??
isOpen: boolean; | ||
close?: () => void; | ||
close: () => void; | ||
// ACM search API compatibile field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ACM search API compatibile field | |
// ACM search API compatible field |
}); | ||
return [...acc, ...filteredLabels]; | ||
}, []) || []; | ||
searchResult?.data.searchResult?.[0]?.related?.[0]?.items?.reduce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this related
change backward compatible with older version of ACM (as per our support matrix) ??
Meaning, say ODF 4.19 is running on older ACM version which is supported as per our support matrix, but that ACM version do not add/support related
to the resultant object.
@GowthamShanmugam: This pull request references RHSTOR-6968 which is a valid jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
[] | ||
); | ||
|
||
const applicaiton = applicationInfo as ApplicationType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const applicaiton = applicationInfo as ApplicationType; | |
const application = applicationInfo as ApplicationType; |
if (state.modalViewContext === ModalViewContext.ASSIGN_POLICY_VIEW) { | ||
return ( | ||
<AssignPolicyView | ||
applicaitonInfo={applicaiton} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applicaitonInfo={applicaiton} | |
applicationInfo={application} |
isSubscriptionAppType={ | ||
applicaiton?.type === DRApplication.SUBSCRIPTION | ||
} | ||
unProtectedPlacementCount={applicaiton?.placements?.length} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unProtectedPlacementCount={applicaiton?.placements?.length} | |
unprotectedPlacementCount={application?.placements?.length} |
import { ModalViewContext } from './utils/reducer'; | ||
|
||
const getGVK = (resource: K8sResourceCommon) => | ||
resource?.['apigroup'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what you are trying to do here. K8sResourceCommon
does not have a apiGroup
field. And are you using object notation to skip ts checks?
const getGVK = (resource: K8sResourceCommon) => | ||
resource?.['apigroup'] | ||
? // ACM search API compatibile fields | ||
referenceFor(resource['apigroup'])(resource['apiversion'])(resource.kind) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage of this is wrong if the input object is of type K8sResourceCommon
. referenceFor
will give you a GVK literal with a /
.
/> | ||
); | ||
} | ||
// TODO: Add support for discovered application type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to be addressed in a follow-up PR, right?
ACM custom extension: stolostron/console#4252
Existing Flow:
The parser always triggers the modal, even while the watcher is fetching data, displaying it with a loading: false argument.
Problem in existing flow for VM: (Delay in modal loading)
The application parser is determined only after the VM parser identifies the appropriate parser to call. This causes a delay in modal loading, making the modal appear a few seconds after the user clicks the button.
New Flow:
The modal will always load, while the modal body will be rendered based on the parsers.