Skip to content

Conversation

@gnehapk
Copy link
Contributor

@gnehapk gnehapk commented Jan 13, 2020

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.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. component/ceph Related to ceph-storage-plugin component/core Related to console core functionality component/sdk Related to console-plugin-sdk labels Jan 13, 2020
@gnehapk gnehapk changed the title [WIP] PVC clone workflow PVC clone workflow Jan 14, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2020
@gnehapk
Copy link
Contributor Author

gnehapk commented Jan 14, 2020

@rawagner @bipuladh @afreen23 @a2batic Please review.

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Contributor

@bipuladh bipuladh Jan 14, 2020

Choose a reason for hiding this comment

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

use PersistentVolumeClaimModel.kind

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.then((m) => m.clonePVCModal(clusterObject))
.then((m) => m.default(clusterObject))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

@gnehapk gnehapk force-pushed the clone-workflow branch 2 times, most recently from 98a3cb6 to c6fb0ce Compare January 14, 2020 10:11
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
prometheusResults,
prometheusResults,
errorMessage,
inProgress

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
setProgress(false);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why?

Copy link
Contributor

Choose a reason for hiding this comment

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

handlePromise does it internally

Comment on lines 94 to 95
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove these two.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
setProgress(true);

not required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why?

Copy link
Contributor

Choose a reason for hiding this comment

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

isRequired should be enough

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kind?: any;
kind?: any;

why any? Isn't kind a string?

Comment on lines 187 to 188
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps use ModalComponentProps??

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export const ClonePVCModal = withHandlePromise((props: ClonePVCModalProps) => {
const ClonePVCModal = withHandlePromise((props: ClonePVCModalProps) => {

@gnehapk
Copy link
Contributor Author

gnehapk commented Jan 15, 2020

/assign @spadgett

Copy link
Contributor

@rawagner rawagner Jan 15, 2020

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

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.

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.

Comment on lines 94 to 95

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.

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.

Choose a reason for hiding this comment

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

add types

@gnehapk gnehapk force-pushed the clone-workflow branch 2 times, most recently from f2f2fdf to c212bd1 Compare January 15, 2020 14:52
@gnehapk
Copy link
Contributor Author

gnehapk commented Jan 15, 2020

/test analyze

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 need the nesting here since we're using BEM

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

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.

Suggested change
apiVersion: 'v1',
apiVersion: PersistentVolumeClaimModel.apiVersion,

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const [buttonDisabled, setButton] = React.useState(false);
const [submitDisabled, setSubmitDisabled] = React.useState(false);

Copy link
Member

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

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

This should be

Suggested change
type: 'OCSKebabActions',
type: 'PersistentVolumeClaim/Action',

to match ClusterServiceVersion/Action (with a similar variable names throughout)

Copy link
Contributor Author

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.

@spadgett
Copy link
Member

@gnehapk Can you add a screenshot? Thanks!

@a2batic
Copy link
Contributor

a2batic commented Jan 23, 2020

/test analyze

1 similar comment
@gnehapk
Copy link
Contributor Author

gnehapk commented Jan 23, 2020

/test analyze

@gnehapk
Copy link
Contributor Author

gnehapk commented Jan 23, 2020

/test e2e-gcp-console

@cloudbehl
Copy link
Contributor

/test analyze
/test e2e-gcp-console

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2020
@cloudbehl
Copy link
Contributor

@gnehapk @a2batic can you remove the conflicts.

@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2020
@a2batic
Copy link
Contributor

a2batic commented Jan 24, 2020

/test analyze

Copy link
Member

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

@a2batic
Copy link
Contributor

a2batic commented Jan 24, 2020

@spadgett addressed review comments, please review.

@a2batic
Copy link
Contributor

a2batic commented Jan 24, 2020

/retest

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2020
@spadgett spadgett added this to the v4.4 milestone Jan 24, 2020
@openshift-ci-robot
Copy link
Contributor

[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

Details 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 24, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@spadgett
Copy link
Member

/hold
for merge queue fix #4065

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2020
@spadgett
Copy link
Member

/hold cancel
/retest

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

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. component/ceph Related to ceph-storage-plugin component/core Related to console core functionality component/sdk Related to console-plugin-sdk lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants