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 1871736: Fixes clone for block mode PVCs #6630

Merged
merged 1 commit into from Sep 18, 2020

Conversation

a2batic
Copy link
Contributor

@a2batic a2batic commented Sep 15, 2020

  1. Replace the constants with shared constants.
  2. Sets volumeMode while creating clone
  3. Disable the clone and snapshot actions for unbound PVCs and restore action for non-ready snapshots
    Screenshot from 2020-09-18 14-11-01
    Screenshot from 2020-09-18 14-10-49

Signed-off-by: Kanika Murarka kmurarka@redhat.com

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Sep 15, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1871736, 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
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871736: Fixes clone for block mode PVCs

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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 15, 2020
@openshift-ci-robot openshift-ci-robot added the component/core Related to console core functionality label Sep 15, 2020
@a2batic
Copy link
Contributor Author

a2batic commented Sep 15, 2020

/assign @cloudbehl @gnehapk

@spadgett
Copy link
Member

We typically disable the action in the action menu instead of letting users open the dialog and immediately see an error.

@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1871736, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871736: Fixes clone for block mode PVCs

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1871736, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871736: Fixes clone for block mode PVCs

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
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1871736, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871736: Fixes clone for block mode PVCs

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.

@@ -54,6 +43,9 @@ const ClonePVCModal = withHandlePromise((props: ClonePVCModalProps) => {
const [clonePVCName, setClonePVCName] = React.useState(`${pvcName}-clone`);
const [requestedSize, setRequestedSize] = React.useState(defaultSize[0] || '');
const [requestedUnit, setRequestedUnit] = React.useState(defaultSize[1] || 'Gi');
const accessModes = accessModeRadios.find(
Copy link
Contributor

Choose a reason for hiding this comment

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

accessModes -> accessMode

@@ -164,7 +157,7 @@ const ClonePVCModal = withHandlePromise((props: ClonePVCModalProps) => {
<div>
<div>
<p className="co-clone-pvc-modal__pvc-details">Access Mode</p>
<p>{accessModeLabels[resource.spec.accessModes]}</p>
<p>{accessModes.title}</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

what happen when accessMode is undefined i.e. the search accessMode is not present?

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, I have handled it

@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1871736, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871736: Fixes clone for block mode PVCs

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.

@a2batic
Copy link
Contributor Author

a2batic commented Sep 16, 2020

/assign @spadgett

@a2batic
Copy link
Contributor Author

a2batic commented Sep 16, 2020

/test e2e-gcp-console

@a2batic
Copy link
Contributor Author

a2batic commented Sep 16, 2020

/test e2e-gcp-console

1 similar comment
@a2batic
Copy link
Contributor Author

a2batic commented Sep 16, 2020

/test e2e-gcp-console

@@ -350,6 +354,8 @@ const kebabFactory: KebabFactory = {
}),
RestorePVC: (kind, obj) => ({
label: 'Restore as new PVC',
isDisabled: obj?.status?.phase !== 'Ready',
tooltip: obj?.status?.phase !== 'Ready' ? 'Snapshot is not Ready' : '',
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
tooltip: obj?.status?.phase !== 'Ready' ? 'Snapshot is not Ready' : '',
tooltip: obj?.status?.phase !== 'Ready' ? 'Volume Snapshot is not Ready' : '',

href: `${resourceObjPath(obj, kind.crd ? referenceForModel(kind) : kind.kind)}/${
VolumeSnapshotModel.plural
}/~new/form`,
accessReview: asAccessReview(kind, obj, 'create'),
}),
ClonePVC: (kind, obj) => ({
label: 'Clone PVC',
isDisabled: obj?.status?.phase !== 'Bound',
tooltip: obj?.status?.phase !== 'Bound' ? 'PVC is not bound' : '',
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
tooltip: obj?.status?.phase !== 'Bound' ? 'PVC is not bound' : '',
tooltip: obj?.status?.phase !== 'Bound' ? 'PVC is not Bound' : '',

@@ -334,13 +334,17 @@ const kebabFactory: KebabFactory = {
}),
PVCSnapshot: (kind, obj) => ({
label: 'Create Snapshot',
isDisabled: obj?.status?.phase !== 'Bound',
tooltip: obj?.status?.phase !== 'Bound' ? 'PVC is not bound' : '',
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
tooltip: obj?.status?.phase !== 'Bound' ? 'PVC is not bound' : '',
tooltip: obj?.status?.phase !== 'Bound' ? 'PVC is not Bound' : '',

@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1871736, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1871736: Fixes clone for block mode PVCs

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.

@a2batic
Copy link
Contributor Author

a2batic commented Sep 18, 2020

@rawagner, please review/
/assign @rawagner

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.

/lgtm

@@ -75,7 +67,7 @@ const ClonePVCModal = withHandlePromise((props: ClonePVCModalProps) => {
const submit = (event: React.FormEvent<EventTarget>) => {
event.preventDefault();

const pvcCloneObj = {
const pvcCloneObj: PersistentVolumeClaimKind = {
Copy link
Member

Choose a reason for hiding this comment

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

👍

@@ -200,6 +200,8 @@ const CreateSnapshotForm = withHandlePromise<SnapshotResourceProps>((props) => {
});
};

const pvcFilter = (pvc: PersistentVolumeClaimKind) => pvc?.status?.phase === 'Bound';
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 pvcFilter = (pvc: PersistentVolumeClaimKind) => pvc?.status?.phase === 'Bound';
const isBound = (pvc: PersistentVolumeClaimKind) => pvc?.status?.phase === 'Bound';

@@ -231,6 +225,7 @@ const CreateSnapshotForm = withHandlePromise<SnapshotResourceProps>((props) => {
namespace={namespace}
onChange={handlePVCName}
selectedKey={pvcName}
dataFilter={pvcFilter}
Copy link
Member

Choose a reason for hiding this comment

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

👍

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 18, 2020
Signed-off-by: Kanika Murarka <kmurarka@redhat.com>
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 18, 2020
@a2batic
Copy link
Contributor Author

a2batic commented Sep 18, 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.

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a2batic, cloudbehl, spadgett

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

@openshift-merge-robot openshift-merge-robot merged commit 0901e45 into openshift:master Sep 18, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: All pull requests linked via external trackers have merged:

Bugzilla bug 1871736 has been moved to the MODIFIED state.

In response to this:

Bug 1871736: Fixes clone for block mode PVCs

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.6 milestone Sep 30, 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/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants