Conversation
WalkthroughAdds branch-aware pipeline gating that invokes .build/Test-ShouldRunDscResourceIntegrationTests.ps1 (now supporting a -UseMergeBase mode) to compute a boolean ShouldRunDscResourceIntegrationTests; updates script docs, pipeline wiring, editor spell list, changelog, and style guidelines. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Pipeline as Azure Pipeline
participant Script as Test-ShouldRunDscResourceIntegrationTests.ps1
participant Git as Git repo
Pipeline->>Git: determine build context (PR target? default branch?)
alt PR build
Pipeline->>Script: invoke -BaseBranch origin/<PR target> -CurrentBranch HEAD
else Default branch build
Pipeline->>Pipeline: set ShouldRun = true
else Non-default branch build
Pipeline->>Script: invoke -BaseBranch origin/<defaultBranch> -CurrentBranch HEAD -UseMergeBase
end
Script->>Script: if -UseMergeBase compute merge-base(From,To) else use From
Script-->>Pipeline: return boolean ShouldRun
Pipeline->>Pipeline: export ShouldRunDscResourceIntegrationTests
Pipeline->>Stages: run integration/resource stages if lower(ShouldRun) == 'true'
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-08-17T09:48:55.756ZApplied to files:
📚 Learning: 2025-08-17T09:48:55.756ZApplied to files:
🪛 LanguageTool.build/README.md[grammar] ~1-~1: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~3-~3: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~7-~7: There might be a mistake here. (QB_NEW_EN) [grammar] ~8-~8: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~10-~10: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~14-~14: There might be a mistake here. (QB_NEW_EN) [grammar] ~15-~15: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~17-~17: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~30-~30: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~32-~32: There might be a mistake here. (QB_NEW_EN) [grammar] ~33-~33: There might be a mistake here. (QB_NEW_EN) [grammar] ~34-~34: There might be a mistake here. (QB_NEW_EN) [grammar] ~35-~35: There might be a mistake here. (QB_NEW_EN) [grammar] ~36-~36: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~38-~38: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~41-~41: There might be a mistake here. (QB_NEW_EN) [grammar] ~42-~42: There might be a mistake here. (QB_NEW_EN) [grammar] ~43-~43: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~46-~46: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~48-~48: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~51-~51: There might be a mistake here. (QB_NEW_EN) [grammar] ~52-~52: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~64-~64: There might be a mistake here. (QB_NEW_EN) [grammar] ~65-~65: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~76-~76: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) 🔇 Additional comments (6)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
.build/README.md (4)
45-47: Mention the requirement to set a step name when referencing outputsSince the reference pattern uses StepName.VariableName, call out explicitly that the producing step must have a name: property (not just displayName).
Example reference:
- dependencies.PreChecks.outputs['SetShouldRunVar.ShouldRunDscResourceIntegrationTests']
32-43: Optional: Show a gated stage/job example (aligns with repo practices)Add a short example demonstrating how to gate, e.g., Integration_Test_Resources_SqlServer stage, using the output variable. This aligns with the repo convention of grouping integration tests (per prior learnings).
stages: - stage: Integration_Test_Resources_SqlServer condition: and(succeeded(), eq(dependencies.PreChecks.outputs['SetShouldRunVar.ShouldRunDscResourceIntegrationTests'], 'true')) jobs: - job: Run_Resource_Tests steps: - script: echo "Running resource integration tests..."Note: Based on previously captured guidance about organizing integration test groups in the pipeline (referencing Integration_Test_* stages).
49-58: Fix PowerShell invocation and line continuation in CLI examples
- Use the call operator (&) when invoking a script by path.
- Forward slashes are fine, but prefix with ./ for relative path.
- PowerShell uses backtick (`) for line continuation, not backslash ().
```powershell # Basic usage (compares current HEAD with origin/main) -.build/Test-ShouldRunDscResourceIntegrationTests.ps1 +& ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches -.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ - -CurrentBranch 'feature-branch' +& ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 ` + -BaseBranch 'origin/dev' ` + -CurrentBranch 'feature-branch'--- `32-43`: **Update Azure Pipelines snippet in .build/README.md** - Use the full `PowerShell@2` task with `pwsh: true` (cross-platform) rather than the old `powershell:` shorthand. - Add a `name: determineDscResourceTests` so downstream jobs can reference `dependencies.<JobName>.outputs['determineDscResourceTests.ShouldRunDscResourceIntegrationTests']`. - Normalize the output to lowercase strings (`'true'`/`'false'`) for reliable conditions. - Initialize `$targetBranch` from `$(System.PullRequest.TargetBranch)`, falling back to `origin/main` if unset. ```diff File: .build/README.md Lines: 32-43 #### Azure Pipelines -The Azure Pipelines task sets an output variable that downstream stages can -use to conditionally run DSC resource integration tests. The script returns -a boolean value that the pipeline captures, e.g.: +The Azure Pipelines task sets an output variable that downstream stages can +use to conditionally run DSC resource integration tests. Example: -```yaml -- powershell: | - $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD - Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" - displayName: 'Determine if DSC resource tests should run' -``` +```yaml +- task: PowerShell@2 + name: determineDscResourceTests + displayName: 'Determine if DSC Resource Integration Tests Should Run' + inputs: + targetType: inline + script: | + # Determine the target branch (PR target or default to main) + $targetBranch = "origin/$(System.PullRequest.TargetBranch)" + if (-not $env:SYSTEM_PULLREQUEST_TARGETBRANCH) { + $targetBranch = 'origin/main' + } + + Write-Output "Target branch: $targetBranch" + Write-Output "Current branch: HEAD" + + # Run the DSC-tests detection script + $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 ` + -BaseBranch $targetBranch -CurrentBranch HEAD + + # Normalize and publish the boolean output + Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$($shouldRun.ToString().ToLower())" + pwsh: true +```
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- Jira integration is disabled
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.build/README.md(3 hunks)CHANGELOG.md(0 hunks)
💤 Files with no reviewable changes (1)
- CHANGELOG.md
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Applied to files:
.build/README.md
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to tests/Integration/Commands/*.Integration.Tests.ps1 : Include the standard integration test setup block (BeforeDiscovery/BeforeAll with module loading) before the first Describe block
Applied to files:
.build/README.md
🪛 LanguageTool
.build/README.md
[grammar] ~1-~1: Use correct spacing
Context: # Scripts Documentation for the specific SqlServer...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~3-~3: Use correct spacing
Context: ...ic SqlServerDsc module pipeline scripts. ## Test-ShouldRunDscResourceIntegrationTests.ps1 The script is used to dynamically determ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: There might be a mistake here.
Context: ...sed to dynamically determine whether DSC resource integration tests should run in...
(QB_NEW_EN)
[grammar] ~8-~8: Use correct spacing
Context: ...ion tests should run in Azure Pipelines. ### What the Script Does The `Test-ShouldRu...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~10-~10: Use correct spacing
Context: ...ure Pipelines. ### What the Script Does The `Test-ShouldRunDscResourceIntegratio...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~14-~14: There might be a mistake here.
Context: ...rs which public commands are used by DSC resources and classes, then checks if an...
(QB_NEW_EN)
[grammar] ~15-~15: Use correct spacing
Context: ...f any relevant files have been modified. ### How It Works The script checks for chan...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~17-~17: Use correct spacing
Context: ...es have been modified. ### How It Works The script checks for changes to: 1. **...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~30-~30: Use correct spacing
Context: ...tests/Integration/Resources/` ### Usage #### Azure Pipelines The Azure Pipelines tas...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~32-~32: Use correct spacing
Context: ...urces/` ### Usage #### Azure Pipelines The Azure Pipelines task sets an output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~49-~49: Use correct spacing
Context: ...rce tests should run. #### Command Line powershell # Basic usage (compares current HEAD with origin/main) .build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches .build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ -CurrentBranch 'feature-branch'
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🔇 Additional comments (3)
.build/README.md (3)
5-5: Section heading looks good
10-10: Heading level and content are clear
17-17: Clear breakdown of detection categoriesThe auto-numbered list and category definitions read well.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
.build/README.md (3)
36-41: Azure Pipelines: add step name to enable output variable consumptionTo reference step outputs via dependencies.Job.outputs['Step.Var'], the step must have a name.
Apply:
- powershell: | $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" displayName: 'Determine if DSC resource tests should run' + name: setShouldRunDscResourceTests
43-46: Show a concrete downstream usage with dependencies + conditionGive readers a copy-pasteable condition that gates a job on the step output. Using toLower hardens the comparison.
Apply:
Downstream stages reference this output variable using the pattern: `dependencies.JobName.outputs['StepName.VariableName']` to gate their execution based on whether DSC resource tests should run. + +Example: + +```yaml +jobs: +- job: DetermineTests + steps: + - powershell: | + $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD + Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" + name: setShouldRunDscResourceTests + displayName: 'Determine if DSC resource tests should run' + +- job: RunIntegration + displayName: 'Run DSC resource integration tests' + dependsOn: DetermineTests + condition: > + eq( + toLower(dependencies.DetermineTests.outputs['setShouldRunDscResourceTests.ShouldRunDscResourceIntegrationTests']), + 'true' + ) + steps: + - script: echo "Running integration tests..." +``` + +Note: Align the DetermineTests/RunIntegration job names with your pipeline. Per team conventions, you’ll typically wire this into the Integration_Test_Commands_SqlServer stage.I can open a follow-up PR to update azure-pipelines.yml with this gating, grouped under the appropriate Integration_Test_Commands_SqlServer buckets (based on our prior guideline).
49-56: PowerShell line continuation is incorrect; use backtick (not backslash)Backslash is not a line continuation in PowerShell; the sample would not run as intended. Also make the path explicitly relative for consistency.
Apply:
```powershell # Basic usage (compares current HEAD with origin/main) -.build/Test-ShouldRunDscResourceIntegrationTests.ps1 +./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches -.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ - -CurrentBranch 'feature-branch' +./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' ` + -CurrentBranch 'feature-branch'</blockquote></details> </blockquote></details>📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro💡 Knowledge Base configuration:
- Jira integration is disabled
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.build/README.md(3 hunks)🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR PR: dsccommunity/SqlServerDsc#0 File: .github/copilot-instructions.md:0-0 Timestamp: 2025-08-17T09:48:55.756Z Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate groupApplied to files:
.build/README.md📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR PR: dsccommunity/SqlServerDsc#0 File: .github/copilot-instructions.md:0-0 Timestamp: 2025-08-17T09:48:55.756Z Learning: Applies to tests/Integration/Commands/*.Integration.Tests.ps1 : Include the standard integration test setup block (BeforeDiscovery/BeforeAll with module loading) before the first Describe blockApplied to files:
.build/README.md🪛 LanguageTool
.build/README.md
[grammar] ~1-~1: Use correct spacing
Context: # .build scripts Documentation for the SqlServerDsc modul...(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~3-~3: Use correct spacing
Context: ...ServerDsc module build/pipeline scripts. ##Test-ShouldRunDscResourceIntegrationTests.ps1This script dynamically determines wheth...(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~8-~8: Use correct spacing
Context: ...zure Pipelines. ### What the Script Does The `Test-ShouldRunDscResourceIntegratio...(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~12-~12: There might be a mistake here.
Context: ...rs which public commands are used by DSC resources and classes, then checks if an...(QB_NEW_EN)
[grammar] ~13-~13: Use correct spacing
Context: ...f any relevant files have been modified. ### How It Works The script checks for chan...(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~15-~15: Use correct spacing
Context: ...es have been modified. ### How It Works The script checks for changes to: 1. **...(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~28-~28: Use correct spacing
Context: ...tests/Integration/Resources/` ### Usage #### Azure Pipelines The Azure Pipelines tas...(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~30-~30: Use correct spacing
Context: ...urces/` ### Usage #### Azure Pipelines The Azure Pipelines task sets an output ...(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~47-~47: Use correct spacing
Context: ...rce tests should run. #### Command Linepowershell # Basic usage (compares current HEAD with origin/main) .build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches .build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ -CurrentBranch 'feature-branch'(QB_NEW_EN_OTHER_ERROR_IDS_5)
🪛 markdownlint-cli2 (0.17.2)
.build/README.md
7-7: Line length
Expected: 80; Actual: 104(MD013, line-length)
8-8: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above(MD022, blanks-around-headings)
⏰ 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). (2)
- GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
- GitHub Check: PSScriptAnalyzer
🔇 Additional comments (1)
.build/README.md (1)
1-1: Title scope is clear — good changeRenaming to “.build scripts” clarifies the scope of this README.
… and normalize output variable for DSC resource tests
…integration test script documentation
4b76372 to
3c11389
Compare
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
… in integration tests
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 7
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- Jira integration is disabled
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
.build/README.md(2 hunks).vscode/settings.json(1 hunks)CHANGELOG.md(0 hunks)azure-pipelines.yml(6 hunks)
💤 Files with no reviewable changes (1)
- CHANGELOG.md
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit Configuration File
**: # DSC Community GuidelinesTerminology
- Command: Public command
- Function: Private function
- Resource: DSC class-based resource
Build & Test Workflow
- Run project scripts in PowerShell from repository root
- Build after source changes:
.\build.ps1 -Tasks build- Test workflow: Build →
Invoke-Pester -Path @('<test paths>') -Output Detailed- New session required after class changes
File Organization
- Public commands:
source/Public/{CommandName}.ps1- Private functions:
source/Private/{FunctionName}.ps1- Unit tests:
tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1- Integration tests:
tests/Integration/Commands/{CommandName}.Integration.Tests.ps1Requirements
- Always update CHANGELOG.md Unreleased section
- Localize all strings using string keys
- Check DscResource.Common before creating private functions
- Separate reusable logic into private functions
- Add unit tests for all commands/functions/resources
- Add integration tests for all public commands and resources
Files:
azure-pipelines.yml
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Applied to files:
.build/README.mdazure-pipelines.yml
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to tests/Integration/Commands/*.Integration.Tests.ps1 : Include the standard integration test setup block (BeforeDiscovery/BeforeAll with module loading) before the first Describe block
Applied to files:
.build/README.md
🪛 LanguageTool
.build/README.md
[grammar] ~1-~1: Use correct spacing
Context: # .build scripts Documentation for the SqlServerDsc modul...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~3-~3: Use correct spacing
Context: ...erDsc module build and pipeline scripts. ## Test-ShouldRunDscResourceIntegrationTests.ps1 This script dynamically determines wheth...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: There might be a mistake here.
Context: ...s whether DSC resource integration tests should run in Azure Pipelines. ### What...
(QB_NEW_EN)
[grammar] ~8-~8: Use correct spacing
Context: ...ion tests should run in Azure Pipelines. ### What the Script Does <!-- markdownlint-d...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~10-~10: Use correct spacing
Context: ...ure Pipelines. ### What the Script Does The [`Test-ShouldRunDscResourceIntegrati...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~14-~14: There might be a mistake here.
Context: ...rs which public commands are used by DSC resources and classes, then checks if an...
(QB_NEW_EN)
[grammar] ~15-~15: Use correct spacing
Context: ...f any relevant files have been modified. ### How It Works The script checks for chan...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~17-~17: Use correct spacing
Context: ...es have been modified. ### How It Works The script checks for changes to: 1. **...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~30-~30: Use correct spacing
Context: .../Integration/Resources/` ### Parameters | Parameter | Type | Default | Purpose |...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~32-~32: There might be a mistake here.
Context: ...| Parameter | Type | Default | Purpose | |-----------|------|---------|---------|...
(QB_NEW_EN)
[grammar] ~33-~33: There might be a mistake here.
Context: ...|-----------|------|---------|---------| | BaseBranch | String | `'origin/main'...
(QB_NEW_EN)
[grammar] ~34-~34: There might be a mistake here.
Context: ...ain'| Base branch to compare against | |CurrentBranch| String |'HEAD'` | ...
(QB_NEW_EN)
[grammar] ~35-~35: Use correct spacing
Context: ... | Current branch or commit to compare | ### Usage #### Azure Pipelines The Azure P...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~37-~37: Use correct spacing
Context: ...branch or commit to compare | ### Usage #### Azure Pipelines The Azure Pipelines tas...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~39-~39: Use correct spacing
Context: ...mpare | ### Usage #### Azure Pipelines The Azure Pipelines task sets an output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~42-~42: There might be a mistake here.
Context: ...ce integration tests. The script returns a boolean value that the pipeline captur...
(QB_NEW_EN)
[grammar] ~43-~43: Use correct spacing
Context: ... value that the pipeline captures, e.g.: yaml - powershell: | $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" displayName: 'Determine if DSC resource tests should run' Downstream stages reference this output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~54-~54: There might be a mistake here.
Context: ... output variable in a stage condition: using the pattern: <!-- markdownlint-dis...
(QB_NEW_EN)
[grammar] ~55-~55: Use correct spacing
Context: ... a stage condition: using the pattern: yaml condition: | and( succeeded(), eq(lower(dependencies.stageName.outputs['jobName.taskName.ShouldRunDscResourceIntegrationTests']), 'true')` ) #### Command Line ```powershell # Basic usag...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~67-~67: Use correct spacing
Context: ...lint-enable MD013 --> #### Command Line powershell # Basic usage (compares current HEAD with origin/main) .build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches .build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ -CurrentBranch 'feature-branch'
(QB_NEW_EN_OTHER_ERROR_IDS_5)
⏰ 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: dsccommunity.SqlServerDsc (Quality Test and Unit Test Unit)
- GitHub Check: dsccommunity.SqlServerDsc (Quality Test and Unit Test HQRM)
- GitHub Check: dsccommunity.SqlServerDsc (Quality Test and Unit Test Determine DSC Resource Test Requirements)
- GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
🔇 Additional comments (2)
.vscode/settings.json (1)
89-93: LGTM: dictionary additions are appropriateAdding SOURCEBRANCH, SOURCEBRANCHNAME, and setvariable aligns with the new Azure DevOps variable usage in the pipeline. No runtime impact.
azure-pipelines.yml (1)
452-452: Good: robust boolean handling in conditionsUsing lower(...) around the output before comparing to 'true' makes the gating resilient to different casings/types of the output variable.
Also applies to: 550-550, 646-646, 721-721, 788-788
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
azure-pipelines.yml (1)
286-301: Add all missing integration tests to PesterPath in azure-pipelines.ymlSeveral
.Integration.Tests.ps1files undertests/Integration/Commandsaren’t referenced in thePesterPatharray. Please include these scripts—grouped logically—so the CI stage covers every public command:Missing scripts:
- tests/Integration/Commands/Get-SqlDscInstalledInstance.Integration.Tests.ps1
- tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1
- tests/Integration/Commands/Test-SqlDscRSInstalled.Integration.Tests.ps1
- tests/Integration/Commands/Install-SqlDscReportingService.Integration.Tests.ps1
- tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1
- tests/Integration/Commands/Repair-SqlDscReportingService.Integration.Tests.ps1
- tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1
- tests/Integration/Commands/Uninstall-SqlDscReportingService.Integration.Tests.ps1
- tests/Integration/Commands/Uninstall-SqlDscBIReportServer.Integration.Tests.ps1
Example diff (insert after the Group 2 block):
# Group 2 'tests/Integration/Commands/Remove-SqlDscLogin.Integration.Tests.ps1' + # Group 3: Instance checks + 'tests/Integration/Commands/Get-SqlDscInstalledInstance.Integration.Tests.ps1' + 'tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1' + 'tests/Integration/Commands/Test-SqlDscRSInstalled.Integration.Tests.ps1' + # Group 4: Reporting Services install + 'tests/Integration/Commands/Install-SqlDscReportingService.Integration.Tests.ps1' + 'tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1' + # Group 5: Service repair + 'tests/Integration/Commands/Repair-SqlDscReportingService.Integration.Tests.ps1' + 'tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1' + # Group 6: Service uninstall + 'tests/Integration/Commands/Uninstall-SqlDscReportingService.Integration.Tests.ps1' + 'tests/Integration/Commands/Uninstall-SqlDscBIReportServer.Integration.Tests.ps1' # Group 9 'tests/Integration/Commands/Uninstall-SqlDscServer.Integration.Tests.ps1'This will ensure every integration test script under
tests/Integration/Commandsruns in CI.
♻️ Duplicate comments (3)
azure-pipelines.yml (3)
97-102: Normalize PR target branch before composing origin/System.PullRequest.TargetBranch often includes the refs/heads/ prefix. Using it verbatim yields origin/refs/heads/, which is not a valid remote-tracking ref.
Apply this diff to normalize:
- if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) - { - $targetBranch = "origin/$env:SYSTEM_PULLREQUEST_TARGETBRANCH" - Write-Host "Pull request detected, branch $targetBranch. Using script analysis to determine test requirements." - $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch 'HEAD' - } + if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) + { + $prTarget = $env:SYSTEM_PULLREQUEST_TARGETBRANCH + if ($prTarget -like 'refs/heads/*') { $prTarget = $prTarget.Substring(11) } + $targetBranch = "origin/$prTarget" + Write-Host "Pull request detected, branch $targetBranch. Using script analysis to determine test requirements." + $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch 'HEAD' + }
103-107: Fix PowerShell env var name and stray quote in elseif conditionPowerShell environment variables use underscores, not dots. There is also an extra trailing single quote causing a syntax error.
Apply this diff:
- elseif ($env:BUILD.SOURCEBRANCHNAME -eq '$(defaultBranch)'') + elseif ($env:BUILD_SOURCEBRANCHNAME -eq '$(defaultBranch)') { Write-Host "Target is default branch ($(defaultBranch)). Always running DSC resource integration tests." $shouldRun = $true }
108-112: Use correct env var and avoid hardcoding base branchReplace the dotted env var with the proper underscore name and parameterize the base branch with $(defaultBranch) to avoid drift.
Apply this diff:
- Write-Host "Target is non-default branch ($env:BUILD.SOURCEBRANCH). Using script analysis to determine test requirements against default branch." - $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/main' -CurrentBranch $env:BUILD.SOURCEBRANCH + Write-Host "Target is non-default branch ($env:BUILD_SOURCEBRANCH). Using script analysis to determine test requirements against default branch." + $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch "origin/$(defaultBranch)" -CurrentBranch $env:BUILD_SOURCEBRANCH
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- Jira integration is disabled
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
azure-pipelines.yml(6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
azure-pipelines.yml
📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Files:
azure-pipelines.yml
**
⚙️ CodeRabbit Configuration File
**: # DSC Community GuidelinesTerminology
- Command: Public command
- Function: Private function
- Resource: DSC class-based resource
Build & Test Workflow
- Run project scripts in PowerShell from repository root
- Build after source changes:
.\build.ps1 -Tasks build- Test workflow: Build →
Invoke-Pester -Path @('<test paths>') -Output Detailed- New session required after class changes
File Organization
- Public commands:
source/Public/{CommandName}.ps1- Private functions:
source/Private/{FunctionName}.ps1- Unit tests:
tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1- Integration tests:
tests/Integration/Commands/{CommandName}.Integration.Tests.ps1Requirements
- Always update CHANGELOG.md Unreleased section
- Localize all strings using string keys
- Check DscResource.Common before creating private functions
- Separate reusable logic into private functions
- Add unit tests for all commands/functions/resources
- Add integration tests for all public commands and resources
Files:
azure-pipelines.yml
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Applied to files:
azure-pipelines.yml
⏰ 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
… in test requirements script
… MD013 for long tables/code blocks
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.build/README.md (1)
79-81: PowerShell line continuation uses backtick (`), not backslashBackslash line breaks won’t work in PowerShell. Use the backtick or place parameters on one line.
-.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ - -CurrentBranch 'feature-branch' +.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' ` + -CurrentBranch 'feature-branch'
♻️ Duplicate comments (4)
azure-pipelines.yml (3)
103-107: Fix PowerShell env var name and condition syntaxUse $env:BUILD_SOURCEBRANCHNAME (underscore), not $env:BUILD.SOURCEBRANCHNAME (dot).
- elseif ($env:BUILD.SOURCEBRANCHNAME -eq '$(defaultBranch)') + elseif ($env:BUILD_SOURCEBRANCHNAME -eq '$(defaultBranch)') { Write-Host "Target is default branch ($(defaultBranch)). Always running DSC resource integration tests." $shouldRun = $true }
97-102: Normalize PR target branch ref before prefixing with origin/SYSTEM_PULLREQUEST_TARGETBRANCH often includes the refs/heads/ prefix. Using it directly yields origin/refs/heads/, which won’t exist as a remote-tracking ref locally.
- if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) - { - $targetBranch = "origin/$env:SYSTEM_PULLREQUEST_TARGETBRANCH" - Write-Host "Pull request detected, targeting branch $targetBranch. Using script analysis to determine test requirements." - $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch 'HEAD' - } + if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) + { + $prTarget = $env:SYSTEM_PULLREQUEST_TARGETBRANCH + if ($prTarget -like 'refs/heads/*') { $prTarget = $prTarget.Substring(11) } + $targetBranch = "origin/$prTarget" + Write-Host "Pull request detected, targeting base $targetBranch. Using script analysis to determine test requirements." + $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch 'HEAD' + }
94-118: Make output deterministic and log evaluated refs for diagnosticsEmit explicit 'true'/'false' strings and log BaseRef/CurrentRef to aid troubleshooting. This also allows conditions to compare directly without a lowercase function.
- # Determine if we should run DSC resource integration tests based on branch logic - $shouldRun = $false - - if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) - { - $targetBranch = "origin/$env:SYSTEM_PULLREQUEST_TARGETBRANCH" - Write-Host "Pull request detected, targeting branch $targetBranch. Using script analysis to determine test requirements." - $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch 'HEAD' - } - elseif ($env:BUILD.SOURCEBRANCHNAME -eq '$(defaultBranch)') - { - Write-Host "Target is default branch ($(defaultBranch)). Always running DSC resource integration tests." - $shouldRun = $true - } - else - { - Write-Host "Target is non-default branch ($env:BUILD.SOURCEBRANCH). Using script analysis to determine test requirements against default branch." - $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch "origin/$env:BUILD.SOURCEBRANCH" -CurrentBranch 'HEAD' - } - - # Set Azure DevOps output variable for pipeline conditions - Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" - - Write-Host "Variable ShouldRunDscResourceIntegrationTests is set to: $shouldRun" + # Determine if we should run DSC resource integration tests based on branch logic + $shouldRun = $false + $baseRef = $null + $currentRef = 'HEAD' + + if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) + { + $prTarget = $env:SYSTEM_PULLREQUEST_TARGETBRANCH + if ($prTarget -like 'refs/heads/*') { $prTarget = $prTarget.Substring(11) } + $baseRef = "origin/$prTarget" + Write-Host "Pull request detected. Using script analysis to determine test requirements." + $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $baseRef -CurrentBranch $currentRef + } + elseif ($env:BUILD_SOURCEBRANCHNAME -eq '$(defaultBranch)') + { + $baseRef = "origin/$(defaultBranch)" + Write-Host "Target is default branch ($(defaultBranch)). Always running DSC resource integration tests." + $shouldRun = $true + } + else + { + $baseRef = "origin/$(defaultBranch)" + Write-Host "Target is non-default branch ($env:BUILD_SOURCEBRANCH). Using script analysis to determine test requirements against default branch." + $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $baseRef -CurrentBranch $currentRef + } + + $shouldRunStr = if ($shouldRun) { 'true' } else { 'false' } + + Write-Host "Determine DSC Resource Tests - BaseRef: $baseRef" + Write-Host "Determine DSC Resource Tests - CurrentRef: $currentRef" + Write-Host "Determine DSC Resource Tests - ShouldRun: $shouldRunStr" + + # Set Azure DevOps output variable for pipeline conditions + Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRunStr".build/README.md (1)
10-16: Use a shorter heading and keep link formatting consistentOptional wording tweak: “What It Does” is concise and avoids repeating “Script.”
-### What the Script Does +### What It Does
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- Jira integration is disabled
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.build/README.md(2 hunks).github/instructions/dsc-community-style-guidelines-markdown.instructions.md(1 hunks)azure-pipelines.yml(6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
azure-pipelines.yml
📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Files:
azure-pipelines.yml
**
⚙️ CodeRabbit Configuration File
**: # DSC Community GuidelinesTerminology
- Command: Public command
- Function: Private function
- Resource: DSC class-based resource
Build & Test Workflow
- Run project scripts in PowerShell from repository root
- Build after source changes:
.\build.ps1 -Tasks build- Test workflow: Build →
Invoke-Pester -Path @('<test paths>') -Output Detailed- New session required after class changes
File Organization
- Public commands:
source/Public/{CommandName}.ps1- Private functions:
source/Private/{FunctionName}.ps1- Unit tests:
tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1- Integration tests:
tests/Integration/Commands/{CommandName}.Integration.Tests.ps1Requirements
- Always update CHANGELOG.md Unreleased section
- Localize all strings using string keys
- Check DscResource.Common before creating private functions
- Separate reusable logic into private functions
- Add unit tests for all commands/functions/resources
- Add integration tests for all public commands and resources
Files:
azure-pipelines.yml
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to **/*.md : Markdown: wrap lines at word boundaries when exceeding 80 characters; use 2 spaces for indentation
Applied to files:
.github/instructions/dsc-community-style-guidelines-markdown.instructions.md
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Applied to files:
azure-pipelines.yml.build/README.md
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to tests/Integration/Commands/*.Integration.Tests.ps1 : Include the standard integration test setup block (BeforeDiscovery/BeforeAll with module loading) before the first Describe block
Applied to files:
.build/README.md
🪛 LanguageTool
.github/instructions/dsc-community-style-guidelines-markdown.instructions.md
[grammar] ~8-~8: There might be a mistake here.
Context: ...0 characters (except tables/code blocks) - Use 2 spaces for indentation - Use '1.' ...
(QB_NEW_EN_OTHER)
[grammar] ~12-~12: Use articles correctly
Context: ...d fenced code blocks with blank lines - Disable MD013 rule for tables/code blocks exc...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~12-~12: There might be a mistake here.
Context: ...bles/code blocks exceeding 80 characters
(QB_NEW_EN_OTHER)
.build/README.md
[grammar] ~1-~1: Use correct spacing
Context: # .build scripts Documentation for the SqlServerDsc modul...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~3-~3: Use correct spacing
Context: ...erDsc module build and pipeline scripts. ## Test-ShouldRunDscResourceIntegrationTests.ps1 This script dynamically determines wheth...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: There might be a mistake here.
Context: ...s whether DSC resource integration tests should run in Azure Pipelines. ### What...
(QB_NEW_EN)
[grammar] ~8-~8: Use correct spacing
Context: ...ion tests should run in Azure Pipelines. ### What the Script Does <!-- markdownlint-d...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~10-~10: Use correct spacing
Context: ...ure Pipelines. ### What the Script Does The [`Test-ShouldRunDscResourceIntegrati...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~14-~14: There might be a mistake here.
Context: ...rs which public commands are used by DSC resources and classes, then checks if an...
(QB_NEW_EN)
[grammar] ~15-~15: Use correct spacing
Context: ...f any relevant files have been modified. ### How It Works The script checks for chan...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~17-~17: Use correct spacing
Context: ...es have been modified. ### How It Works The script checks for changes to: 1. **...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~30-~30: Use correct spacing
Context: .../Integration/Resources/` ### Parameters | Parameter | Type | Default | Purpose |...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~32-~32: There might be a mistake here.
Context: ...| Parameter | Type | Default | Purpose | |-----------|------|---------|---------|...
(QB_NEW_EN)
[grammar] ~33-~33: There might be a mistake here.
Context: ...|-----------|------|---------|---------| | BaseBranch | String | `'origin/main'...
(QB_NEW_EN)
[grammar] ~34-~34: There might be a mistake here.
Context: ...ain'| Base branch to compare against | |CurrentBranch| String |'HEAD'` | ...
(QB_NEW_EN)
[grammar] ~35-~35: Use correct spacing
Context: ... | Current branch or commit to compare | ### Outputs | Output | Type | Description |...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~37-~37: Use correct spacing
Context: ...anch or commit to compare | ### Outputs | Output | Type | Description | |-------...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~39-~39: There might be a mistake here.
Context: ...Outputs | Output | Type | Description | |--------|------|-------------| | Return...
(QB_NEW_EN)
[grammar] ~40-~40: There might be a mistake here.
Context: ...iption | |--------|------|-------------| | Return value | Boolean | $true if br...
(QB_NEW_EN)
[grammar] ~41-~41: Use correct spacing
Context: ...if branches differ, $false otherwise | ### Usage #### Azure Pipelines The Azure P...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~43-~43: Use correct spacing
Context: ... differ, $false otherwise | ### Usage #### Azure Pipelines The Azure Pipelines tas...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~45-~45: Use correct spacing
Context: ...rwise | ### Usage #### Azure Pipelines The Azure Pipelines task sets an output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~48-~48: There might be a mistake here.
Context: ...ce integration tests. The script returns a boolean value that the pipeline captur...
(QB_NEW_EN)
[grammar] ~49-~49: Use correct spacing
Context: ... value that the pipeline captures, e.g.: yaml - powershell: | $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" displayName: 'Determine if DSC resource tests should run' Downstream stages reference this output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~60-~60: There might be a mistake here.
Context: ... output variable in a stage condition: using the pattern: <!-- markdownlint-dis...
(QB_NEW_EN)
[grammar] ~61-~61: Use correct spacing
Context: ... a stage condition: using the pattern: yaml condition: | and( succeeded(), eq(lower(dependencies.stageName.outputs['jobName.taskName.ShouldRunDscResourceIntegrationTests']), 'true') ) #### Command Line ```powershell # Basic usag...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~72-~72: Use correct spacing
Context: ...lint-enable MD013 --> #### Command Line powershell # Basic usage (compares current HEAD with origin/main) .build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches .build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ -CurrentBranch 'feature-branch'
(QB_NEW_EN_OTHER_ERROR_IDS_5)
⏰ 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
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (3)
.github/instructions/dsc-community-style-guidelines-markdown.instructions.md (2)
8-8: Clarify phrasing: “except in tables or code blocks”Improves readability and aligns with natural English.
- - Wrap lines at word boundaries when over 80 characters (except tables/code blocks) + - Wrap lines at word boundaries when over 80 characters (except in tables or code blocks)
12-12: Use an article and parallel phrasing; specify “that exceed”Reads more naturally and matches terminology used elsewhere in the repo.
- - Disable `MD013` rule by adding a comment for tables/code blocks exceeding 80 characters + - Disable the `MD013` rule for tables and code blocks that exceed 80 characters.build/README.md (1)
10-12: Tighten heading and capitalize GitMinor doc polish: more concise section title; use proper “Git” capitalization.
-### What the Script Does +### What It Does <!-- markdownlint-disable-next-line MD013 --> -The [`Test-ShouldRunDscResourceIntegrationTests.ps1`](./Test-ShouldRunDscResourceIntegrationTests.ps1) script analyzes git +The [`Test-ShouldRunDscResourceIntegrationTests.ps1`](./Test-ShouldRunDscResourceIntegrationTests.ps1) script analyzes Git
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- Jira integration is disabled
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.build/README.md(2 hunks).github/instructions/dsc-community-style-guidelines-markdown.instructions.md(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to **/*.md : Markdown: wrap lines at word boundaries when exceeding 80 characters; use 2 spaces for indentation
Applied to files:
.github/instructions/dsc-community-style-guidelines-markdown.instructions.md
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Applied to files:
.build/README.md
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to tests/Integration/Commands/*.Integration.Tests.ps1 : Include the standard integration test setup block (BeforeDiscovery/BeforeAll with module loading) before the first Describe block
Applied to files:
.build/README.md
🪛 LanguageTool
.github/instructions/dsc-community-style-guidelines-markdown.instructions.md
[grammar] ~8-~8: There might be a mistake here.
Context: ...0 characters (except tables/code blocks) - Use 2 spaces for indentation - Use '1.' ...
(QB_NEW_EN_OTHER)
[grammar] ~12-~12: Use articles correctly
Context: ...d fenced code blocks with blank lines - Disable MD013 rule by adding a comment for ta...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~12-~12: There might be a mistake here.
Context: ...bles/code blocks exceeding 80 characters
(QB_NEW_EN_OTHER)
.build/README.md
[grammar] ~1-~1: Use correct spacing
Context: # .build scripts Documentation for the SqlServerDsc modul...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~3-~3: Use correct spacing
Context: ...erDsc module build and pipeline scripts. ## Test-ShouldRunDscResourceIntegrationTests.ps1 This script dynamically determines wheth...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: There might be a mistake here.
Context: ...s whether DSC resource integration tests should run in Azure Pipelines. ### What...
(QB_NEW_EN)
[grammar] ~8-~8: Use correct spacing
Context: ...ion tests should run in Azure Pipelines. ### What the Script Does <!-- markdownlint-d...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~10-~10: Use correct spacing
Context: ...ure Pipelines. ### What the Script Does The [`Test-ShouldRunDscResourceIntegrati...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~14-~14: There might be a mistake here.
Context: ...rs which public commands are used by DSC resources and classes, then checks if an...
(QB_NEW_EN)
[grammar] ~15-~15: Use correct spacing
Context: ...f any relevant files have been modified. ### How It Works The script checks for chan...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~17-~17: Use correct spacing
Context: ...es have been modified. ### How It Works The script checks for changes to: 1. **...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~30-~30: Use correct spacing
Context: .../Integration/Resources/` ### Parameters | Parameter | Type | Default | Purpose |...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~32-~32: There might be a mistake here.
Context: ...| Parameter | Type | Default | Purpose | |-----------|------|---------|---------|...
(QB_NEW_EN)
[grammar] ~33-~33: There might be a mistake here.
Context: ...|-----------|------|---------|---------| | BaseBranch | String | `'origin/main'...
(QB_NEW_EN)
[grammar] ~34-~34: There might be a mistake here.
Context: ...ain'| Base branch to compare against | |CurrentBranch| String |'HEAD'` | ...
(QB_NEW_EN)
[grammar] ~35-~35: Use correct spacing
Context: ... | Current branch or commit to compare | ### Outputs <!-- markdownlint-disable MD013...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~37-~37: Use correct spacing
Context: ...anch or commit to compare | ### Outputs | Output | Type | Description | |-------...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~40-~40: There might be a mistake here.
Context: ...ions --> | Output | Type | Description | |--------|------|-------------| | Return...
(QB_NEW_EN)
[grammar] ~41-~41: There might be a mistake here.
Context: ...iption | |--------|------|-------------| | Return value | Boolean | $true when ...
(QB_NEW_EN)
[grammar] ~42-~42: Use correct spacing
Context: ...lse` when no such changes are detected | ### Usage #### Azure Pipelines The Azure P...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~45-~45: Use correct spacing
Context: ...markdownlint-enable MD013 --> ### Usage #### Azure Pipelines The Azure Pipelines tas...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~47-~47: Use correct spacing
Context: ...013 --> ### Usage #### Azure Pipelines The Azure Pipelines task sets an output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~50-~50: There might be a mistake here.
Context: ...ce integration tests. The script returns a boolean value that the pipeline captur...
(QB_NEW_EN)
[grammar] ~51-~51: Use correct spacing
Context: ... value that the pipeline captures, e.g.: yaml - powershell: | $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" displayName: 'Determine if DSC resource tests should run' Downstream stages reference this output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~62-~62: There might be a mistake here.
Context: ... output variable in a stage condition: using the pattern: <!-- markdownlint-dis...
(QB_NEW_EN)
[grammar] ~63-~63: Use correct spacing
Context: ... a stage condition: using the pattern: yaml condition: | and( succeeded(), eq(lower(dependencies.stageName.outputs['jobName.taskName.ShouldRunDscResourceIntegrationTests']), 'true') ) #### Command Line ```powershell # Basic usag...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~74-~74: Use correct spacing
Context: ...lint-enable MD013 --> #### Command Line powershell # Basic usage (compares current HEAD with origin/main) .build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches .build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ -CurrentBranch 'feature-branch'
(QB_NEW_EN_OTHER_ERROR_IDS_5)
⏰ 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 (7)
.build/README.md (7)
1-1: Good re-title: scoped to “.build scripts”The heading clearly signals the README’s scope.
3-3: Wording LGTM“build and pipeline scripts” is clear and consistent.
17-29: Change categorization is clear and actionableThe five monitored categories are well-defined and match the script’s behavior.
30-36: Parameters section reads wellDefaults and purposes are explicit. No changes needed.
37-44: Output semantics clarified correctlyAccurately conveys that the boolean is based on monitored changes between refs.
7-9: Line wrapping and lint suppressions are applied correctlyComplies with MD013 guidance and the repo’s markdown style.
74-83: Command-line examples are clearGood defaults and an override example; nothing to change.
…e branch determination
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.build/Test-ShouldRunDscResourceIntegrationTests.ps1 (1)
107-114: Escape identifiers in regex and use word-boundary-safe patternHyphens and other non-word chars in command/function names make
\bunreliable and can cause false negatives or false positives. Also, raw interpolation risks regex injection. Use[regex]::Escape(...)and a boundary-safe pattern.- foreach ($commandName in $publicCommandNames) + foreach ($commandName in $publicCommandNames) { - # Look for command usage patterns: commandName, & commandName, or | commandName - if ($content -match "\b$commandName\b") + # Look for command usage (use escaped name and word-boundary-safe checks). + $escaped = [regex]::Escape($commandName) + if ($content -match "(?<!\w)$escaped(?!\w)") { $usedCommands += $commandName } } @@ - $privateFunctionFiles = Get-ChildItem -Path (Join-Path -Path $SourcePath -ChildPath "Private") -Filter "*.ps1" | Select-Object -ExpandProperty BaseName + $privateFunctionFiles = Get-ChildItem -Path (Join-Path -Path $SourcePath -ChildPath "Private") -Filter "*.ps1" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName @@ - if ($content -match "\b$privateFunction\b") + $escaped = [regex]::Escape($privateFunction) + if ($content -match "(?<!\w)$escaped(?!\w)") { $privateFunctions += $privateFunction } @@ - if ($content -match "\b$privateFunction\b") + $escaped = [regex]::Escape($privateFunction) + if ($content -match "(?<!\w)$escaped(?!\w)") { $privateFunctions += $privateFunction }Also applies to: 131-136, 296-299, 363-366
.build/README.md (1)
75-85: Add a merge-base command-line exampleShowcli usage mirroring the new switch for feature-branch diffs.
# Custom branches .build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ -CurrentBranch 'feature-branch' + +# Compare only changes introduced by the current branch (via merge-base) +.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/main' -CurrentBranch 'HEAD' -UseMergeBase
♻️ Duplicate comments (4)
.build/README.md (1)
63-72: Fix function name in condition and reference the named stepAzure DevOps uses toLower(), not lower(). Also, align the outputs reference with the step name used above.
condition: | and( succeeded(), - eq(lower(dependencies.stageName.outputs['jobName.taskName.ShouldRunDscResourceIntegrationTests']), 'true') + eq(toLower(dependencies.stageName.outputs['jobName.determineShouldRun.ShouldRunDscResourceIntegrationTests']), 'true') )azure-pipelines.yml (3)
94-112: Fix PowerShell env vars, normalize PR target ref, and use merge-base for PRs
- Use underscores in env var names (BUILD_SOURCEBRANCHNAME/BUILD_SOURCEBRANCH).
- Normalize SYSTEM_PULLREQUEST_TARGETBRANCH (strip refs/heads/) before prefixing with origin/.
- Use -UseMergeBase for PRs to isolate branch-introduced changes.
- # Determine if we should run DSC resource integration tests based on branch logic - $shouldRun = $false - - if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) - { - $targetBranch = "origin/$env:SYSTEM_PULLREQUEST_TARGETBRANCH" - Write-Host "Pull request detected, targeting branch $targetBranch. Using script analysis to determine test requirements." - $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch 'HEAD' - } - elseif ($env:BUILD.SOURCEBRANCHNAME -eq '$(defaultBranch)') - { - Write-Host "Target is default branch ($(defaultBranch)). Always running DSC resource integration tests." - $shouldRun = $true - } - else - { - Write-Host "Target is non-default branch ($env:BUILD.SOURCEBRANCH). Using script analysis to determine test requirements against default branch." - $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch "origin/$(defaultBranch)" -CurrentBranch 'HEAD' -UseMergeBase - } + # Determine if we should run DSC resource integration tests based on branch logic + $shouldRun = $false + + if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH) + { + $prTarget = $env:SYSTEM_PULLREQUEST_TARGETBRANCH + if ($prTarget -like 'refs/heads/*') { $prTarget = $prTarget.Substring(11) } + $targetBranch = "origin/$prTarget" + Write-Host "Pull request detected, targeting branch $targetBranch. Using script analysis (merge-base) to determine test requirements." + $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch 'HEAD' -UseMergeBase + } + elseif ($env:BUILD_SOURCEBRANCHNAME -eq '$(defaultBranch)') + { + Write-Host "Target is default branch ($(defaultBranch)). Always running DSC resource integration tests." + $shouldRun = $true + } + else + { + Write-Host "Target is non-default branch ($env:BUILD_SOURCEBRANCH). Using script analysis (merge-base) to determine test requirements against default branch." + $shouldRun = & ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch "origin/$(defaultBranch)" -CurrentBranch 'HEAD' -UseMergeBase + }
452-453: Fix unsupported lower(...) in conditionsAzure DevOps expressions provide toLower(), not lower(). Either switch to toLower(), or if you adopt explicit 'true'/'false' outputs, compare directly.
- eq(lower(dependencies.Quality_Test_and_Unit_Test.outputs['Determine_DSC_Resource_Test_Requirements.determineDscResourceTests.ShouldRunDscResourceIntegrationTests']), 'true') + eq(toLower(dependencies.Quality_Test_and_Unit_Test.outputs['Determine_DSC_Resource_Test_Requirements.determineDscResourceTests.ShouldRunDscResourceIntegrationTests']), 'true')Also applies to: 550-551, 645-646, 721-722, 788-789
115-117: Optional: Normalize output to explicit strings for more robust conditionsBooleans may serialize as “True/False”. Emitting 'true'/'false' avoids case functions in conditions and makes logs consistent.
- Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" - - Write-Host "Variable ShouldRunDscResourceIntegrationTests is set to: $shouldRun" + $shouldRunStr = if ($shouldRun) { 'true' } else { 'false' } + Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRunStr" + Write-Host "Variable ShouldRunDscResourceIntegrationTests is set to: $shouldRunStr"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- Jira integration is disabled
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.build/README.md(2 hunks).build/Test-ShouldRunDscResourceIntegrationTests.ps1(9 hunks)azure-pipelines.yml(6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
azure-pipelines.yml
📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Files:
azure-pipelines.yml
**
⚙️ CodeRabbit Configuration File
**: # DSC Community GuidelinesTerminology
- Command: Public command
- Function: Private function
- Resource: DSC class-based resource
Build & Test Workflow
- Run project scripts in PowerShell from repository root
- Build after source changes:
.\build.ps1 -Tasks build- Test workflow: Build →
Invoke-Pester -Path @('<test paths>') -Output Detailed- New session required after class changes
File Organization
- Public commands:
source/Public/{CommandName}.ps1- Private functions:
source/Private/{FunctionName}.ps1- Unit tests:
tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1- Integration tests:
tests/Integration/Commands/{CommandName}.Integration.Tests.ps1Requirements
- Always update CHANGELOG.md Unreleased section
- Localize all strings using string keys
- Check DscResource.Common before creating private functions
- Separate reusable logic into private functions
- Add unit tests for all commands/functions/resources
- Add integration tests for all public commands and resources
Files:
azure-pipelines.yml
🧠 Learnings (2)
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to azure-pipelines.yml : Add each public command integration test script to a group within the Integration_Test_Commands_SqlServer stage in ./azure-pipelines.yml, choosing the appropriate group
Applied to files:
azure-pipelines.yml.build/README.md
📚 Learning: 2025-08-17T09:48:55.756Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T09:48:55.756Z
Learning: Applies to tests/Integration/Commands/*.Integration.Tests.ps1 : Include the standard integration test setup block (BeforeDiscovery/BeforeAll with module loading) before the first Describe block
Applied to files:
.build/README.md
🪛 LanguageTool
.build/README.md
[grammar] ~1-~1: Use correct spacing
Context: # .build scripts Documentation for the SqlServerDsc modul...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~3-~3: Use correct spacing
Context: ...erDsc module build and pipeline scripts. ## Test-ShouldRunDscResourceIntegrationTests.ps1 This script dynamically determines wheth...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: There might be a mistake here.
Context: ...s whether DSC resource integration tests should run in Azure Pipelines. ### What...
(QB_NEW_EN)
[grammar] ~8-~8: Use correct spacing
Context: ...ion tests should run in Azure Pipelines. ### What the Script Does <!-- markdownlint-d...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~10-~10: Use correct spacing
Context: ...ure Pipelines. ### What the Script Does The [`Test-ShouldRunDscResourceIntegrati...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~14-~14: There might be a mistake here.
Context: ...rs which public commands are used by DSC resources and classes, then checks if an...
(QB_NEW_EN)
[grammar] ~15-~15: Use correct spacing
Context: ...f any relevant files have been modified. ### How It Works The script checks for chan...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~17-~17: Use correct spacing
Context: ...es have been modified. ### How It Works The script checks for changes to: 1. **...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~30-~30: Use correct spacing
Context: .../Integration/Resources/` ### Parameters | Parameter | Type | Default | Purpose |...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~32-~32: There might be a mistake here.
Context: ...| Parameter | Type | Default | Purpose | |-----------|------|---------|---------|...
(QB_NEW_EN)
[grammar] ~33-~33: There might be a mistake here.
Context: ...|-----------|------|---------|---------| | BaseBranch | String | `'origin/main'...
(QB_NEW_EN)
[grammar] ~34-~34: There might be a mistake here.
Context: ...ain'| Base branch to compare against | |CurrentBranch| String |'HEAD'` | ...
(QB_NEW_EN)
[grammar] ~35-~35: Use correct spacing
Context: ... | Current branch or commit to compare | ### Outputs <!-- markdownlint-disable MD013...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~37-~37: Use correct spacing
Context: ...anch or commit to compare | ### Outputs | Output | Type | Description | |-------...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~40-~40: There might be a mistake here.
Context: ...ions --> | Output | Type | Description | |--------|------|-------------| | Return...
(QB_NEW_EN)
[grammar] ~41-~41: There might be a mistake here.
Context: ...iption | |--------|------|-------------| | Return value | Boolean | $true when ...
(QB_NEW_EN)
[grammar] ~42-~42: Use correct spacing
Context: ...lse` when no such changes are detected | ### Usage #### Azure Pipelines The Azure P...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~45-~45: Use correct spacing
Context: ...markdownlint-enable MD013 --> ### Usage #### Azure Pipelines The Azure Pipelines tas...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~47-~47: Use correct spacing
Context: ...013 --> ### Usage #### Azure Pipelines The Azure Pipelines task sets an output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~50-~50: There might be a mistake here.
Context: ...ce integration tests. The script returns a boolean value that the pipeline captur...
(QB_NEW_EN)
[grammar] ~51-~51: Use correct spacing
Context: ... value that the pipeline captures, e.g.: yaml - powershell: | $shouldRun = ./.build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch $targetBranch -CurrentBranch HEAD Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun" displayName: 'Determine if DSC resource tests should run' name: determineShouldRun Downstream stages reference this output ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~63-~63: There might be a mistake here.
Context: ... output variable in a stage condition: using the pattern: <!-- markdownlint-dis...
(QB_NEW_EN)
[grammar] ~64-~64: Use correct spacing
Context: ... a stage condition: using the pattern: yaml condition: | and( succeeded(), eq(lower(dependencies.stageName.outputs['jobName.taskName.ShouldRunDscResourceIntegrationTests']), 'true') ) #### Command Line ```powershell # Basic usag...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~75-~75: Use correct spacing
Context: ...lint-enable MD013 --> #### Command Line powershell # Basic usage (compares current HEAD with origin/main) .build/Test-ShouldRunDscResourceIntegrationTests.ps1 # Custom branches .build/Test-ShouldRunDscResourceIntegrationTests.ps1 -BaseBranch 'origin/dev' \ -CurrentBranch 'feature-branch'
(QB_NEW_EN_OTHER_ERROR_IDS_5)
⏰ 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: dsccommunity.SqlServerDsc (Quality Test and Unit Test HQRM)
- GitHub Check: dsccommunity.SqlServerDsc (Quality Test and Unit Test Determine DSC Resource Test Requirements)
- GitHub Check: dsccommunity.SqlServerDsc (Quality Test and Unit Test Unit)
- GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
🔇 Additional comments (2)
.build/Test-ShouldRunDscResourceIntegrationTests.ps1 (2)
20-24: Good addition: document and example for -UseMergeBaseThe new parameter and example are clear and helpful for feature-branch comparisons. No issues.
Also applies to: 31-33
46-51: Plumbing -UseMergeBase end-to-end is correct
- Parameter surfaced at the script level
- Forwarded into Test-ShouldRunDscResourceIntegrationTests and Get-ChangedFiles
- Used when running as a script
Looks good.
Also applies to: 426-429, 451-452, 542-542
johlju
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r3, 1 of 3 files at r4, 1 of 2 files at r7, 1 of 3 files at r8, 2 of 2 files at r9, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @johlju)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2139 +/- ##
====================================
Coverage 94% 94%
====================================
Files 110 110
Lines 8171 8171
====================================
Hits 7732 7732
Misses 439 439
🚀 New features to boost your workflow:
|
Pull Request (PR) description
This Pull Request (PR) fixes the following issues
None.
Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
This change is