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 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field #9569

Conversation

cyril-ui-developer
Copy link
Contributor

@cyril-ui-developer cyril-ui-developer commented Jul 21, 2021

/assign @spadgett

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 21, 2021

@cyril-ui-developer: An error was encountered searching for bug 1981272 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. response code 502 not 200

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field

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.

@cyril-ui-developer
Copy link
Contributor Author

Before:
Screen Shot 2021-07-21 at 10 17 31 AM

After:
Screen Shot 2021-07-21 at 10 17 10 AM

@openshift-ci openshift-ci bot requested review from spadgett and zherman0 July 21, 2021 14:39
@openshift-ci openshift-ci bot added the component/core Related to console core functionality label Jul 21, 2021
@@ -105,7 +105,7 @@ const PVCSummary: React.FC<PVCSummaryProps> = ({ persistentVolumeClaim }) => {
</dd>
<dt>{t('console-app~Status')}</dt>
<dd>
<PVCStatus pvc={persistentVolumeClaim} />
<PVCStatus {...persistentVolumeClaim} />
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 this change needed? It seems better to pass the PVC object as a single prop.

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 is this change needed? It seems better to pass the PVC object as a single prop.

@spadgett I changed it because the DetailsPage component getResourceStatus wouldn't accept PVCStatus pvc props object -{pvc:obj}. It's expecting {obj}.
However since the getResourceStatus returns string, I will revert it, then find another way to get status for getResourceStatus.

pvc: obj,
kind,
pvc,
redirectTo: `/k8s/ns/${pvc.metadata.namespace}/${PersistentVolumeClaimModel.plural}`,
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 redirectTo needed? It looks like we changed the default behavior to go to the list page now.

Copy link
Member

Choose a reason for hiding this comment

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

Avoid building paths manually. Use one of the helpers instead.

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 is redirectTo needed? It looks like we changed the default behavior to go to the list page now.

@spadgett I tested in 4.9, it is not redirecting after delete action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Avoid building paths manually. Use one of the helpers instead.

Noted. Thanks

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 is redirectTo needed? It looks like we changed the default behavior to go to the list page now.

@spadgett I tested in 4.9, it is not redirecting after delete action.

The PVC is not using the common delete modal that has redirect.

@@ -122,7 +124,7 @@ const PVCTableRow = connect(mapStateToProps)(({ obj, index, key, style, metrics
<ResourceLink kind="Namespace" name={namespace} title={namespace} />
</TableData>
<TableData className={tableColumnClasses[2]}>
<PVCStatus pvc={obj} />
<PVCStatus {...obj} />
Copy link
Member

Choose a reason for hiding this comment

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

Again, I prefer passing the PVC object as a prop. It's unclear why this was needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, I prefer passing the PVC object as a prop. It's unclear why this was needed.

Will address.

export const PersistentVolumeClaimsDetailsPage = (props) => (
<DetailsPage
{...props}
getResourceStatus={PVCStatus}
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 be passing a react component as a value for this prop. getResourceStatus should return a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We shouldn't be passing a react component as a value for this prop. getResourceStatus should return a string.

Will address. Thanks.

@cyril-ui-developer cyril-ui-developer force-pushed the deleting-pvc-inside-pvc-page-the-status branch from 209fb97 to ae7c789 Compare July 21, 2021 19:22
@cyril-ui-developer
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci openshift-ci bot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Jul 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2021

@cyril-ui-developer: This pull request references Bugzilla bug 1981272, which is invalid:

  • expected the bug to target the "4.9.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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 openshift-ci bot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jul 26, 2021
@cyril-ui-developer
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jul 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2021

@cyril-ui-developer: This pull request references Bugzilla bug 1981272, 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.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

/bugzilla refresh

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 openshift-ci bot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jul 26, 2021
@openshift-ci openshift-ci bot requested a review from yapei July 26, 2021 12:47
@cyril-ui-developer
Copy link
Contributor Author

@spadgett Updated! Thanks.

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.

Thanks @cyril-ui-developer, this looks cleaner

@@ -72,6 +79,8 @@ const DeletePVCModal = withHandlePromise<DeletePVCModalProps>((props) => {

export type DeletePVCModalProps = {
pvc: PersistentVolumeClaimKind;
redirectTo?: string;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this prop is no longer used and can be removed from the types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like this prop is no longer used and can be removed from the types?

@spadgett Updated.

@cyril-ui-developer cyril-ui-developer force-pushed the deleting-pvc-inside-pvc-page-the-status branch from ae7c789 to d7788d2 Compare July 26, 2021 17:41
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2021

@cyril-ui-developer: This pull request references Bugzilla bug 1981272, which is valid.

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

Requesting review from QA contact:
/cc @yapei

In response to this:

Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field

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.

@cyril-ui-developer cyril-ui-developer changed the title Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field [WIP] Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field Jul 27, 2021
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 27, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2021

@cyril-ui-developer: This pull request references Bugzilla bug 1981272, which is valid.

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

Requesting review from QA contact:
/cc @yapei

In response to this:

[WIP] Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field

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.

@cyril-ui-developer cyril-ui-developer changed the title [WIP] Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field Jul 27, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 27, 2021
@@ -72,6 +79,7 @@ const DeletePVCModal = withHandlePromise<DeletePVCModalProps>((props) => {

export type DeletePVCModalProps = {
pvc: PersistentVolumeClaimKind;
kind: K8sKind;
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 always be PersistentVolumeClaimModel right? Do we need to pass kind as a prop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should always be PersistentVolumeClaimModel right? Do we need to pass kind as a prop?

Yes, it will. Oh I see! No.
Will use PersistentVolumeClaimModel instead of passing kind for resourceListPathFromModel method.
Thanks for the catch :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should always be PersistentVolumeClaimModel right? Do we need to pass kind as a prop?

Updated.

@cyril-ui-developer cyril-ui-developer force-pushed the deleting-pvc-inside-pvc-page-the-status branch from d7788d2 to 1c0a32b Compare July 28, 2021 13:27
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

Thanks @cyril-ui-developer 👍

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 28, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cyril-ui-developer, 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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2021
@spadgett
Copy link
Member

/retest

1 similar comment
@cyril-ui-developer
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 1de1ef3 into openshift:master Jul 29, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 29, 2021

@cyril-ui-developer: All pull requests linked via external trackers have merged:

Bugzilla bug 1981272 has been moved to the MODIFIED state.

In response to this:

Bug 1981272: When deleting PVC inside PVC page the status in the heading doesn't match the status field

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.9 milestone Aug 30, 2021
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-medium Referenced Bugzilla bug's severity is medium 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

3 participants