[release-4.19] OCPBUGS-84271: Fix VolumeSnapshot and VolumeSnapshotContent table sorting#16335
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/jira refresh |
|
@stefanonardo: This pull request references Jira Issue OCPBUGS-84271, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@stefanonardo: This pull request references Jira Issue OCPBUGS-84271, which is valid. 7 validation(s) were run on this bug
DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
cbc601c to
2f4f5aa
Compare
|
/retest |
|
@stefanonardo: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
/verified by @cajieh |
|
@cajieh: This PR has been marked as verified by DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cajieh, stefanonardo 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 |
8a3969e
into
openshift:release-4.19
|
@stefanonardo: Jira Issue Verification Checks: Jira Issue OCPBUGS-84271 Jira Issue OCPBUGS-84271 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |



Summary
Cherry-pick of #16261.
restoreSizevaluesvolumeSnapshotStatusto shared location and renamed tosnapshotStatusProblem
The Status, Size, and Source columns in the VolumeSnapshot table and Status and Size columns in VolumeSnapshotContent table were not sorting correctly. The columns referenced non-existent sort field names (like
'volumeSnapshotSize') instead of using function wrappers with the sorts registry.Additionally, TypeScript types incorrectly defined
restoreSizeas a number for both VolumeSnapshot and VolumeSnapshotContent, when in reality VolumeSnapshot uses Kubernetes quantity strings (e.g.,"1Gi") and VolumeSnapshotContent uses integer bytes.Changes
Sorting fix:
(data, direction) => data.sort(sortResourceByValue(direction, sorts.functionName))volumeSnapshotStatus,volumeSnapshotSize,volumeSnapshotContentSize, andvolumeSnapshotSourceto the sorts registry intable.tsxVolumeSnapshot.status.restoreSizeas string andVolumeSnapshotContent.status.restoreSizeas numbersnapshotContentSize()utility function to handle VolumeSnapshotContent size sortinguseConsoleDataViewData.tsx(redundant string sort check that was never reached)Refactoring:
volumeSnapshotStatusfrom@console/app/src/statusto@console/shared/src/sorts/snapshotsnapshotStatusfor consistency with other snapshot utilities (snapshotSize,snapshotSource,snapshotContentSize)Test plan
🤖 Generated with Claude Code