Skip to content

[SSHDConfig] Move filepath from metadata to properties#1577

Open
tgauth wants to merge 9 commits into
PowerShell:mainfrom
tgauth:move-filepath-to-properties
Open

[SSHDConfig] Move filepath from metadata to properties#1577
tgauth wants to merge 9 commits into
PowerShell:mainfrom
tgauth:move-filepath-to-properties

Conversation

@tgauth

@tgauth tgauth commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

  • move filepath from metadata to properties for sshdconfig resources
  • bump sshdconfig resource versions

PR Context

Copilot AI review requested due to automatic review settings June 16, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the sshdconfig DSC resource to treat the target sshd_config path as an input property (_filepath) rather than an item under _metadata, aligning configuration shape with how the path affects resource behavior (per #1570).

Changes:

  • Replace _metadata.filepath with _filepath across the sshdconfig resource schemas, Rust input parsing, and most Pester tests.
  • Update canonical-property handling to recognize _filepath as a first-class canonical property.
  • Adjust get/set code paths to read/write and echo _filepath rather than _metadata.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
resources/sshdconfig/tests/sshdconfigRepeatList.tests.ps1 Updates test inputs to pass _filepath instead of _metadata.filepath (some _metadata usages remain).
resources/sshdconfig/tests/sshdconfigRepeat.tests.ps1 Updates test inputs to pass _filepath instead of _metadata.filepath (some _metadata usages remain).
resources/sshdconfig/tests/sshdconfig.set.tests.ps1 Updates set-path tests to use _filepath inputs.
resources/sshdconfig/tests/sshdconfig.get.tests.ps1 Updates get-path tests to use _filepath inputs.
resources/sshdconfig/sshd-subsystemList.dsc.resource.json Moves the file path from _metadata.filepath to _filepath in the resource schema.
resources/sshdconfig/sshd-subsystem.dsc.resource.json Moves the file path from _metadata.filepath to _filepath in the resource schema.
resources/sshdconfig/sshd_config.dsc.resource.json Adds _filepath to the main sshd_config resource schema properties.
resources/sshdconfig/src/util.rs Changes command-info construction to extract _filepath and build CommandInfo accordingly.
resources/sshdconfig/src/set.rs Switches set flows to use cmd_info.filepath rather than cmd_info.metadata.filepath.
resources/sshdconfig/src/repeat_keyword.rs Updates repeat-operation input structs to accept _filepath directly.
resources/sshdconfig/src/inputs.rs Removes the Metadata struct and adds filepath: Option<PathBuf> directly to CommandInfo.
resources/sshdconfig/src/get.rs Reads from cmd_info.filepath and emits _filepath in results when set.
resources/sshdconfig/src/canonical_properties.rs Introduces _filepath as a canonical property (and removes _metadata).
Cargo.lock Updates the lockfile (currently includes a version mismatch for dsc-resource-registry).

Comment thread resources/sshdconfig/tests/sshdconfigRepeat.tests.ps1
Comment thread resources/sshdconfig/tests/sshdconfigRepeatList.tests.ps1
Comment thread resources/sshdconfig/src/get.rs
@tgauth tgauth requested a review from SteveL-MSFT June 17, 2026 19:17
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.

SSHDConfig Resource: filepath should be in properties instead of metadata

3 participants