Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pass-through trace format to dsc so that child-processes get traced appropriately by top process #541

Merged
merged 4 commits into from
Sep 13, 2024

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Sep 7, 2024

PR Summary

Previously traces were rendered by child dsc processes which polluted the output and trace level didn't match what the user requested as they would be written at trace level only.

Change is to add a pass-through format which also makes child dsc not trace the output but instead write the JSON to stderr.

The top most dsc process will deserialize the JSON and write the traces with the appropriate trace level and also include the child process id to get a better idea of the process tree.

Also update the tree-sitter build script to not do a clean install of node modules unless running in ADO as it's way too slow.

Example with just INFO level:

image

Context

Fix #512

dsc_lib/src/dscresources/command_resource.rs Outdated Show resolved Hide resolved
dsc_lib/src/dscresources/command_resource.rs Outdated Show resolved Hide resolved
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Sep 13, 2024
Merged via the queue into PowerShell:main with commit 2e742c9 Sep 13, 2024
5 checks passed
@SteveL-MSFT SteveL-MSFT deleted the trace-envvar branch September 13, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to support getting traces from child dsc processes
3 participants