-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Labels
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Summary
There are times where running export where it will hang. During testing I added debug code to the export method and it is not stuck in my code.
To validate my code you can run the following. In my test it took 2 seconds to return 235 instances of the resource.
using module AnyPackageDsc
[Package]::Export()
Steps to reproduce
Take updated DSC module from anypackage/dsc#24 and then try the following commands
Install-PSResource AnyPackage.PSResourceGet,
dsc resource list --adapter Microsoft.DSC/PowerShell
Type Kind Version Capabilities RequireAdapter Description
-----------------------------------------------------------------------------------------------------------
AnyPackageDsc/Package Resource 0.1.2 gs--t--- Microsoft.DSC/PowerShell AnyPackage DSC resources.
AnyPackageDsc/Source Resource 0.1.2 gs--t--- Microsoft.DSC/PowerShell AnyPackage DSC resources.
dsc resource export -r AnyPackageDsc/Package
Expected behavior
not hangActual behavior
hangsError details
If no trace debugging enabled then the process will not return control back to user.
Trace debugging enabled:
2025-05-08T22:16:14.162126Z DEBUG dsc_lib::dscresources::command_resource: 902: PID 25216: jsonOutput={"result":[{<INSERT LARGE JSON>}]}
2025-05-08T22:15:07.945713Z DEBUG dsc_lib::dscresources::command_resource: 660: Process 'pwsh' id 22640 exited with code 0
thread 'main' panicked at C:\__w\1\s\DSC\dsc_lib\src\dscresources\dscresource.rs:444:80:
no entry found for key
note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceEnvironment data
7.6-preview4Version
3.1.0-preview.1
Visuals
No response
Reactions are currently unavailable