Skip to content

SqlRSSetup: Refactor resource into class-based resource #2083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
a09d536
Remove old MOF-based resource
johlju Mar 18, 2025
5702aa9
Add refactored class-based resource
johlju Mar 18, 2025
8ef9bb6
fix changelog
johlju Mar 18, 2025
f907878
Update error handling in Get-FileProductVersion function to remove 'S…
johlju Mar 18, 2025
945b0a5
Try remove PSAvoidGlobalVars
johlju Mar 19, 2025
5603686
Fix examples and integ test
johlju Mar 20, 2025
0ce5f43
Fix parameter name
johlju Mar 20, 2025
dfbaf50
Fix integ test
johlju Mar 20, 2025
dd56f25
change Edition value
johlju Mar 20, 2025
e50a198
Fix examples
johlju Mar 21, 2025
73869b0
Cleanup strings
johlju Mar 21, 2025
7cfc7f1
Add localized resource strings for SqlRSSetup, improve parameter desc…
johlju Mar 21, 2025
21fae01
Fix unit test
johlju Mar 23, 2025
706bf8b
Fix unit test
johlju Mar 23, 2025
4219494
Fix unit tests
johlju Mar 29, 2025
249e14c
Fix unit tests
johlju Mar 29, 2025
7caf6c1
Fix unit tests
johlju Mar 30, 2025
5060430
Fix hashtable
johlju Mar 30, 2025
12b9e99
Fix VersionUpgrade not passed to commands
johlju Mar 30, 2025
f0285c2
Fix removed property in tests
johlju Mar 30, 2025
777c72a
Fix removed property
johlju Mar 30, 2025
fd2a260
Fix integ test
johlju Mar 30, 2025
cd88053
Test product version
johlju Mar 31, 2025
a139f08
debug messages
johlju Mar 31, 2025
d085a6a
Fix error when missing product version
johlju Mar 31, 2025
f81383b
Fix debug messages in integ test
johlju Mar 31, 2025
9c7f482
Run more instances in appveyor
johlju Mar 31, 2025
5d1814e
Revert some debug messages
johlju Mar 31, 2025
1d5fc1e
debug
johlju Mar 31, 2025
5525dff
Fix tests
johlju Mar 31, 2025
73d8f74
Fix current version verbose message
johlju Apr 1, 2025
3d5e760
Fix error action
johlju Apr 1, 2025
028d069
Document bug with Microsoft SQL Server 2017 Reporting Services
johlju Apr 1, 2025
6477208
Fix correct environment variable
johlju Apr 2, 2025
fe9409a
Revert debug code
johlju Apr 2, 2025
0a767a2
Fix pipeline
johlju Apr 2, 2025
96a2996
Fix integ test
johlju Apr 4, 2025
3867b50
Fix PowerBI integ test
johlju Apr 5, 2025
5ce18fc
Fix pipeline
johlju Apr 5, 2025
845676b
Fix integ test
johlju Apr 5, 2025
0607944
Fix correct version
johlju Apr 5, 2025
7cb827f
revert azure-pipelines
johlju Apr 5, 2025
8579f5d
Fix unit tests
johlju Apr 5, 2025
2c833f2
Fix comment-based help
johlju Apr 5, 2025
cc92a36
Fix localization
johlju Apr 5, 2025
1f1368a
Add ConvertTo-SqlDscEditionName
johlju Apr 7, 2025
aafcd1f
Remove ProductVersion parameter and add edition check
johlju Apr 7, 2025
021f5c4
fix comment-based help
johlju Apr 7, 2025
50dd05c
Fix integ test and changelog
johlju Apr 8, 2025
b7a5e17
Remove Get-FileProductVersion
johlju Apr 25, 2025
f2a90a5
Run stage PowerBIReportServer on Windows Server 2025
johlju Apr 26, 2025
f46378a
Fix some review comments
johlju Apr 30, 2025
d7305cf
Fix more review comments
johlju Apr 30, 2025
dda0b86
Fix enums logic
johlju Apr 30, 2025
e678a40
Fix review comments
johlju Apr 30, 2025
5e6e619
Fix unit test
johlju Apr 30, 2025
3a31a0d
Try using Set-Variable to set DSCMachineStatus
johlju Apr 30, 2025
e715706
Use reboot command
johlju May 1, 2025
51cab16
Remove enum ReportServerEdition
johlju May 1, 2025
92c6b95
Fix review comment
johlju May 1, 2025
8df0c8f
Fix review comment
johlju May 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/analyzersettings.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<#
The following types are not rules but parse errors reported by PSScriptAnalyzer
so they cannot be ecluded. They need to be filtered out from the result of
so they cannot be excluded. They need to be filtered out from the result of
Invoke-ScriptAnalyzer.
TypeNotFound - Because classes in the project cannot be found unless built.
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@
"fastbuild",
"CODEOWNERS",
"analyzersettings",
"sqlcmd"
"sqlcmd",
"PBIRS",
"SSRS"
],
"cSpell.ignorePaths": [
".git"
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed the function `Get-RegistryPropertyValue`, `Format-Path` and
`Test-PendingRestart` in favor of the commands with the same names in
the module _DscResource.Common_.
- SqlRSSetup
- The DSC resource has been refactored into a class-based resource.
- The parameter `SourcePath` was replaced with `MediaPath`.
- The parameter `IAcceptLicensTerms` was replaced with a boolean parameter
`AcceptLicensingTerms`.
- The parameter `SourceCredential` was removed. Because of this, the
functionality that allowed copying the media from a UNC path using
those credentials was also removed. If this was something you used,
please open an issue.
- The version validation no longer gets the current version from the
installed package (using `Get-Package`), but instead from the registry.
- Prior when install was successful, the resource checked whether there
were any pending rename operations. Since the install returns 3010
if a restart is needed it is now assumed that the setup process takes
care of this. If that is not the case, and this check is needed, then
open an issue to discuss in what cases this is needed.
- The `Edition` option 'Development` was replaced by the value
`Developer`.
- The read-only properties `CurrentVersion`, `ServiceName` and `ErrorDumpDirectory`
were removed.

### Added

Expand Down Expand Up @@ -42,6 +62,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Uninstall-SqlDscBIReportServer` to uninstall SQL Server BI Report Server
([issue #2065](https://github.com/dsccommunity/SqlServerDsc/issues/2065)).
- Add `PassThru` parameter to return exit code.
- `ConvertTo-SqlDscEditionName` to return the edition name of the specified
edition ID.
- Private function:
- `Invoke-ReportServerSetupAction` to run setup actions for Reporting
Services and Power BI Report Server.
Expand Down Expand Up @@ -78,6 +100,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- SqlSetup
- Fixed issue with AddNode where cluster IP information was not being passed to
setup.exe ([issue #1171](https://github.com/dsccommunity/SqlServerDsc/issues/1171)).
- SqlRSSetup
- The DSC resource has been refactored into a class-based resource.

### Fixed

Expand Down
65 changes: 65 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,71 @@ stages:
testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
testRunTitle: 'Integration RS ($(TEST_CONFIGURATION) / $(JOB_VMIMAGE))'

- stage: Integration_Test_Resources_PowerBIReportServer
displayName: 'Integration Test Resources - Power BI Report Server'
dependsOn: Quality_Test_and_Unit_Test
jobs:
- job: Test_Integration
displayName: 'Integration'
strategy:
matrix:
PowerBI_WIN2019:
JOB_VMIMAGE: 'windows-2019'
TEST_CONFIGURATION: 'Integration_PowerBI'
PowerBI_WIN2022:
JOB_VMIMAGE: 'windows-2022'
TEST_CONFIGURATION: 'Integration_PowerBI'
PowerBI_WIN2025:
JOB_VMIMAGE: 'windows-2025'
TEST_CONFIGURATION: 'Integration_PowerBI'
variables:
SKIP_DATABASE_ENGINE_DEFAULT_INSTANCE: true
SKIP_ANALYSIS_MULTI_INSTANCE: true
SKIP_ANALYSIS_TABULAR_INSTANCE: true
SMODefaultModuleName: 'SqlServer'
pool:
vmImage: $(JOB_VMIMAGE)
timeoutInMinutes: 0
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
artifactName: $(buildArtifactName)
targetPath: '$(Build.SourcesDirectory)/$(buildFolderName)'
- task: PowerShell@2
name: configureWinRM
displayName: 'Configure WinRM'
inputs:
targetType: 'inline'
script: 'winrm quickconfig -quiet'
pwsh: false
- powershell: |
Import-Module -Name ./tests/TestHelpers/CommonTestHelper.psm1
Remove-PowerShellModuleFromCI -Name @('SqlServer', 'SQLPS')
Remove-Module -Name CommonTestHelper
name: cleanCIWorker
displayName: 'Clean CI worker'
- powershell: |
./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterTag $(TEST_CONFIGURATION) -PesterPath @(
# Run the integration tests in a specific group order.
# Group 1
'tests/Integration/Resources/DSC_SqlSetup.Integration.Tests.ps1'
# Group 2
'tests/Integration/Resources/DSC_SqlRSSetup.Integration.Tests.ps1'
# Group 3
'tests/Integration/Resources/DSC_SqlRS.Integration.Tests.ps1'
)
name: test
displayName: 'Run Reporting Services Integration Test'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '$(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
testRunTitle: 'Integration RS ($(TEST_CONFIGURATION) / $(JOB_VMIMAGE))'

- stage: Integration_Test_Resources_ReportingServices_dbatools
displayName: 'Integration Test Resources - Reporting Services (dbatools)'
dependsOn: Integration_Test_Resources_SqlServer
Expand Down
Loading
Loading