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

Cross-platform updates to DSC code in SMA DLL #13399

Merged
merged 70 commits into from
Feb 2, 2021

Conversation

anmenaga
Copy link
Contributor

@anmenaga anmenaga commented Aug 11, 2020

PR Summary

This PR is in context of DSC changes for PowerShell 7.
P0 end-to-end scenario that we are enabling here consists of 3 components: PowerShell core (SMA dll), PSDesiredStateConfiguration module, GuestConfigAgent.
This PR addresses the first part - updates to DSC code in SMA dll to remove dependency on MOF/MMI APIs, therefore making DSC cross-platform and enabling GuestConfigAgent scenarios.
Focus is on class-based DSC resources.

PR Context

Fix #13731

At this point this PR is not a breaking change: existing (MOF/MMI-based) DSC code will continue to work as it was and will continue to be the default mechanism for DSC operations (for now).
Cross-platform DSC updates of this PR are done as an alternative mechanism for DSC operations; to use them:

  1. PSDesiredStateConfiguration v3 module has to be installed;
  2. PS7DscSupport experimental feature has to be enabled.

Example:
U18ClassDscCapture

PR Checklist

@anmenaga anmenaga added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Aug 11, 2020
@iSazonov
Copy link
Collaborator

Are there performance comparisons? It would be very amazing if new schema worked slower than original.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Aug 11, 2020
@ThomasNieto
Copy link
Contributor

The cmdlet name to convert MOF to JSON doesn't fit the naming conversions. It looks only to be one directional not bi-directional. Convert-CimMofToJson to something like ConvertTo-DscJsonSchema. The PS verb description for Convert indicates bi-directional and ConvertTo is one directional.

Convert - Changes the data from one representation to another when the cmdlet supports bidirectional conversion or when the cmdlet supports conversion between multiple data types.
ConvertTo - Converts from one or more types of input to a primary output type (the cmdlet noun indicates the output type).

@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Aug 12, 2020
Copy link
Member

@TravisEz13 TravisEz13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes to build.psm1 and the changes to find PSDesiredStateConfiguration.

build.psm1 Outdated Show resolved Hide resolved
Copy link
Member

@daxian-dbw daxian-dbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daxian-dbw
Copy link
Member

@rjmholt Can you please update your review? Thanks

@daxian-dbw daxian-dbw merged commit 8e3c3e0 into PowerShell:master Feb 2, 2021
@daxian-dbw daxian-dbw added CL-Engine Indicates that a PR should be marked as an engine change in the Change Log and removed CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log labels Feb 2, 2021
@daxian-dbw daxian-dbw added this to the 7.2.0-preview.3 milestone Feb 2, 2021
@iSazonov
Copy link
Collaborator

iSazonov commented Feb 3, 2021

@anmenaga Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-Engine Indicates that a PR should be marked as an engine change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support only DSC class based resources
10 participants