Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AlexKarpov98
Copy link
Contributor

No description provided.

@AlexKarpov98 AlexKarpov98 self-assigned this Nov 3, 2025
@bugclerk bugclerk changed the title NAS-137713: Containers Devices API updates & Cleanup NAS-137713 / None / Containers Devices API updates & Cleanup Nov 3, 2025
@bugclerk
Copy link
Contributor

bugclerk commented Nov 3, 2025

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 91.15646% with 13 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (NAS-137713@8cc7dae). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on NAS-137713.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...pages/instances/utils/storage-device-icon.utils.ts 80.00% 5 Missing ⚠️
...nents/common/utils/get-device-description.utils.ts 85.00% 3 Missing ⚠️
...pages/instances/utils/storage-device-validators.ts 89.28% 3 Missing ⚠️
...vice-actions-menu/device-actions-menu.component.ts 90.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             NAS-137713   #12768   +/-   ##
=============================================
  Coverage              ?   86.14%           
=============================================
  Files                 ?     1812           
  Lines                 ?    67207           
  Branches              ?     8225           
=============================================
  Hits                  ?    57897           
  Misses                ?     9310           
  Partials              ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Removed DISK and RAW device types from enum and interfaces
- Simplified instance-disk-form to only support filesystem devices
- Removed storage-device-info utils (DISK/RAW only)
- Updated device-type-badge, device-actions-menu, and device-description utils
- Updated all tests to reflect new device structure
- Added deviceDescription computed signal using getDeviceDescription util
- Replaced device().description with deviceDescription() in template
- Updated all ixTest attributes and aria-label to use new computed signal
- Added ContainerDeviceType import to instance-disk-form component
- Replaced 'FILESYSTEM' string with ContainerDeviceType.Filesystem
- Updated test expectations to use enum value
- Changed dtype in ContainerFilesystemDevice from 'FILESYSTEM' to ContainerDeviceType.Filesystem
- Changed dtype in ContainerNicDevice from 'NIC' to ContainerDeviceType.Nic
- Changed dtype in ContainerUsbDevice from 'USB' to ContainerDeviceType.Usb
- Added exhaustiveness checking in getDeviceDescription with never type
- Removed unused containerDeviceTypeLabels import
- Updated instance-disks to filter only Filesystem devices (removed DISK/RAW)
- Updated instance-usb-devices to use direct equality check instead of includes()
- Fixed track keys in templates: changed from device.name to device.id
- Updated USB device test mocks to match new interface (usb.vendor_id/product_id)
- Fixed test expectations to match new device description format (USB xxxx:yyyy)
- Fixed track key in instance-nics template: changed from device.name to device.id
- Updated NIC device test mocks to match new ContainerNicDevice interface
- Added required fields: id, trust_guest_rx_filters, nic_attach, mac
- Updated test expectations to use nic_attach instead of name (br0/br1)
- Removed blockDeviceNameValidator (for DISK devices)
- Removed diskPathValidator (for DISK devices)
- Removed rawFilePathValidator (for RAW devices)
- Removed corresponding tests for these validators
- Removed helptext: deviceTypes.diskTooltip and deviceTypes.rawTooltip
- Removed helptext: deviceBadgeTooltips.disk and deviceBadgeTooltips.raw
- Removed validator messages: blockDeviceName, diskPathMustStartWithDevZvol, rawFilePathMustStartWithMnt
- Kept only validators/helptext for FILESYSTEM devices (containerPathValidator, poolPathValidator)
Removed unused helptext related to removed DISK/RAW device types:
- diskFormOptions (virtio, ahci, native, threads, ioUring)
- ioBusTooltip
- bootFromTooltip
Removed unused helptext items that are not referenced anywhere:
- disksLabel, disksSourceLabel, disksDestinationLabel, disksDestinationTooltip
- deviceDescriptions.unknownPath

Components use inline translations instead of these helptext constants.
The filesystemTooltip in deviceTypes object is not used anywhere.
Device tooltips are provided by deviceBadgeTooltips instead.
Fixed 4 test suites that were failing after removing DISK/RAW device types:

1. virtualization-instances.store.spec.ts: Fixed device mocks to use id and dtype
2. virtualization-config.store.spec.ts: Updated subscription expectation from 'virt.global.config' to 'lxc.config'
3. add-usb-device-menu.component.spec.ts: Added missing 'device' property to USB device mock
4. get-device-description.utilts.spec.ts: Completely rewrote tests to only cover FILESYSTEM, NIC, and USB devices

All 32 tests now passing.
@AlexKarpov98 AlexKarpov98 requested a review from aervin November 11, 2025 07:46
@AlexKarpov98 AlexKarpov98 marked this pull request as ready for review November 11, 2025 15:28
@AlexKarpov98 AlexKarpov98 requested a review from a team as a code owner November 11, 2025 15:28
@AlexKarpov98 AlexKarpov98 requested review from william-gr and removed request for a team November 11, 2025 15:28
@AlexKarpov98 AlexKarpov98 merged commit ca2ec3a into NAS-137713 Nov 11, 2025
10 checks passed
@AlexKarpov98 AlexKarpov98 deleted the NAS-137713-devices branch November 11, 2025 15:28
@bugclerk
Copy link
Contributor

Not updating JIRA ticket https://ixsystems.atlassian.net/browse/NAS-137713 target versions as no JIRA version corresponds to this PR

@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Nov 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants