Skip to content

Update Firewall manifest to declare implementsPretest - #1682

Merged
Steve Lee (SteveL-MSFT) merged 1 commit into
PowerShell:mainfrom
SteveL-MSFT:firewall-pretest
Aug 20, 2026
Merged

Update Firewall manifest to declare implementsPretest#1682
Steve Lee (SteveL-MSFT) merged 1 commit into
PowerShell:mainfrom
SteveL-MSFT:firewall-pretest

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

PR Summary

  • Change Firewall manifest to declare implementsPretest so that when the writeOnly unspecifiedRules property is used, set is still called
  • Fix a formatting issue in invoke_synthetic_test() funciton I noticed while exploring different options

PR Context

Fix #1681

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 pull request updates the Windows Firewall resource manifest so the engine will not run an engine-side pretest (test) gate before invoking set, ensuring set still runs when unspecifiedRules (a writeOnly input) is present and can cause changes (fixes #1681).

Changes:

  • Set implementsPretest: true in the Windows Firewall resource manifest so config set isn’t skipped due to the pretest result when writeOnly inputs are involved.
  • Reformat invoke_synthetic_test() in the command resource implementation (no functional change observed).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
resources/windows_firewall/windows_firewall.dsc.resource.json Declares implementsPretest: true for the FirewallRuleList resource set method to prevent engine-side pretest from skipping set.
lib/dsc-lib/src/dscresources/command_resource.rs Formats invoke_synthetic_test() onto multiple lines for readability (behavior unchanged).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) added this pull request to the merge queue Aug 20, 2026
Merged via the queue into PowerShell:main with commit 2df5acb Aug 20, 2026
33 of 36 checks passed
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the firewall-pretest branch August 20, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows/FirewallRulesList incorrectly skips set with unspecifiedRules applied

3 participants