Skip to content

Fixes Resources missing when using PSDesiredStateConfiguration 2.0.7#2110

Merged
johlju merged 5 commits intodsccommunity:mainfrom
raandree:fix/#2109
Aug 8, 2025
Merged

Fixes Resources missing when using PSDesiredStateConfiguration 2.0.7#2110
johlju merged 5 commits intodsccommunity:mainfrom
raandree:fix/#2109

Conversation

@raandree
Copy link
Contributor

@raandree raandree commented Jul 26, 2025

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Fixes #2109

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Resource documentation updated in the resource's README.md.
  • Resource parameter descriptions updated in schema.mof.
  • Comment-based help updated, including parameter descriptions.
  • Localization strings updated.
  • Examples updated.
  • Unit tests updated. See DSC Community Testing Guidelines.
  • Integration tests updated (where possible). See DSC Community Testing Guidelines.
  • Code changes adheres to DSC Community Style Guidelines.

This change is Reviewable

@raandree raandree requested review from a team and johlju as code owners July 26, 2025 08:23
@coderabbitai
Copy link

coderabbitai bot commented Jul 26, 2025

Walkthrough

The changelog and module manifest for the SqlServerDsc project were updated. The CmdletsToExport entry was changed from an empty array to a wildcard string ('*') in the manifest file to address an issue where certain DSC resources were missing when using PSDesiredStateConfiguration 2.0.7. No changes were made to public entities or other export declarations.

Changes

File(s) Change Summary
Changelog and Manifest
CHANGELOG.md, source/SqlServerDsc.psd1
Modified the CmdletsToExport entry in the module manifest from an empty array to '*'. Added changelog entry describing this change to fix resource visibility issue with PSDesiredStateConfiguration 2.0.7.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Assessment against linked issues

Objective Addressed Explanation
Remove CmdletsToExport entry from the module manifest to fix missing DSC resources issue (#2109)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes detected.

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b3ea84 and 85252a3.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • source/SqlServerDsc.psd1 (0 hunks)
💤 Files with no reviewable changes (1)
  • source/SqlServerDsc.psd1
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
  • GitHub Check: PSScriptAnalyzer
  • GitHub Check: PSScriptAnalyzer

@codecov
Copy link

codecov bot commented Jul 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94%. Comparing base (9305e16) to head (9582aa0).

Additional details and impacted files

Impacted file tree graph

@@         Coverage Diff          @@
##           main   #2110   +/-   ##
====================================
  Coverage    94%     94%           
====================================
  Files       107     107           
  Lines      8094    8094           
====================================
  Hits       7655    7655           
  Misses      439     439           
Flag Coverage Δ
unit 94% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johlju
Copy link
Member

johlju commented Jul 29, 2025

@raandree question before merge, if setting it to CmdletsToExport = '*' will that fail to find the class-based resource too? I asking because New-ModuleManifest sets it to '*' by default, and if this property needs to be removed then we have to do it throughout the dsccommunity repos.

@johlju johlju added waiting for author response The pull request is waiting for the author to respond to comments in the pull request. and removed needs review The pull request needs a code review. labels Jul 29, 2025
@raandree
Copy link
Contributor Author

@johlju, the bug was raised 5 years ago but was closed without getting fixed: PowerShell/PowerShell#12054.

Only the class-based resources are effected by this issue.

And yes, we should remove this property in all community resources and maybe also adapt the Sampler template.

@johlju
Copy link
Member

johlju commented Jul 29, 2025

Looking at the code, if I'm readin it correct, it looks like if we set CmdletsToExport to wildcard (*) it will jump over the offending code path . If that works most of the resource modules does not need to change and wont exclude any use of Cmdlets 🤔

@dan-hughes
Copy link
Contributor

dan-hughes commented Aug 4, 2025

I'm for setting CmdletsToExport = '*' as a standard.

I can't think of a DscCommunity module uses this and will end up being cleared by ModuleBuilder.

A check can be added in DscResource.Test to validate that this is in place or one of CmdletsToExport, FunctionsToExport or AliasesToExport has the wildcard character if there are class-based resources.

@raandree
Copy link
Contributor Author

raandree commented Aug 4, 2025

I have not gone through the source code, but other people discovered the issue a while ago:

The issue seems to happen if CmdletsToExport, FunctionsToExport and AliasesToExport are set to *. Hence, the easiest option is to remove CmdletsToExport as very likely no DSC resource module will ever export a cmdlet but likely functions and maybe aliases.

@dan-hughes
Copy link
Contributor

dan-hughes commented Aug 4, 2025

Any/most/all DscCommunity modules will have this set to @() by default and ModuleBuilder then replaces as it needs to.

Until it's fixed in PowerShell a HQRM test could be added to ensure the manifest is in the correct state?

The only risk is the unknown performance impact of not including or setting the value of one of the *ToExport to '*'.

@raandree
Copy link
Contributor Author

raandree commented Aug 8, 2025

Any/most/all DscCommunity modules will have this set to @() by default and ModuleBuilder then replaces as it needs to.

On the long term CmdletsToExport should be removed in all DSC resource modules as it is not required. However, fixing it here doesn't mean we have to fix it everywhere the same time. The bug I am addressing only shows up when using class based resources with DSC v2 (PSDesiredStateConfiguration 2.0.7).

Until it's fixed in PowerShell a HQRM test could be added to ensure the manifest is in the correct state?

It is not an issue with PowerShell but PSDesiredStateConfiguration 2.0.7. Getting it fixed there is rather complicated.

The only risk is the unknown performance impact of not including or setting the value of one of the *ToExport to '*'.

I see rather a performance risk in setting it to *, which was never a good practice. Removing the setting does not have any impact on the performance at all.

@dan-hughes
Copy link
Contributor

dan-hughes commented Aug 8, 2025

Looking at PSDesiredStateConfiguration it uses Get-Module -ListAvailable. Testing here changing the manifest and running populates ExportedDscResources.

Until this is fixed in PowerShell, I'd advocate just commenting out CmdletsToExport with a comment why, and having a HQRM test to validate that the builtModule manifest should not contain CmdletsToExport or it's value should be '*', when the module contains class-based DSC resources.

PowerShell bug in PowerShell/PowerShell#12054, is not resolved and is the actual fix.

I assume the Microsoft recommendations https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/performance/module-authoring-considerations?view=powershell-7.5#guidelines still apply.

Issue for the HQRM test dsccommunity/DscResource.Test#165.

@dan-hughes
Copy link
Contributor

New issue in the PowerShell repo as per the bot instructions. PowerShell/PowerShell#25839

@johlju
Copy link
Member

johlju commented Aug 8, 2025

It says in the authoring consideration:

A missing or $null entry is equivalent to specifying the wildcard *.

So if we remove it there are the same performance impact as setting it to *. Assuming there is no issue for 2.0.7 by setting it to *, which I assume there isn’t, I suggest we set it to *. Please update to that and I will merge.

@raandree
Copy link
Contributor Author

raandree commented Aug 8, 2025

Ok, got it and made the change. Thanks for the input and your time, @dan-hughes and @johlju!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9582aa0 and 77dda01.

📒 Files selected for processing (1)
  • source/SqlServerDsc.psd1 (1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Public/*.ps1 : All public command names must have the noun prefixed with 'SqlDsc', e.g. {Verb}-SqlDsc{Noun}.
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/en-US/SqlServerDsc.strings.psd1 : For public commands and private functions, all localized strings should be added in source/en-US/SqlServerDsc.strings.psd1, and localized string key names should be prefixed with the function name using underscores.
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Classes/*.ps1 : A derived DSC class-based resource should only inherit from SqlResourceBase if it needs to connect to a SQL Server Database Engine.
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Public/*.ps1 : All public command names must have the noun prefixed with 'SqlDsc', e.g. {Verb}-SqlDsc{Noun}.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/en-US/SqlServerDsc.strings.psd1 : For public commands and private functions, all localized strings should be added in source/en-US/SqlServerDsc.strings.psd1, and localized string key names should be prefixed with the function name using underscores.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private,Classes}/*.ps1 : Use PascalCase for function names and parameters in public commands, private functions, and class-based resources.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : Public commands and private functions with no parameters should still have an empty parameter block param ().

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : All public commands and private functions should always be advanced functions and have [CmdLetBinding()] attribute.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Public/*.ps1 : Public PowerShell commands should each have their own script file named after the command (with .ps1 extension) and be placed in the folder source/Public.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : All public command and private function names must use PowerShell approved verbs.

Applied to files:

  • source/SqlServerDsc.psd1
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: PSScriptAnalyzer
  • GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
  • GitHub Check: PSScriptAnalyzer
  • GitHub Check: PSScriptAnalyzer
🔇 Additional comments (1)
source/SqlServerDsc.psd1 (1)

33-33: Fix unblocks class-based DSC resources in PSDesiredStateConfiguration 2.0.7 — approved

Setting CmdletsToExport to wildcard resolves the missing resources issue in 2.0.7. Looks good.

@johlju johlju added needs review The pull request needs a code review. and removed waiting for author response The pull request is waiting for the author to respond to comments in the pull request. labels Aug 8, 2025
@johlju
Copy link
Member

johlju commented Aug 8, 2025

We need to fix QA test so this does not regress, but should be in another PR and preferably in DscResource.Test.

@johlju johlju merged commit 14c5107 into dsccommunity:main Aug 8, 2025
2 of 5 checks passed
@johlju johlju removed the needs review The pull request needs a code review. label Aug 8, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77dda01 and 36248a6.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • source/SqlServerDsc.psd1 (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
CHANGELOG.md

📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)

The Unreleased section in CHANGELOG.md should always be updated when making changes to the codebase, using the keepachangelog format and providing concrete release notes.

Files:

  • CHANGELOG.md
**/*.md

📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)

**/*.md: Markdown files should wrap lines after a word when a line exceeds 80 characters.
Use 2 spaces for indentation in Markdown files.

Files:

  • CHANGELOG.md
🧠 Learnings (26)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Public/*.ps1 : All public command names must have the noun prefixed with 'SqlDsc', e.g. {Verb}-SqlDsc{Noun}.
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/en-US/SqlServerDsc.strings.psd1 : For public commands and private functions, all localized strings should be added in source/en-US/SqlServerDsc.strings.psd1, and localized string key names should be prefixed with the function name using underscores.
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Classes/*.ps1 : A derived DSC class-based resource should only inherit from SqlResourceBase if it needs to connect to a SQL Server Database Engine.
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Public/*.ps1 : All public command names must have the noun prefixed with 'SqlDsc', e.g. {Verb}-SqlDsc{Noun}.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/en-US/SqlServerDsc.strings.psd1 : For public commands and private functions, all localized strings should be added in source/en-US/SqlServerDsc.strings.psd1, and localized string key names should be prefixed with the function name using underscores.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private,Classes}/*.ps1 : Use PascalCase for function names and parameters in public commands, private functions, and class-based resources.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : All public commands and private functions should always be advanced functions and have [CmdLetBinding()] attribute.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Classes/*.ps1 : A derived DSC class-based resource should only inherit from SqlResourceBase if it needs to connect to a SQL Server Database Engine.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : Public commands and private functions with no parameters should still have an empty parameter block param ().

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Classes/*.ps1 : The derived DSC class-based resource should override the methods Get, Test, Set, GetCurrentState, Modify, AssertProperties, and NormalizeProperties.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Public/*.ps1 : Public PowerShell commands should each have their own script file named after the command (with .ps1 extension) and be placed in the folder source/Public.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : Every parameter in public commands and private functions should include the [Parameter()] attribute.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to **/*.ps1 : Use '#' for single line comments in PowerShell code.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to **/*.ps1 : Use splatting for commands to reduce line length.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to **/*.ps1 : Single quotes should always be used to delimit string literals wherever possible. Double quoted string literals may only be used when string literals contain ($) expressions that need to be evaluated.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to **/*.ps1 : Never use backtick as line continuation in code.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private,Classes}/*.ps1 : A comment-based help must have at least one example, but preferably more examples to showcase all possible parameter sets and different parameter combinations.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to **/*.ps1 : Use camelCase for local variable names in PowerShell.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to **/*.ps1 : PowerShell reserved keywords should be in all lower case.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private,Classes}/*.ps1 : Comment-based help should always be before the function-statement for each public command and private function, and before the class-statement for each class-based resource. It should be in the format of a comment block and at least use the keywords: .SYNOPSIS, .DESCRIPTION, .PARAMETER, .EXAMPLE, and .NOTES.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to azure-pipelines.yml : Integration test script files for public commands must be added to a group within the 'Integration_Test_Commands_SqlServer' stage in ./azure-pipelines.yml.

Applied to files:

  • source/SqlServerDsc.psd1
  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : All public command and private function names must use PowerShell approved verbs.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private}/*.ps1 : All public command and private function names must follow the standard PowerShell Verb-Noun format.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/Private/*.ps1 : Private functions that are only used within a single public command should still be placed in source/Private as separate .ps1 files.

Applied to files:

  • source/SqlServerDsc.psd1
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to CHANGELOG.md : The Unreleased section in CHANGELOG.md should always be updated when making changes to the codebase, using the keepachangelog format and providing concrete release notes.

Applied to files:

  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to **/*.ps1 : All PowerShell files must end with a new line.

Applied to files:

  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/en-US/*.psd1 : Localized string key names should use underscores as word separators if the key name has more than one word.

Applied to files:

  • CHANGELOG.md
📚 Learning: 2025-08-03T09:50:27.001Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-03T09:50:27.001Z
Learning: Applies to source/{Public,Private,Classes}/*.ps1 : Each comment-based help keyword should be indented with 4 spaces and each keyword's text should be indented 8 spaces.

Applied to files:

  • CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
  • GitHub Check: PSScriptAnalyzer
  • GitHub Check: PSScriptAnalyzer
🔇 Additional comments (1)
source/SqlServerDsc.psd1 (1)

33-34: CmdletsToExport='*' to surface class-based resources under PSDSC 2.0.7 — LGTM

Matches the agreed mitigation and keeps authoring guidance. The rationale comment is clear.

@raandree raandree deleted the fix/#2109 branch August 11, 2025 21:10
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.

Resources missing when using PSDesiredStateConfiguration 2.0.7

3 participants

Comments