Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Exported cmdlet conflicts between xNetworking, xStorage, xCertificate #273

Closed
PlagueHO opened this issue Jun 1, 2017 · 3 comments
Closed

Comments

@PlagueHO
Copy link
Contributor

PlagueHO commented Jun 1, 2017

@zjalexander , @kwirkykat , @mbreakey3 - there is a problem with the latest xStorage resource module release: it exports some common shared cmdlets (Get-LocalizationData etc) that it shouldn't.

This causes a conflict when loaded with xNetworking - because xNetworking also exports these same cmdlets. xCertificate also does the same (as does xDFS). None of these should have actually been exported at all (from any of the resources). The problem can be worked around with the -AllowClobber parameter, but this is not ideal.

I've submitted a PR to each of these repos with the changes to prevent the command cmdlets from being exported.

I've also added a new integration test to each repo to check for conflicts like this in future, but I think eventually the test could be moved into DSCResource.Tests instead. This could be used to test there are no conflicts with each new module that is released with all other existing modules.

The PR's for these changes can be found here:
dsccommunity/NetworkingDsc#214
dsccommunity/StorageDsc#94
dsccommunity/CertificateDsc#65
dsccommunity/DFSDsc#34

@PlagueHO
Copy link
Contributor Author

PlagueHO commented Jun 1, 2017

This issue is now closed because the PR's have been merged and the new versions of the modules have been released to the gallery. Thanks @johlju and @kwirkykat for all your help! 🥇

@PlagueHO PlagueHO closed this as completed Jun 1, 2017
@BrianFarnhill
Copy link
Contributor

Is this something that we should put in to the guidelines for each module along with the coding standards kinda thing? Like "if you're going to export a function, make sure it has a specific prefix on the verb". I know in SharePointDsc anything we export I prefix with "SPDsc", so things like "Invoke-SPDscCommand" for example. Just food for thought.

@PlagueHO
Copy link
Contributor Author

PlagueHO commented Jun 1, 2017

Hi Brian - that definitely sounds like a really good idea - I'll raise an issue. In this particular case though, these should cmdlets shouldn't have been exported at all!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants