Skip to content

(DOCS) Update CLI reference and conceptual docs for v3.0.0 #672

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

michaeltlombardi
Copy link
Collaborator

@michaeltlombardi michaeltlombardi commented Mar 5, 2025

PR Summary

This changeset updates and adds reference documentation for the 3.0.0 GA release of DSC.

It includes:

  • Updated CLI reference
  • Updated and expanded documentation for concepts
  • Scaffold reference for built-in resources

Deferred to future PRs:

  • Reference docs for built-in resources
  • Updates to schema docs

PR Context

@michaeltlombardi michaeltlombardi changed the title (DOCS) Update reference docs for v3.0.0 (DOCS) Update CLI reference and conceptual docs for v3.0.0 Mar 17, 2025
@michaeltlombardi michaeltlombardi marked this pull request as ready for review March 17, 2025 22:15
---------------------------------------------------------------
DesiredStateConfiguration-Preview 9PCX3HX4HZ0Z Unknown msstore
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps a small remark for the users telling something like:

[!INFO]
You can use either msstore or winget as the source. When using winget, it leverages the .zip file, whereas msstore uses the .msixbundle.

Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

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

Will need more time to go through all the docs

type: Microsoft.Windows/Registry
result:
actualState:
keyPath: HKCU\example\key
Copy link
Member

Choose a reason for hiding this comment

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

Enclose in single quotes so that the backslash doesn't need to be escaped

Suggested change
keyPath: HKCU\example\key
keyPath: 'HKCU\example\key'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The backslash doesn't need escaping in YAML for unquoted strings:

@'
unquoted:       foo\bar\baz
double_quoted: "foo\\bar\\baz"
single_quoted: 'foo\bar\baz'
'@ | ConvertFrom-Yaml | Format-List

Name  : unquoted
Value : foo\bar\baz

Name  : double_quoted
Value : foo\bar\baz

Name  : single_quoted
Value : foo\bar\baz

Copy link
Member

Choose a reason for hiding this comment

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

I guess it's just GitHub's syntax coloring then

- Provides metadata about the operation as a whole and for each resource instance.

```sh
dsc config test --file /example.config.dsc.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
dsc config test --file /example.config.dsc.yaml
dsc config test --file ./example.config.dsc.yaml

Is this missing the period? Otherwise it's an absolute path

Copy link
Member

Choose a reason for hiding this comment

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

I don't see this as fixed?

Comment on lines +65 to +76
### HyperText Markup Language (HTML) format

HTML files can be viewed by web browsers such as **Microsoft Edge**. The following example shows
how to save the output of a command to an HTML file.

```powershell
dsc resource list | ConvertFrom-Json | ConvertTo-HTML | Out-File .\myFile.html
Invoke-Item .\myFile.html
```

The `Invoke-Item` command opens the file in your default web browser.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
### HyperText Markup Language (HTML) format
HTML files can be viewed by web browsers such as **Microsoft Edge**. The following example shows
how to save the output of a command to an HTML file.
```powershell
dsc resource list | ConvertFrom-Json | ConvertTo-HTML | Out-File .\myFile.html
Invoke-Item .\myFile.html
```
The `Invoke-Item` command opens the file in your default web browser.

unfortunately we need to remove these until an issue is resolved in PWSH

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@theJasonHelmick - how does removing this affect the accessibility concerns?

Maybe we just note that this work in Windows PowerShell and link to the issue / remove the notice when that issue is resolved?

Copy link
Member

Choose a reason for hiding this comment

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

The html written (5.1 or 7) as output does not include language tags so screen readers have to assume system language. We can’t use this, as a result.

Copy link
Member

@mgreenegit mgreenegit left a comment

Choose a reason for hiding this comment

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

This is such as massive PR, it will be easier to "nit pick" using small PRs after it is published. At a high level, everything looks good to me.
:shipit:

Prior to this change, the docs folder didn't include any conceptual
documentation, only reference documents.

This change copies existing concept docs into the folder, updates them
for GA, and adds new conceptual documentation to make it easier for
new users to learn about DSC and start using it.
This change updates the reference docs for:

- `Microsoft/OSInfo` resource
- `osinfo` CLI tool
- `Microsoft.Windows/Registry` resource
- `registry` CLI tool

These are the only resources currently documented on
the live docs site.

At a minimum, the manifest must define:

- The version of the DSC resource manifest JSON schema it's compatible with.
Copy link
Member

Choose a reason for hiding this comment

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

We should specify that the version is in semver format

resource. DSC performs the synthetic test by:

1. Invoking the **Get** operation on the resource to retrieve the actual state of the instance.
1. Synthetically testing each property for the desired state of an instance against the actual
Copy link
Member

Choose a reason for hiding this comment

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

It should be noted that in the case of arrays, the ordering doesn't matter, but the number of elements and the elements themselves have to be the same. In the case of objects, the actual state can be a superset of the desired state.


## export

A resource with the `export` capability supports enumerating every instance of the resource with
Copy link
Member

Choose a reason for hiding this comment

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

I think it's worth calling out that if no input is provided, expectation is all instances are returned, but if there is input, then that input should be used as a filter.

If you specify an invalid property name or an invalid value for a property, DSC raises an error
describing how the data is invalid.

Unless otherwise noted, for any given property:
Copy link
Member

Choose a reason for hiding this comment

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

Should we specify here that property names with leading underscore is reserved for canonical DSC properties that adhere to DSC defined syntax and semantics

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.

4 participants