Replies: 1 comment 2 replies
-
For DSC, the intent is NOT to special case (even PowerShell) unless really required. Putting more execution directives into the metadata basically creates a new config document dialect whereas the current use of PowerShellGroup makes the relationship explicit. A special path for PowerShell essentially creates two different communities within DSC. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
winget already exposes access to PowerShell DSC v2 via a file format not that dissimilar from the one used here. We are also moving to use the schema here in the future. This brings with it a problem though; users who are content to use only PowerShell DSC v2 resources should not be required to take a dependency on
dsc.exe
and they should not be required to embed all of their resources into a PowerShell group (although this could be a path to a document that can work across both).While we could implement some heuristic methods to detect whether the resource types are PowerShell or
dsc.exe
resources, we definitely need to give the author/user the ability to specify that fact. While this could be done as an additional command line parameter, it would be more robust to be able to embed it into the DSC document.This brings up the first discussion point: Should the document schema provide an explicit field to indicate the target processing environment for the document? I believe that at a minimum the answer here is dependent on whether
dsc.exe
would want to be aware of and participate in explicitly blocking non-dsc.exe
targeting documents. I have no particular opinion on the answer here currently.The alternative is to embed this information into a
metadata
field at the root of the document. Which brings up a more general question: Should components abovedsc.exe
usemetadata
for behavior alteration? For both yes and no, what should the standard practice be, as there will always be additional layers that want to add in behavior altering metadata. My initial thought is that it is acceptable to place behavior altering metadata into themetadata
field, but it is worthwhile to place all of a component's metadata into a single object. This reduces the likelihood of name collisions and implicitly documents the source of/handler for the metadata item.For example:
It may be desirable to have an object whose contents are explicitly for non-behavior altering data, such as author's notes, descriptions for use in display contexts, or authoring tools. If so, I would request that we have an alternative object whose contents are explicitly for components sitting above
dsc.exe
to store behavior altering data. The presence of this object could be used as a signal todsc.exe
that the configuration document is potentially meant for a higher level tool, rather than the explicit processing environment field mentioned above. An additional flag could be passed to ignore these, allowing the higher level tool to use the document unaltered rather than needing to remove them before calling intodsc.exe
.Beta Was this translation helpful? Give feedback.
All reactions