Skip to content

SSHDConfig: move filepath from _metadata to _filepath property - #5

Closed
tgauth with Copilot wants to merge 4 commits into
mainfrom
copilot/modify-sshdconfig-filepath-property
Closed

SSHDConfig: move filepath from _metadata to _filepath property#5
tgauth with Copilot wants to merge 4 commits into
mainfrom
copilot/modify-sshdconfig-filepath-property

Conversation

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown

filepath was only configurable under the DSC metadata block, but since it directly affects resource behavior (which file to read/write), it belongs in properties.

Changes

  • canonical_properties.rs: Replaced Metadata variant with Filepath ("_filepath")
  • inputs.rs: Removed Metadata struct; filepath: Option<PathBuf> is now a direct field on CommandInfo
  • repeat_keyword.rs: RepeatInput / RepeatListInput use _filepath field instead of _metadata
  • util.rs: build_command_info extracts _filepath from top-level JSON input
  • get.rs / set.rs: Updated all cmd_info.metadata.filepath references to cmd_info.filepath; output now includes _filepath directly
  • Resource manifests (sshd_config, sshd-subsystem, sshd-subsystemList): Schema updated — _metadata object replaced with _filepath string property
  • Tests: All test inputs updated from _metadata = @{ filepath = ... } to _filepath = ...

Before / After

# Before
- name: sshdconfig
  type: Microsoft.OpenSSH.SSHD/sshd_config
  metadata:
    filepath: C:\path\to\sshd_config

# After
- name: sshdconfig
  type: Microsoft.OpenSSH.SSHD/sshd_config
  properties:
    _filepath: C:\path\to\sshd_config

Copilot AI changed the title [WIP] Update sshdconfig resource to use filepath in properties SSHDConfig: move filepath from _metadata to _filepath property Jun 15, 2026
Copilot AI requested a review from tgauth June 15, 2026 15:41
@tgauth

tgauth commented Jun 15, 2026

Copy link
Copy Markdown
Owner

@copilot resolve the conflicts with main

…nfig-filepath-property

# Conflicts:
#	resources/sshdconfig/tests/sshdconfig.set.tests.ps1

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Author

@copilot resolve the conflicts with main

Merged main into this branch. The only conflict was in resources/sshdconfig/tests/sshdconfig.set.tests.ps1main had added new Windows-specific test contexts that still used the _metadata style. I updated those to use _filepath (consistent with this PR) and completed the merge in commit 6f96f8de.

@tgauth

tgauth commented Jun 15, 2026

Copy link
Copy Markdown
Owner

@copilot fix the clippy warnings/errors - look at the build script to see the exact clippy configuration

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Author

@copilot fix the clippy warnings/errors - look at the build script to see the exact clippy configuration

The merge with origin/main inadvertently re-introduced old metadata.filepath references in set.rs (via conflict resolution favouring main's version), which causes compile errors. Fixing those now alongside the clippy issues.

@tgauth

tgauth commented Jun 15, 2026

Copy link
Copy Markdown
Owner

@copilot revert the cargo.lock changes, close the PR, and open a PR with the same changes against the PowerShell/DSC fork

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Author

@tgauth I've opened a new pull request, #6, to work on those changes. Once the pull request is ready, I'll request review from you.

@tgauth tgauth closed this Jun 16, 2026
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.

2 participants