dsccommunity / StorageDsc

DSC resource module is used to manage storage on Windows Servers.
https://dsccommunity.org
MIT License
66 stars 51 forks source link

OpticalDiskDrive prevent exception on unmanageable device condition - Fixes #289 #290

Closed PlagueHO closed 2 months ago

PlagueHO commented 3 months ago

Pull Request (PR) description

This PR prevents an exception from occurring for some ODDs when the device is not mounted, but appears with a DriveLetter as 'cdRom0' or some other value that is not a volume{guid} pattern.

Instead, a warning is reported and the device is reported as unmanageable.

This also updates the pipeline files to latest DSC community pattern and sampler tasks.  

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 95%. Comparing base (a87725b) to head (ce569c5). Report is 2 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/290/graphs/tree.svg?width=650&height=150&src=pr&token=RLLNitScbf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity)](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/290?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) ```diff @@ Coverage Diff @@ ## main #290 +/- ## =================================== Coverage 95% 95% =================================== Files 7 7 Lines 1025 1048 +23 =================================== + Hits 977 999 +22 - Misses 48 49 +1 ``` | [Files](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/290?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | Coverage Δ | | |---|---|---| | [...calDiskDriveLetter/DSC\_OpticalDiskDriveLetter.psm1](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/290?src=pr&el=tree&filepath=source%2FDSCResources%2FDSC_OpticalDiskDriveLetter%2FDSC_OpticalDiskDriveLetter.psm1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL0RTQ1Jlc291cmNlcy9EU0NfT3B0aWNhbERpc2tEcml2ZUxldHRlci9EU0NfT3B0aWNhbERpc2tEcml2ZUxldHRlci5wc20x) | `93% <93%> (+<1%)` | :arrow_up: |
PlagueHO commented 3 months ago

Hi @johlju - would you mind reviewing when you get time? Minor bug fix, but updated all the pipeline files to copy latest patterns (nabbed from SQLServerDsc :grinning: )