-
Notifications
You must be signed in to change notification settings - Fork 29
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
exporter
kind of resource
#515
Comments
For the sake of visibility: In the case of WinGet as an orchestrator, we have an experimental feature in place for generating configuration from the current state for a single resource or package (and resource). This works with a few DSC v2 resources, but it's more of a building block to work on top of today. In the future, WinGet would iterate over all installed packages, and it would be aware of Windows Settings. Dev Home also has plans to support a logical "get my current configuration" and then some kind of editor type of experience to modify the generated configuration. I think the approach here makes perfect sense in the world of DSC v3 only scenarios for DSC.exe, but in the current hybrid world, we're likely to see multiple different scenarios that need unique treatments. |
A few things I think important to note about any potential recursive export implementations:
I think recursive export is a good idea, but there's limitations to the operation that I don't see feasible options for that won't require a lot of custom logic or new resource capabilities for. I also think that we should always be very clear when we describe export-for-reuse operations that the output from that operation is a starting point and should always be inspected and approved by a human before using that output. Especially when we're thinking about recursively exporting the full configuration of a system, but even when exporting the current configuration of a small group of applications. |
For the mapping of applications to resources, I think a SWID property in the resource manifest should be sufficient. SWIDs are XML, so I suppose this would be a string that contains XML. However, it does appear that SWID XML doesn't contain content and is only relying on attributes, so this could be converted to JSON. It would make sense to have a property in the manifest for |
Summary of the new feature / enhancement
There is a scenario where the configuration being exported is dynamic rather than statically defined within a configuration doc. Some examples:
exporter
resource would be responsible for enumerating those apps and associating them to the relevant DSCv3 resource.In both cases, it doesn't make sense to have the user manually craft a configuration and instead, they want to run
export
at a top-level application (which may mean in the future we may need to have a meta-resource to represent an entire system that recursively exports).Proposed technical implementation details (optional)
We allow for an
exporter
kind of resource that only implementsexport
method. There's at least two ways to support this:exporter
returns not configuration, but resource instances that needexport
called whichdsc
engine will handle. In this case,dsc
would be the one recursively callingexport
where there could be a nestedexporter
so the user eventually gets a single doc that represents the total configurationexporter
resource handles callingexport
and potentially recursion and returns a complete configuration that can be appliedI think option 1 makes more sense so that the
exporter
resource doesn't need to call back out todsc
to then call a resource toexport
or implement the same functionality thatdsc
already providesThe text was updated successfully, but these errors were encountered: