You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could it be that this was never caught due to everyone having the repo's dsc folder on their path when running the tests?
Or am I missing something obvious?
On another note, the followings (present in the docs) are also missing from my dsc resource list output (besides Microsoft.DSC/Include):
Microsoft/Process
Microsoft.DSC/Parallel
Steps to reproduce
# example.dsc.config.yaml
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
metadata:
Microsoft.DSC:
securityContext: Elevated
resources:
- name: include base64
type: Microsoft.DSC/Includes
properties:
configurationFile: choco-base64-example.dsc.config.yaml # this exists and works on its own
dsc config set -f example.dsc.config.yaml
Expected behavior
the configuration works
Actual behavior
Performing a `dsc resource list`, there is no `Microsoft.DSC/Include`, only Group, Assertion and Powershell.Looking at the docs and the examples, this should be available: https://learn.microsoft.com/en-us/powershell/dsc/reference/cli/resource/list?view=dsc-3.0`dsc config set -f example.dsc.config.yaml` produces`ERROR Error: Resource not found: Microsoft.DSC/Include`
Error details
ERROR Error: Resource not found: Microsoft.DSC/Include
Environment data
Name Value
---------
PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
@systematicguy Thanks for reporting this! Doing an easy for for now, longer term fix is to run the tests against the built package, but then need a way to get the test resources while ensuring they aren't accidentally included into a release package.
Prerequisites
Summary
I wanted to use the
Microsoft.DSC/Include
resource but it is not there.I have done some digging and found that https://github.com/PowerShell/DSC/blob/39633899ebdc40fd80b432fa69b0c710e8c00812/build.ps1 describes some files in
$filesForWindowsPackage
, e.g.'assertion.dsc.resource.json'
, but it seems that'include.dsc.resource.json'
was never part of it (according to the git history of it).I simply downloaded https://github.com/PowerShell/DSC/releases/download/v3.0.0-rc.1/DSC-3.0.0-rc.1-x86_64-pc-windows-msvc.zip, did the unblocking magic and put it onto my path, and other resources do work.
I do see that the tests are there, e.g. https://github.com/PowerShell/DSC/blob/39633899ebdc40fd80b432fa69b0c710e8c00812/dsc/tests/dsc_include.tests.ps1 so it might be a rookie mistake and I just need to install something extra.
Could it be that this was never caught due to everyone having the repo's
dsc
folder on their path when running the tests?Or am I missing something obvious?
On another note, the followings (present in the docs) are also missing from my
dsc resource list
output (besides Microsoft.DSC/Include):Steps to reproduce
dsc config set -f example.dsc.config.yaml
Expected behavior
the configuration works
Actual behavior
Error details
ERROR Error: Resource not found: Microsoft.DSC/Include
Environment data
Version
3.0.0-rc.1
Visuals
No response
Workaround
I have copied https://github.com/PowerShell/DSC/blob/39633899ebdc40fd80b432fa69b0c710e8c00812/dsc/include.dsc.resource.json into the folder I have unarchived the dsc release and it works.
The text was updated successfully, but these errors were encountered: