-
Notifications
You must be signed in to change notification settings - Fork 667
PVC clone workflow #3927
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
PVC clone workflow #3927
Conversation
fb8cda7 to
baf07df
Compare
...end/packages/ceph-storage-plugin/src/components/modals/clone-pvc-modal/_clone-pvc-modal.scss
Outdated
Show resolved
Hide resolved
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.
standard spacings?? Maybe one from patternfly global css?
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.
ack
frontend/packages/ceph-storage-plugin/src/components/modals/clone-pvc-modal/clone-pvc-modal.tsx
Outdated
Show resolved
Hide resolved
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 there a reason why you are input Form from patternfly?
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 didn't get you. Can you explain a bit?
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.
Why you are not using the Form component from PF?
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.
not required. handlePromiseProps should have this
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.
ack
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.
use PersistentVolumeClaimModel.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.
ack
frontend/packages/ceph-storage-plugin/src/components/modals/clone-pvc-modal/clone-pvc-modal.tsx
Outdated
Show resolved
Hide resolved
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.
| .then((m) => m.clonePVCModal(clusterObject)) | |
| .then((m) => m.default(clusterObject)) |
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.
ack
...end/packages/ceph-storage-plugin/src/components/modals/clone-pvc-modal/_clone-pvc-modal.scss
Outdated
Show resolved
Hide resolved
98a3cb6 to
c6fb0ce
Compare
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.
| prometheusResults, | |
| prometheusResults, | |
| errorMessage, | |
| inProgress |
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.
| setProgress(false); | |
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.
why?
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.
handlePromise does it internally
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.
Remove these two.
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.
Its used in the ModalSubmitFooter 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.
handlePromiseProps gives your these values. You don't need to handle them.
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.
Yes, thats what this HOC does, it handles all for you.
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.
| setProgress(true); |
not required
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.
why?
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.
isRequired should be enough
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.
| kind?: any; | |
| kind?: any; |
why any? Isn't kind a string?
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.
Perhaps use ModalComponentProps??
c6fb0ce to
f89af96
Compare
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.
| export const ClonePVCModal = withHandlePromise((props: ClonePVCModalProps) => { | |
| const ClonePVCModal = withHandlePromise((props: ClonePVCModalProps) => { |
|
/assign @spadgett |
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.
withDashboardResources should not be used for non-dashboard components
...end/packages/ceph-storage-plugin/src/components/modals/clone-pvc-modal/_clone-pvc-modal.scss
Outdated
Show resolved
Hide resolved
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.
Nit: Either freeze the object or capitalize the name, to distinguish it as a constant map.
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.
Nit: you might forget to use PersistentVolumeClaimModel.kind here.
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.
Yes, thats what this HOC does, it handles all for you.
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.
What if there is an error ? I think you should handle that otherwise it will be blank.
Also, you might need to add loading state too.
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.
add types
frontend/packages/ceph-storage-plugin/src/components/modals/clone-pvc-modal/clone-pvc-modal.tsx
Outdated
Show resolved
Hide resolved
f2f2fdf to
c212bd1
Compare
|
/test analyze |
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.
We shouldn't need the nesting here since we're using BEM
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.
Why do we need to adjust the font-weight?
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.
these texts(pvc details title) needs to be bold as per UXD. Hence, I have used this.
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.
If resource is never null, _.get isn't needed.
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.
Why is as needed? Is the return type wrong in usePrometheusPoll?
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.
Consistently use the values from the PersistentVolumeClaimModel if you're going to use it.
| apiVersion: 'v1', | |
| apiVersion: PersistentVolumeClaimModel.apiVersion, |
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 shouldn't need _.get
frontend/packages/ceph-storage-plugin/src/components/modals/clone-pvc-modal/clone-pvc-modal.tsx
Outdated
Show resolved
Hide resolved
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 [buttonDisabled, setButton] = React.useState(false); | |
| const [submitDisabled, setSubmitDisabled] = React.useState(false); |
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 helper just wraps setClonePVCName with no other changes. Just call setClonePVCName directly
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.
We should add an RBAC check
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 should be
| type: 'OCSKebabActions', | |
| type: 'PersistentVolumeClaim/Action', |
to match ClusterServiceVersion/Action (with a similar variable names throughout)
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 will address the RBAC feature in a separate PR as I want to get this PR merged soon as this is dependent for snapshot PR.
|
@gnehapk Can you add a screenshot? Thanks! |
c212bd1 to
874b3ae
Compare
|
/test analyze |
1 similar comment
|
/test analyze |
|
/test e2e-gcp-console |
|
/test analyze |
b3bf856 to
42df545
Compare
|
/test analyze |
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.
name should not be here since you're creating a new resource with a different name
42df545 to
8d38c00
Compare
|
@spadgett addressed review comments, please review. |
|
/retest |
spadgett
left a comment
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.
/approve
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, cloudbehl, gnehapk, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/hold |
|
/hold cancel |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Will add the feature flag(ceph) with my extension point in a separate PR, once #3383 gets merged as this PR is adding the support for adding feature flag to extension.