microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
381 stars 243 forks source link

Error copy company next major #3584

Closed kguldbaek closed 2 months ago

kguldbaek commented 2 months ago

Last night, our build pipeline against the next major (Version: 25.0.21278.0 Platform 25.0.21212.0) failed when trying to copy a company. According to the error message, SQL Server Full-Text Search component is missing.

Scripts used to create container and cause the issue

Invoke-ScriptInBcContainer -containerName $containerName -scriptblock {
        Write-Host "Disabling Task Scheduler when running test"
        Set-NAVServerConfiguration -ServerInstance $ServerInstance -KeyName "EnableTaskScheduler" -KeyValue "False" -WarningAction SilentlyContinue
        Set-NAVServerInstance -ServerInstance $ServerInstance -Restart
        while (Get-NavTenant $serverInstance | Where-Object { $_.State -eq "Mounting" }) {
            Start-Sleep -Seconds 1
        }
    }
    $firstCompany = (Get-CompanyInBcContainer $containerName | Select-Object -Property CompanyName -first 1).CompanyName
    Copy-CompanyInBcContainer $containerName -sourceCompanyName $firstCompany -destinationCompanyName $testCompany

Full output of scripts

Is sandbox style True
Localization base
Running Normal
BcContainerHelper version 6.0.19
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on Windows, PowerShell 5.1.17763.5933
Disabling Task Scheduler when running test
Copying company from CRONUS International Ltd. to Test company in default
Text optimized index cannot be created/queried because the SQL Server Full-Text Search component is not installed.

    Please install the SQL Server Full-Text Search component and try again.

Exception Script Stack Trace:
at <ScriptBlock>, <No file>: line 3

PowerShell Call Stack:
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.19\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
at Copy-CompanyInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.19\CompanyHandling\Copy-CompanyInNavContainer.ps1: line 30
at <ScriptBlock>, C:\a\1\tools\scripts\Import-TestData.ps1: line 71
at <ScriptBlock>, C:\a\_temp\ac956755-7404-4040-b0e7-1f860dfa42c0.ps1: line 4
at <ScriptBlock>, <No file>: line 1

Container Free Physical Memory: 2.8Gb
Disk C: Free 121Gb from 127Gb

Services in container contib4d70004XE-:
- MicrosoftDynamicsNavServer$BC is Running
- MSSQL$SQLEXPRESS is Running

Copy-CompanyInBcContainer Telemetry Correlation Id: a0b40e72-e388-4a1e-8e7e-d1c8c4468416
##[error]Text optimized index cannot be created/queried because the SQL Server Full-Text Search component is not installed.
    Please install the SQL Server Full-Text Search component and try again.
At C:\Program 
Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.19\ContainerHandling\Invoke-ScriptInNavContainer.ps1:113 char:13
+             throw $errorMessage
+             ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Text optimized ... and try again.:String) [], RuntimeException
    + FullyQualifiedErrorId : Text optimized index cannot be created/queried because the SQL Server Full-Text Search c 
   omponent is not installed.
    Please install the SQL Server Full-Text Search component and try again.
##[error]PowerShell exited with code '1'.
Finishing: Import and set up test data
mishof commented 2 months ago

We are experiencing the same, but in Run-AlPipeline for a nextmajor;

    Run-AlPipeline `
        -azureDevOps `
        -doNotRunTests `
        -accept_insiderEula `
        -credential $credential `
        -artifact $artifactUrl `
        -pipelineName $PipeLineName `
        -licenseFile $LicFileName `
        -baseFolder $BaseFolder `
        -appFolders $AppFolders `
        -installApps $installApps `
        -PreviousApps $PreviousApps `
        -keepContainer `
        -imageName $ImageName `
        -enableTaskScheduler:$false

Publishing C:\x.app Synchronizing x on tenant default Installing x on tenant default Could not install the extension 'x' by 'y' (version 'z') on tenant 'default' and company '' due to the following error: 'Text optimized index cannot be created/queried because the SQL Server Full-Text Search component is not installed. Please install the SQL Server Full-Text Search component and try again.' and AL stack trace:

freddydk commented 2 months ago

Some operations in the next major version requires FullText to be installed, which currently isn't the case in the Business Central generic images. We will issue an update to the generic images with FullText added.

freddydk commented 2 months ago

As of today, there should be a new generic image available, which has full text support - and this should work again.