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 1822325: StartMaintenanceModal - Fetch CephCluster resources only when ceph functionality is available #5029
Bug 1822325: StartMaintenanceModal - Fetch CephCluster resources only when ceph functionality is available #5029
Conversation
@jtomasek: This pull request references Bugzilla bug 1822325, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
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 kubernetes/test-infra repository. |
cephClusterHealthy: !cephCluster || _.get(cephCluster, 'status.health') === 'OK', | ||
}; | ||
}; | ||
type StartNodeMaintenanceModalFirehoseProps = Diff< |
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.
you could use useK8sWatchResource
hook in StartNodeMaintenanceModal
and get rid of this component
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.
yep, I'll do that as a follow up, to keep the 4.4 backport simple
close, | ||
cancel, | ||
} = props; | ||
const StartNodeMaintenanceModal = withHandlePromise((props: StartNodeMaintenanceModalProps) => { |
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 StartNodeMaintenanceModal = withHandlePromise((props: StartNodeMaintenanceModalProps) => { | |
const StartNodeMaintenanceModal = withHandlePromise<StartNodeMaintenanceModalProps>((props) => { |
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.
Done
@@ -32,6 +35,9 @@ const StartNodeMaintenanceModal = withHandlePromise((props: NodeMaintenanceModal | |||
return handlePromise(promise).then(close); | |||
}; | |||
|
|||
const cephCluster = _.get(cephClusters, 'data.0'); |
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 whole ceph part should be contributed by ceph plugin
@@ -32,6 +35,9 @@ const StartNodeMaintenanceModal = withHandlePromise((props: NodeMaintenanceModal | |||
return handlePromise(promise).then(close); | |||
}; | |||
|
|||
const cephCluster = _.get(cephClusters, 'data.0'); | |||
const cephClusterHealthy = !cephCluster || _.get(cephCluster, 'status.health') === 'OK'; |
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.
all _.get
usages can be replaced by optional chaining
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.
Done
2190d77
to
6f4d051
Compare
/lgtm |
6f4d051
to
b94e068
Compare
/lgtm |
b94e068
to
4380322
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jtomasek, rawagner 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 |
@jtomasek: All pull requests linked via external trackers have merged: openshift/console#5029. Bugzilla bug 1822325 has been moved to the MODIFIED state. 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 kubernetes/test-infra repository. |
/cherrypick release-4.4 |
@jtomasek: #5029 failed to apply on top of branch "release-4.4":
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 kubernetes/test-infra repository. |
No description provided.