dsccommunity / StorageDsc

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

DSC_Disk: Add dev drive creation support to disk resource #278

Closed bbonaby closed 10 months ago

bbonaby commented 11 months ago

Pull Request (PR) description

This PR adds Dev Drive creation support and the ability to explicitly use unallocated space to create a new partition even when there is a partition with the same size as the one the user enters in.

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov[bot] commented 11 months ago

Codecov Report

Merging #278 (c491047) into main (4a9e4fa) will decrease coverage by 1%. Report is 1 commits behind head on main. The diff coverage is 94%.

Impacted file tree graph

@@         Coverage Diff          @@
##           main   #278    +/-   ##
====================================
- Coverage    95%    95%    -1%     
====================================
  Files         7      7            
  Lines       882   1025   +143     
====================================
+ Hits        842    977   +135     
- Misses       40     48     +8     
Files Coverage Δ
source/DSCResources/DSC_Disk/DSC_Disk.psm1 98% <99%> (+<1%) :arrow_up:
...e/Modules/StorageDsc.Common/StorageDsc.Common.psm1 91% <82%> (-9%) :arrow_down:
bbonaby commented 11 months ago

@PlagueHO any update on this and #279 ?

bbonaby commented 11 months ago

Thanks @PlagueHO I'll update the PR based on your suggestions

PlagueHO commented 10 months ago

Sorry about the delay @bbonaby - I'll get back to your comments in the weekend.

bbonaby commented 10 months ago

Hey @PlagueHO I plan on updating this PR today. If possible would you be able to hold off until I update it? I've gotten rid of the 'UseUnallocatedSpace' and would like you to take a look at a different approach I did without needing that flag. Thanks

bbonaby commented 10 months ago

@PlagueHO any update on this? Thanks

PlagueHO commented 10 months ago

Hi @bbonaby - apologies, day job has been taking up all my bandwidth. Planning to have time for this tomorrow night.

bbonaby commented 10 months ago

Thanks @PlagueHO I updated the PR and addressed your comments.

bbonaby commented 10 months ago

source/DSCResources/DSC_Disk/DSC_Disk.psm1 line 1099 at r4 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Should we separate this out into a common function? E.g., a "Compare-PartitionSizeUsingGB" - or something? This is also because the same functionality is used in `Set` as well.

I created a generic function called Compare-SizeUsingGB so we could reuse the same functionality here. Thanks

bbonaby commented 10 months ago

source/DSCResources/DSC_Disk/DSC_Disk.psm1 line 402 at r4 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Can this be?

Done.

bbonaby commented 10 months ago

@PlagueHO Thanks for the help with this, if you're all good with these latest changes, would it be possible to get this merged in today or tomorrow?