Closed ralish closed 3 years ago
Anything I can do to help push this along?
Hey @ralish. Thanks for the PR. Just getting time to review it but I haven't forgotten about it.
@pauby: Anything I can do to help move this along?
@ralish Apologies for taking so long on this. Let me schedule some time this week to focus on reviewing it.
I've had a look at this (apologies again for the time it's taken). I think we're fixing the wrong thing. I don't think we should be removing the null / empty string validation from cChocoPackagelnstall but amending the cChocoPackageInstallerSet to not pass an empty $source?
I feel the unconditional nature of this you mention in your issue is what the actual problem is.
@pauby Its been a while since I looked into the issue and came up with the proposed fix so my memory is a bit hazy, but from a quick look at the proposed change & current source I think the reason I chose this approach is it's backwards compatible. Using this approach the issue is fixed immediately on updating the cChoco module, but changing the cChocoPackageInstallerSet
would mean having to recompile and redeploy all affected DSC configurations.
The Get-TargetResource
function only returns a hashtable with configuration information for each installed Choco app, so there shouldn't be any flow-on affects by loosening the parameter validation to match cChocoPackageInstallerSet
.
With any release of the module, recompiling and redeploying would be necessary.
Passing an empty source doesn't make sense and so I think we should fix that logic where it's broken.
OK sure. Do you want to make the change or rather I amend the PR?
If you're happy to amend the PR then go for it and I'll pull it in.
@pauby Done. Tested locally on a Windows Server 2012 R2 VM and all seems to work well.
@pauby Just checking if the amended PR looks fine to you? Eager to close this out :)
LGTM! Thanks @ralish. This will be released in the next version.
Description
Not doing so will break
Get-DscConfiguration
when called after applying a configuration with acChocoPackageInstallerSet
resource which does not specify theSource
parameter. This is due to the composite resource unconditionally setting the parameter.Related Issue
Fixes #149
Motivation and Context
Without this fix running
Get-DscConfiguration
will fail in affected configurations.How Has This Been Tested?
Internal test environment with an affected configuration.
Screenshots (if appropriate):
N/A
Types of changes
Checklist: