Skip to content

Commit

Permalink
(DOCS) Update docs for alpha.5
Browse files Browse the repository at this point in the history
This change updates the reference documentation, schema definitions,
and changelog for the `alpha.5` release.

These changes need to be synced to the docs site after merging.
  • Loading branch information
michaeltlombardi committed Mar 6, 2024
1 parent ef6b663 commit 6092484
Show file tree
Hide file tree
Showing 41 changed files with 1,455 additions and 497 deletions.
144 changes: 137 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Desired State Configuration changelog"
description: >-
A log of the changes for releases of DSCv3.
ms.date: 02/05/2024
ms.date: 03/06/2024
---

# Changelog
Expand All @@ -22,10 +22,19 @@ This section includes a summary of user-facing changes since the last release. F
changes since the last release, see the [diff on GitHub][unreleased].

<!-- Unreleased comparison link -->
[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-alpha.4...main
[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-alpha.5...main

<!-- Add entries between releases under the appropriate section heading here -->

## [v3.0.0-alpha.5][release-v3.0.0-alpha.5] - 2024-02-27

This section includes a summary of changes for the `alpha.5` release. For the full list of changes
in this release, see the [diff on GitHub][compare-v3.0.0-alpha.5].

<!-- Release links -->
[release-v3.0.0-alpha.5]: https://github.com/PowerShell/DSC/releases/tag/v3.0.0-alpha.5 "Link to the DSC v3.0.0-alpha.5 release on GitHub"
[compare-v3.0.0-alpha.5]: https://github.com/PowerShell/DSC/compare/v3.0.0-alpha.4...v3.0.0-alpha.5

### Changed

- Updated the options for the `dsc` root command:
Expand Down Expand Up @@ -57,6 +66,35 @@ changes since the last release, see the [diff on GitHub][unreleased].

</details>

- Updated the JSON schemas for the [get][38], [set][39], and [test][40] output data. This change
corrects an issue with how DSC surfaced information about instances nested inside group and
adapter resources. Now when you review the output, you'll be able to see the results for each
nested instance instead of a confusing object that loses the nested instance type and name
information.

This schema change is backwards compatible.

<details><summary>Related work items</summary>

- Issues:
- [#165][#165]
- [#266][#266]
- [#284][#284]
- PRs: [#318][#318]

<details>

- Changed the [concat][41] configuration function to match the behavior of the ARM template
function. The `concat()` function now only accepts strings or arrays of strings as input values.
It raises an error if the input values are not of the same type.

<details><summary>Related work items</summary>

- Issues: [#271][#271]
- PRs: [#322][#322]

<details>

### Added

- Implemented support for referencing parameters in a configuration with the [parameters()][32]
Expand Down Expand Up @@ -86,6 +124,77 @@ changes since the last release, see the [diff on GitHub][unreleased].

</details>

- Added the [DSCConfigRoot][42] environment variable and the [envvar() configuration function][43]
to enable users to reference files and folders relative to the folder containing the
configuration document. DSC automatically creates the `DSCConfigRoot` environment variable when
you use the `--path` option to specify the configuration document instead of passing the document
as a string from stdin or with the `--document` option.

> [!NOTE]
> In this release, DSC doesn't expand the specified path to an absolute path. You should always
> specify the full path to the configuration document if you want to reference the
> `DSCConfigRoot` variable in your configuration. Further, DSC always sets the value for this
> environment variable when you use the `--path` option. If the environment variable is already
> set, it overrides it silently.
>
> In a future release, the variable will be renamed to `DSC_CONFIG_ROOT` and DSC will
> automatically expand relative paths into absolute paths when setting the environment variable.
> It will also emit a warning when it overrides the variable.
<details><summary>Related work Items</summary>

- Issues: [#75][#75]
- PRs: [#313][#313]

</details>

- Added support for using the [dsc config export][44] and [dsc resource export][45] commands with
the PowerShell adapter resource. PSDSC resources can now participate in the `export` command if
they define a static method that returns an array of the PSDSC resource class.

<details><summary>Related work Items</summary>

- Issues: [#183][#183]
- PRs: [#307][#307]

</details>

- Added the `methods` column to the default table view for the console output of the
[dsc resource list][46] command. This new column indicates which methods the resource explicitly
implements. Valid values include `get`, `set`, `test`, and `export`. This information is only
available in the table view. It isn't part of the output object for the command. If you use the
[--format][47] parameter, capture the command output, or redirect the output, the `methods`
information isn't included.

Resources that don't implement `test` rely on DSC's synthetic test behavior instead. They can
still be used for test and set operations.

Resources that don't implement `export` can't be used with the `dsc config export` or
`dsc resource export` commands.

Resources that don't implement `set` can be used for auditing, but not `dsc resource set`. They
can be used with the `dsc config set` command, but only if they're nested inside a
`DSC/AssertionGroup` instance.

<details><summary>Related work Items</summary>

- Issues: [#309][#309]
- PRs: [#314][#314]

</details>

- Added an prototype for a WMI resource adapter to enable users to query WMI. The adapter is
disabled by default, as enumerating the WMI resources can have a performance impact. To enable
it, rename the resource manifest from `wmigroup.dsc.resource.json.optout` to
`wmigroup.dsc.resource.json`.

<details><summary>Related work Items</summary>

- Issues: [#263][#263]
- PRs: [#279][#279]

</details>

## [v3.0.0-alpha.4][release-v3.0.0-alpha.4] - 2023-11-14

This section includes a summary of changes for the `alpha.4` release. For the full list of changes
Expand Down Expand Up @@ -138,7 +247,7 @@ in this release, see the [diff on GitHub][compare-v3.0.0-alpha.4].

### Added

- Added the [--input][24] and [--input-file][25] global options to the root `dsc` command. Now, you
- Added the `--input` and `--input-file` global options to the root `dsc` command. Now, you
can pass input to DSC from a variable or file instead of piping from stdin.

<details><summary>Related work items</summary>
Expand Down Expand Up @@ -171,7 +280,7 @@ in this release, see the [diff on GitHub][compare-v3.0.0-alpha.4].
- DSC now emits log messages to the stderr stream. This can make it easier to understand what DSC
is doing. This doesn't affect the data output. By default, DSC emits errors, warnings, and
informational messages, but not debug or trace messaging. You can control the level of the
logging with the new [--logging-level][27] option on the root `dsc` command.
logging with the new `--logging-level` option on the root `dsc` command.

<details><summary>Related work items</summary>

Expand Down Expand Up @@ -523,10 +632,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
[21]: docs/reference/schemas/config/document.md#schema
[22]: docs/reference/schemas/resource/manifest/root.md#schema
[23]: docs/reference/schemas/resource/properties/exist.md
[24]: docs/reference/cli/dsc.md#-i---input
[25]: docs/reference/cli/dsc.md#-p---input-file
[26]: docs/reference/cli/completer/command.md
[27]: docs/reference/cli/dsc.md#-l---logging-level
[28]: docs/reference/schemas/config/functions/overview.md
[29]: docs/reference/schemas/config/functions/base64.md
[30]: docs/reference/schemas/config/functions/concat.md
Expand All @@ -539,6 +645,16 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
[35]: docs/reference/cli/config/command.md
[36]: docs/reference/cli/dsc.md#-l---trace-level
[37]: docs/reference/cli/dsc.md#-f---trace-format
[38]: docs/reference/schemas/outputs/resource/get.md
[39]: docs/reference/schemas/outputs/resource/set.md
[40]: docs/reference/schemas/outputs/resource/test.md
[41]: docs/reference/schemas/config/functions/concat.md
[42]: docs/reference/cli/config/command.md#environment-variables
[43]: docs/reference/schemas/config/functions/envvar.md
[44]: docs/reference/cli/config/export.md
[45]: docs/reference/cli/resource/export.md
[46]: docs/reference/cli/resource/list.md
[47]: docs/reference/cli/resource/list.md#-f---format

<!-- Issue and PR links -->
[#107]: https://github.com/PowerShell/DSC/issues/107
Expand All @@ -553,6 +669,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
[#159]: https://github.com/PowerShell/DSC/issues/159
[#162]: https://github.com/PowerShell/DSC/issues/162
[#163]: https://github.com/PowerShell/DSC/issues/163
[#165]: https://github.com/PowerShell/DSC/issues/165
[#168]: https://github.com/PowerShell/DSC/issues/168
[#171]: https://github.com/PowerShell/DSC/issues/171
[#172]: https://github.com/PowerShell/DSC/issues/172
Expand All @@ -563,6 +680,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
[#177]: https://github.com/PowerShell/DSC/issues/177
[#181]: https://github.com/PowerShell/DSC/issues/181
[#182]: https://github.com/PowerShell/DSC/issues/182
[#183]: https://github.com/PowerShell/DSC/issues/183
[#186]: https://github.com/PowerShell/DSC/issues/186
[#197]: https://github.com/PowerShell/DSC/issues/197
[#198]: https://github.com/PowerShell/DSC/issues/198
Expand All @@ -581,15 +699,27 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v
[#241]: https://github.com/PowerShell/DSC/issues/241
[#248]: https://github.com/PowerShell/DSC/issues/248
[#252]: https://github.com/PowerShell/DSC/issues/252
[#263]: https://github.com/PowerShell/DSC/issues/263
[#266]: https://github.com/PowerShell/DSC/issues/266
[#271]: https://github.com/PowerShell/DSC/issues/271
[#279]: https://github.com/PowerShell/DSC/issues/279
[#284]: https://github.com/PowerShell/DSC/issues/284
[#286]: https://github.com/PowerShell/DSC/issues/286
[#291]: https://github.com/PowerShell/DSC/issues/291
[#294]: https://github.com/PowerShell/DSC/issues/294
[#299]: https://github.com/PowerShell/DSC/issues/299
[#303]: https://github.com/PowerShell/DSC/issues/303
[#305]: https://github.com/PowerShell/DSC/issues/305
[#307]: https://github.com/PowerShell/DSC/issues/307
[#309]: https://github.com/PowerShell/DSC/issues/309
[#311]: https://github.com/PowerShell/DSC/issues/311
[#313]: https://github.com/PowerShell/DSC/issues/313
[#314]: https://github.com/PowerShell/DSC/issues/314
[#318]: https://github.com/PowerShell/DSC/issues/318
[#322]: https://github.com/PowerShell/DSC/issues/322
[#45]: https://github.com/PowerShell/DSC/issues/45
[#49]: https://github.com/PowerShell/DSC/issues/49
[#57]: https://github.com/PowerShell/DSC/issues/57
[#73]: https://github.com/PowerShell/DSC/issues/73
[#75]: https://github.com/PowerShell/DSC/issues/75
[#98]: https://github.com/PowerShell/DSC/issues/98
16 changes: 16 additions & 0 deletions docs/reference/cli/config/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,26 @@ Type: Boolean
Mandatory: false
```
## Environment variables
The `dsc config *` subcommands create the `DSCConfigRoot` environment variable when you call a
command with the `--path` option to specify the configuration document to use for the command. DSC
sets the value of the `DSCConfigRoot` environment variable to the folder containing the specified
configuration document.

> [!NOTE]
> If you use a relative path, DSC doesn't expand the value into a full path before setting the
> environment variable. Always specify the full path to the configuration document when you want to
> use the `DSCConfigRoot` environment variable.

You can use the [envvar][08] configuration function to reference that folder path for resource
instances in the configuration.

[01]: ../resource/command.md
[02]: export.md
[03]: get.md
[04]: set.md
[05]: test.md
[06]: ../../schemas/config/parameter.md
[07]: ../../schemas/config/functions/parameters.md
[08]: ../../schemas/config/functions/envvar.md
Loading

0 comments on commit 6092484

Please sign in to comment.