[release-4.20] OCPBUGS-82012: Fix VolumeSnapshot and VolumeSnapshotContent tables sorting#16261
[release-4.20] OCPBUGS-82012: Fix VolumeSnapshot and VolumeSnapshotContent tables sorting#16261stefanonardo wants to merge 1 commit intoopenshift:release-4.20from
Conversation
|
@stefanonardo: This pull request references Jira Issue OCPBUGS-81308, which is invalid:
Comment 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. |
|
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: Organization UI Review profile: CHILL Plan: Pro 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-82012, which is invalid:
Comment 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-82012, which is invalid:
Comment 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. |
|
/assign @cajieh |
8c87219 to
cb0dfb4
Compare
|
/lgtm |
|
/retest |
|
[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 |
The Status, Size, and Source columns in the VolumeSnapshot table and Status and Size columns in VolumeSnapshotContent table were not sorting correctly because they referenced non-existent sort field names instead of using the sorts registry.
cb0dfb4 to
be45cea
Compare
|
New changes are detected. LGTM label has been removed. |
|
@stefanonardo: The following tests failed, say
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. |
Summary
Cherry-pick of #16216.
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