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

fix(PDiskSpaceDistribution): use only space severity for slots #2070

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Mar 31, 2025

Closes #2060

New logic:

  1. Slots are part of PDisk, they could be occupied by VDisks or not (empty slots)
  2. Slots and VDisks are different entities, slot is occupied by VDisk
  3. Slot is named by group ID and pool name, we don't know actual VDisk inside slot before hovering
  4. Slot and VDisk could have different statuses
Screenshot 2025-03-31 at 16 36 24

CI Results

Test Status: ✅ PASSED

📊 Full Report

Total Passed Failed Flaky Skipped
286 286 0 0 0

😟 No changes in tests. 😕

Bundle Size: ✅

Current: 83.25 MB | Main: 83.25 MB
Diff: +0.09 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@artemmufazalov artemmufazalov requested a review from Copilot March 31, 2025 14:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the severity calculation for VDisk slots in PDiskSpaceDistribution by using only the allocated space percent for severity, ignoring other VDisk statuses.

  • Updated the severity logic in src/store/reducers/pdisk/utils.ts to remove combination with other status values.
  • Adjusted tests in tests/preparePDiskDataResponse.test.ts to verify the new behavior and added an extra test to ensure VDisk statuses are ignored.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/store/reducers/pdisk/utils.ts Updated severity calculation logic and comments to use only space severity for VDisks.
src/store/reducers/pdisk/tests/preparePDiskDataResponse.test.ts Updated and added tests to align with the new severity calculation for VDisk slots.

@artemmufazalov artemmufazalov force-pushed the 2060-pdisk-distribution-only-space-statuses branch from 68f6288 to 443151b Compare March 31, 2025 14:12
@artemmufazalov artemmufazalov requested a review from Copilot March 31, 2025 14:12
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the severity computation for vDisk slots in PDiskSpaceDistribution by using only the space allocation percentage.

  • Removed the combined severity calculation in favor of using getSpaceSeverity exclusively for vDisk slots.
  • Updated tests to verify that vDisk severity is determined solely by allocated space.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/store/reducers/pdisk/utils.ts Updated vDisk severity calculation to rely solely on allocated space.
src/store/reducers/pdisk/tests/preparePDiskDataResponse.test.ts Adjusted tests to reflect the new severity logic for vDisk slots.

@artemmufazalov artemmufazalov marked this pull request as ready for review March 31, 2025 14:17
@artemmufazalov artemmufazalov added this pull request to the merge queue Apr 1, 2025
Merged via the queue into main with commit 4ea21a1 Apr 1, 2025
8 checks passed
@artemmufazalov artemmufazalov deleted the 2060-pdisk-distribution-only-space-statuses branch April 1, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

don't use VDisk statuses when displaying PDisk content
3 participants