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: 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 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. |
@@ -105,7 +105,7 @@ const PVCSummary: React.FC<PVCSummaryProps> = ({ persistentVolumeClaim }) => { | |||
</dd> | |||
<dt>{t('console-app~Status')}</dt> | |||
<dd> | |||
<PVCStatus pvc={persistentVolumeClaim} /> | |||
<PVCStatus {...persistentVolumeClaim} /> |
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 this change needed? It seems better to pass the PVC object as a single prop.
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 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}`, |
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 redirectTo
needed? It looks like we changed the default behavior to go to the list page now.
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.
Avoid building paths manually. Use one of the helpers instead.
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
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.
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.
Avoid building paths manually. Use one of the helpers instead.
Noted. Thanks
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
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} /> |
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.
Again, I prefer passing the PVC object as a prop. It's unclear why this was 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.
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} |
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 be passing a react component as a value for this prop. getResourceStatus
should return 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.
We shouldn't be passing a react component as a value for this prop.
getResourceStatus
should return a string.
Will address. Thanks.
209fb97
to
ae7c789
Compare
/bugzilla refresh |
@cyril-ui-developer: This pull request references Bugzilla bug 1981272, which is invalid:
Comment 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. |
/bugzilla refresh |
@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
Requesting review from QA contact: 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. |
@spadgett Updated! Thanks. |
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.
Thanks @cyril-ui-developer, this looks cleaner
@@ -72,6 +79,8 @@ const DeletePVCModal = withHandlePromise<DeletePVCModalProps>((props) => { | |||
|
|||
export type DeletePVCModalProps = { | |||
pvc: PersistentVolumeClaimKind; | |||
redirectTo?: 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.
It looks like this prop is no longer used and can be removed from the types?
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.
It looks like this prop is no longer used and can be removed from the types?
@spadgett Updated.
ae7c789
to
d7788d2
Compare
@cyril-ui-developer: This pull request references Bugzilla bug 1981272, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
@cyril-ui-developer: This pull request references Bugzilla bug 1981272, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
@@ -72,6 +79,7 @@ const DeletePVCModal = withHandlePromise<DeletePVCModalProps>((props) => { | |||
|
|||
export type DeletePVCModalProps = { | |||
pvc: PersistentVolumeClaimKind; | |||
kind: K8sKind; |
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 always be PersistentVolumeClaimModel
right? Do we need to pass kind
as a prop?
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 always be
PersistentVolumeClaimModel
right? Do we need to passkind
as a prop?
Yes, it will. Oh I see! No.
Will use PersistentVolumeClaimModel
instead of passing kind
for resourceListPathFromModel
method.
Thanks for the catch :)
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 always be
PersistentVolumeClaimModel
right? Do we need to passkind
as a prop?
Updated.
d7788d2
to
1c0a32b
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.
/lgtm
Thanks @cyril-ui-developer 👍
[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 |
/retest |
1 similar comment
/retest |
@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:
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. |
/assign @spadgett