Comments (9)
Tried it with no modules and a blank config and got the same error importing that module.
I know it happens with other modules to.
from dsc.
I tracked it down to this line in DSC\Development
Get-DscResorcesVersion.ps1
line 19 in Get-ModuleVersion
$Version = (Invoke-Expression -Command $psd1)['ModuleVersion']
from dsc.
Invoke-Expression is evil. :\ Thanks for tracking this down. I'll see if I can reproduce this and fix the code tomorrow, if no one else has already done it.
from dsc.
It would seem that if the PSD1 is signed (one of mine were) it's guaranteed to bug out on that line. In an "all signed" environment I'm not sure if the psd1's need a signature block, but as I place files back into resources, tools and configuration it breaks again.
so once item at a time i will see if I can find any other causes.
from dsc.
If DscOperations is in the DSC_Tooling folder it bugs out at the same invoke-expression when Publish-DscToolModule runs.
There is no signature block involved this time.
from dsc.
Just a couple of comments.. due to issues with resource caching (before debugmode in PS5), Invoke-DscBuild was intended to run inside a shared powershell session (it's not really documented, which is my bad) - I always launched it in a job. As noted, it was never tested with signed modules. There is probably a better way to get the module version (like get-module at the path), but iex was the most convenient at the time.
from dsc.
I'm not sure if psd1 are supposed to be signed. The files in question were signed by targeting a every Ps* in a set of folders.
I figured Invoke-DscBuild was designed to run in a new instance of PowerShell. That is why I have been working around the issue thus far. The new process check version before invoking pester though a monkey ranch into it and I finally had to get to the root of the issue. Its running quite well now that I can avoid triggering the issue. I look forward to a what the community can hammerout address the issue.
Thanks Steven, and everyone else who contributed, for all the hard work and putting this out there. I can imagine the mess I would be dealing with trying to manage 3000 nodes with a monolithic DSC config.
from dsc.
OK, I was able to reproduce this tonight, though it was working fine at first; not sure what finally triggered the bug. Once it started happening, though, it was consistent even in new PowerShell sessions.
I've updated the DscBuild module in the development branch so it no longer calls Invoke-Expression when importing PSD1 files, and that cleared up the problem on my test VM. Please let me know if it does the same for you.
from dsc.
Works like a charm with both the signature and having DscOperations in DSC_Tooling.
Thank you Dave.
from dsc.
Related Issues (20)
- DSCBuild: Allow resource modules to specify their own build scripts HOT 2
- DscBuild: Restore state of Program Files directory on failed build HOT 6
- Add tests for DscBuild HOT 1
- Resolve-DscConfigurationProperty and Services vs node HOT 4
- Modules in DSC_Resorces cant be used to manage machine running invoke-DSCBuild. HOT 11
- Command conflicts HOT 1
- Get-DscConfigurationData filtering behavior HOT 1
- DSC Resource HOT 5
- cSmbshare Test-TargetResource FIX HOT 1
- ValidateSet can not be used for Arrays, PSCredentials, and Hashtable HOT 2
- How to get Credentials into a Configuration HOT 2
- Documentation for DSC tooling HOT 4
- New Resources for ElasticSearch, NSSM, 7zip and JRE HOT 15
- DSC resources for Team Foundation Server HOT 7
- Update credential encryption code
- Modify New-DscResourceFromModule to accept new parameters HOT 1
- Break up cDscDiagnostics into individual scripts HOT 4
- Add-DscEncryptedPassword functionality HOT 4
- DSC Resource PSHOrg_cADGroup to cActive Directory HOT 6
- building with Jenkins HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsc.