Skip to content
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

SqlRs: Integration test fails on SQL Server 2022 #2009

Open
johlju opened this issue May 4, 2024 · 3 comments
Open

SqlRs: Integration test fails on SQL Server 2022 #2009

johlju opened this issue May 4, 2024 · 3 comments
Labels
blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@johlju
Copy link
Member

johlju commented May 4, 2024

Problem description

The integration tests for SqlRS has started to fail when integration tests run the tests for SQL Server 2022. Something has changed but unclear what.

Verbose logs

##[error]    [-] Should compile and apply the MOF without throwing 38.72s (38.71s|11ms)
##[error]     Expected no exception to be thrown, but an exception "PowerShell DSC resource DSC_SqlRS  failed to execute Set-TargetResource functionality with error message: The parameter is incorrect.  " was thrown from D:\a\1\s\tests\Integration\DSC_SqlRS_Default.Integration.Tests.ps1:151 char:17
##[error]         + ...               Start-DscConfiguration @startDscConfigurationParameters
##[error]         +                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
##[error]     at } | Should -Not -Throw, D:\a\1\s\tests\Integration\DSC_SqlRS_Default.Integration.Tests.ps1:152

DSC configuration

# See integration test: https://github.com/dsccommunity/SqlServerDsc/blob/026647ca36ce154a86facf195d00c27c2668281a/tests/Integration/DSC_SqlRS_Default.config.ps1#L169C1-L194C2

Configuration DSC_SqlRS_ConfigureReportingServices_Config
{
    Import-DscResource -ModuleName 'SqlServerDsc'

    node $AllNodes.NodeName
    {
        SqlRS 'Integration_Test'
        {
            # Instance name for the Reporting Services.
            InstanceName         = $Node.InstanceName

            <#
                Instance for Reporting Services databases.
                Note: This instance is created in a prior integration test.
            #>
            DatabaseServerName   = $Node.DatabaseServerName
            DatabaseInstanceName = $Node.DatabaseInstanceName
            Encrypt              = 'Optional'

            PsDscRunAsCredential = New-Object `
                -TypeName System.Management.Automation.PSCredential `
                -ArgumentList @(
                    $Node.RunAs_UserName, (ConvertTo-SecureString -String $Node.RunAs_Password -AsPlainText -Force))
        }
    }
}

Suggested solution

Unknown. Something has changed with SQL Server 2022 and work has to be done to pin point exact cause.

SQL Server edition and version

# Integration tests for SQL Server 2022 installs this version: https://github.com/dsccommunity/SqlServerDsc/blob/026647ca36ce154a86facf195d00c27c2668281a/tests/Integration/DSC_SqlRSSetup.Integration.Tests.ps1#L79-L80

SQL Server PowerShell modules

SqlServer that the integration tests installs.

Operating system

Fails on both Windows Server 2019 and Windows Server 2022.

PowerShell version

5.1

SqlServerDsc version

Code from main branch
@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. labels May 4, 2024
@johlju
Copy link
Member Author

johlju commented May 4, 2024

There seems to be an issue with the SqlRS resource not working on the SQL Server 2022 instances that are installed as part of the integration tests. This will prevent us from merging PR's to the main branch because it fail to release a new preview release.

I won't have time looking into what causing the error.

@johlju
Copy link
Member Author

johlju commented May 4, 2024

Worst case we have to disable the tests.

@johlju
Copy link
Member Author

johlju commented May 5, 2024

The PR #2008 has temporarily disabled the tests that fails. They should be re-enabled when this issue is resolved.

# TODO: SQL Server 2022 has been disabled due to unknown issue with the resource SqlRS. See issue #2009.
Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019'<#, 'Integration_SQL2022'#>) {

# TODO: SQL Server 2022 has been disabled due to unknown issue with the resource SqlRS. See issue #2009.
Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019'<#, 'Integration_SQL2022'#>) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

1 participant