Skip to content

Rename *-SqlDscBIReportServer to *-SqlDscPowerBIReportServer#2363

Merged
johlju merged 6 commits intomainfrom
copilot/rename-sqldscbi-to-sqldscpowerbi
Dec 7, 2025
Merged

Rename *-SqlDscBIReportServer to *-SqlDscPowerBIReportServer#2363
johlju merged 6 commits intomainfrom
copilot/rename-sqldscbi-to-sqldscpowerbi

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 6, 2025

Pull Request (PR) description

Renamed commands from *-SqlDscBIReportServer to *-SqlDscPowerBIReportServer for clarity. Maintains backward compatibility via aliases for both *-SqlDscBIReportServer and *-SqlDscPBIReportServer.

Changes:

  • Renamed source files and function definitions for Install/Uninstall/Repair commands
  • Added PowerShell aliases using [Alias()] attribute for backward compatibility (following module's standard pattern)
  • Updated SqlRSSetup class to call new command names
  • Renamed and updated all unit and integration test files
  • Updated azure-pipelines.yml and integration test documentation
  • Fixed mock command names in SqlRSSetup unit tests to use new command names

Example usage:

# New primary names (recommended)
Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe'

# Old names still work via aliases
Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe'
Install-SqlDscPBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe'

This Pull Request (PR) fixes the following issues

None

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.
Original prompt

This section details on the original issue you should resolve

<issue_title>*-SqlDscBIReportServer: Rename to *-SqlDscPowerBIReportServer</issue_title>
<issue_description>Suggest renaming the the commands with noun SqlDscBIReportServer to SqlDscPowerBIReportServer to more clearly say what it is it manages. </issue_description>

<agent_instructions>Resolve this issue. Follow instructions closely. Also *-SqlDscBIReportServer and *-SqlDscPBIReportServer should be kept as aliases. Rename commands and files, source files, unit and integrations tests.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@johlju `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer` could be kept as aliases.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


This change is Reviewable

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 6, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Renamed BI Report Server public commands from *-SqlDscBIReportServer to *-SqlDscPowerBIReportServer, added backward-compatible aliases for the old names, and updated all internal references, tests, CI pipeline entries, and documentation to use the new command names.

Changes

Cohort / File(s) Change Summary
Public Commands
source/Public/Install-SqlDscPowerBIReportServer.ps1, source/Public/Repair-SqlDscPowerBIReportServer.ps1, source/Public/Uninstall-SqlDscPowerBIReportServer.ps1
Functions renamed to Install-/Repair-/Uninstall-SqlDscPowerBIReportServer; each new function added [Alias(...)] exposing the old names (*-SqlDscBIReportServer, *-SqlDscPBIReportServer) for backward compatibility.
Internal Implementation
source/Classes/020.SqlRSSetup.ps1
Replaced calls to *-SqlDscBIReportServer variants with the new *-SqlDscPowerBIReportServer variants in Install/Repair/Uninstall branches.
Integration Tests
tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1, tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1, tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1
Updated test Describe blocks, comments, splat variable names (where applicable), and actual cmdlet invocations to the new *-SqlDscPowerBIReportServer names.
Unit Tests
tests/Unit/Public/Install-SqlDscPowerBIReportServer.Tests.ps1, tests/Unit/Public/Repair-SqlDscPowerBIReportServer.Tests.ps1, tests/Unit/Public/Uninstall-SqlDscPowerBIReportServer.Tests.ps1, tests/Unit/Classes/SqlRSSetup.Tests.ps1
Replaced mocks, expectations, Should -Invoke assertions, and all test references from *-SqlDscBIReportServer to *-SqlDscPowerBIReportServer; adjusted PBIRS-related test blocks accordingly.
CI / Docs / Changelog
azure-pipelines.yml, tests/Integration/Commands/README.md, CHANGELOG.md
CI integration test script filenames and pipeline references updated from BI variants to PowerBI variants; documentation run-order and changelog entries updated to reflect the new command names.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to:
    • Presence and correctness of [Alias(...)] attributes on all three public functions.
    • Any leftover references to old names in tests, CI, docs, or examples.
    • Consistency between function parameter sets and their help/example text after renaming.

Possibly related PRs

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: renaming commands from *-SqlDscBIReportServer to *-SqlDscPowerBIReportServer.
Description check ✅ Passed The description is well-detailed and directly related to the changeset, explaining the rename, backward compatibility via aliases, and providing example usage.
Linked Issues check ✅ Passed The PR meets all objectives from issue #2071: renamed commands to *-SqlDscPowerBIReportServer [#2071], preserved both old names as aliases [#2071], updated source files/implementations [#2071], and updated tests [#2071].
Out of Scope Changes check ✅ Passed All changes are directly aligned with the renaming objective; no unrelated or out-of-scope modifications detected beyond what is required for the rename.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits December 6, 2025 19:06
… with aliases

Co-authored-by: johlju <7189721+johlju@users.noreply.github.com>
…nd names

Co-authored-by: johlju <7189721+johlju@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename SqlDscBIReportServer to SqlDscPowerBIReportServer Rename *-SqlDscBIReportServer to *-SqlDscPowerBIReportServer Dec 6, 2025
Copilot AI requested a review from johlju December 6, 2025 19:13
Copy link
Copy Markdown
Member

@johlju johlju left a comment

Choose a reason for hiding this comment

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

Please resolve these commdnts

Comment thread source/Public/Install-SqlDscPowerBIReportServer.ps1 Outdated
Co-authored-by: johlju <7189721+johlju@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 6, 2025

Please resolve these commdnts

Updated to use [Alias()] attribute instead of Set-Alias to match the module's standard pattern (f858de7).

Copilot AI requested a review from johlju December 6, 2025 19:32
@johlju johlju marked this pull request as ready for review December 6, 2025 19:35
@johlju johlju requested a review from a team as a code owner December 6, 2025 19:35
@johlju
Copy link
Copy Markdown
Member

johlju commented Dec 6, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 6, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/Unit/Classes/SqlRSSetup.Tests.ps1 (1)

869-918: Update Install and Repair mocks to match actual PowerBI command names.

The mocks for Install-SqlDscBIReportServer (lines 731, 762) and Repair-SqlDscBIReportServer (lines 1007, 1038) reference outdated command names. These should be updated to Install-SqlDscPowerBIReportServer and Repair-SqlDscPowerBIReportServer respectively, consistent with the corrected Uninstall-SqlDscPowerBIReportServer mocks in the verified lines 869-918. All three commands were renamed to include the PowerBI suffix in the source code.

🧹 Nitpick comments (6)
CHANGELOG.md (1)

24-26: Add explicit issue reference for the rename entry

The description is clear and matches the PR intent, but this bullet is missing a reference to the tracking issue, unlike most other Unreleased entries. To align with the changelog guidelines, consider appending an issue link, e.g.:

- Renamed commands `*-SqlDscBIReportServer` to `*-SqlDscPowerBIReportServer` for
- clarity. The old names `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer`
- are available as aliases for backward compatibility.
+ Renamed commands `*-SqlDscBIReportServer` to `*-SqlDscPowerBIReportServer` for
+ clarity. The old names `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer`
+ are available as aliases for backward compatibility
+ ([issue #2071](https://github.com/dsccommunity/SqlServerDsc/issues/2071)).
tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1 (1)

54-54: Update variable name for consistency.

The splat variable name $uninstallSqlDscBIReportServerParameters should be updated to reflect the new command name for consistency.

Apply this diff to update the variable name:

-            $uninstallSqlDscBIReportServerParameters = @{
+            $uninstallSqlDscPowerBIReportServerParameters = @{

Also update the variable reference on line 63:

-            $null = Uninstall-SqlDscPowerBIReportServer @uninstallSqlDscBIReportServerParameters
+            $null = Uninstall-SqlDscPowerBIReportServer @uninstallSqlDscPowerBIReportServerParameters
tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1 (1)

46-46: Update variable name for consistency.

The splat variable name $installSqlDscBIReportServerParameters should be updated to reflect the new command name for consistency.

Apply this diff to update the variable name:

-            $installSqlDscBIReportServerParameters = @{
+            $installSqlDscPowerBIReportServerParameters = @{

Also update the variable reference on line 57:

-            $null = Install-SqlDscPowerBIReportServer @installSqlDscBIReportServerParameters -ErrorAction 'Stop'
+            $null = Install-SqlDscPowerBIReportServer @installSqlDscPowerBIReportServerParameters -ErrorAction 'Stop'
tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1 (1)

53-64: Invocation updated to Repair-SqlDscPowerBIReportServer

The splatting comment and the call now target Repair-SqlDscPowerBIReportServer, with parameters (AcceptLicensingTerms, MediaPath, LogPath, SuppressRestart, Verbose, ErrorAction = 'Stop', Force = $true) unchanged and compliant with integration test guidelines. You might optionally rename $repairSqlDscBIReportServerParameters in a future cleanup for full “PowerBI” terminology consistency, but it’s not functionally important.

tests/Unit/Public/Uninstall-SqlDscPowerBIReportServer.Tests.ps1 (1)

90-121: Mandatory-parameter uninstall scenarios point to new cmdlet

All mandatory-parameter scenarios (-Confirm:$false, -Force, -WhatIf) now call Uninstall-SqlDscPowerBIReportServer and still assert the correct flags ($Uninstall, $Force, MediaPath) on Invoke-ReportServerSetupAction. For future cleanups, you could assign unused return values to $null (e.g. $null = Uninstall-SqlDscPowerBIReportServer ...) to align with the unit test guidelines, but it’s not a behavioral issue. Based on learnings, this is a style-only consideration.

tests/Unit/Public/Install-SqlDscPowerBIReportServer.Tests.ps1 (1)

92-121: Mandatory-parameter install scenarios target new cmdlet

The -Confirm:$false, -Force, and -WhatIf scenarios now invoke Install-SqlDscPowerBIReportServer and still assert that Invoke-ReportServerSetupAction receives $Install, AcceptLicensingTerms, and the correct MediaPath. As in the uninstall tests, you could optionally assign unused results to $null for strict adherence to the unit test guidelines, but behavior is unchanged. Based on learnings, this is a style-only refinement.

@johlju
Copy link
Copy Markdown
Member

johlju commented Dec 6, 2025

@copilot

in tests/Unit/Classes/SqlRSSetup.Tests.ps1
869-918: Update Install and Repair mocks to match actual PowerBI command names.

The mocks for Install-SqlDscBIReportServer (lines 731, 762) and Repair-SqlDscBIReportServer (lines 1007, 1038) reference outdated command names. These should be updated to Install-SqlDscPowerBIReportServer and Repair-SqlDscPowerBIReportServer respectively, consistent with the corrected Uninstall-SqlDscPowerBIReportServer mocks in the verified lines 869-918. All three commands were renamed to include the PowerBI suffix in the source code.

In CHANGELOG.md (1)
24-26: Add explicit issue reference for the rename entry

The description is clear and matches the PR intent, but this bullet is missing a reference to the tracking issue, unlike most other Unreleased entries. To align with the changelog guidelines, consider appending an issue link, e.g.:

- Renamed commands `*-SqlDscBIReportServer` to `*-SqlDscPowerBIReportServer` for
- clarity. The old names `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer`
- are available as aliases for backward compatibility.
+ Renamed commands `*-SqlDscBIReportServer` to `*-SqlDscPowerBIReportServer` for
+ clarity. The old names `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer`
+ are available as aliases for backward compatibility
+ ([issue #2071](https://github.com/dsccommunity/SqlServerDsc/issues/2071)).

… CHANGELOG

Co-authored-by: johlju <7189721+johlju@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 6, 2025

@copilot

in tests/Unit/Classes/SqlRSSetup.Tests.ps1
...

Fixed in commit 4d97498:

@johlju
Copy link
Copy Markdown
Member

johlju commented Dec 6, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 6, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94%. Comparing base (1110653) to head (7e0421a).
⚠️ Report is 29 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@         Coverage Diff          @@
##           main   #2363   +/-   ##
====================================
  Coverage    94%     94%           
====================================
  Files       166     166           
  Lines      9780    9780           
====================================
  Hits       9221    9221           
  Misses      559     559           
Flag Coverage Δ
unit 94% <100%> (ø)
Files with missing lines Coverage Δ
source/Classes/020.SqlRSSetup.ps1 91% <100%> (ø)
...ource/Public/Install-SqlDscPowerBIReportServer.ps1 100% <ø> (ø)
source/Public/Repair-SqlDscPowerBIReportServer.ps1 100% <ø> (ø)
...rce/Public/Uninstall-SqlDscPowerBIReportServer.ps1 100% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@johlju johlju left a comment

Choose a reason for hiding this comment

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

:lgtm:

@johlju reviewed 9 of 14 files at r1, 5 of 5 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @copilot)

@johlju johlju merged commit d621ea4 into main Dec 7, 2025
11 of 13 checks passed
@johlju johlju deleted the copilot/rename-sqldscbi-to-sqldscpowerbi branch December 7, 2025 12:37
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.

*-SqlDscBIReportServer: Rename to *-SqlDscPowerBIReportServer

2 participants