Closed kaspermoerch closed 3 years ago
There also seems to be a difference between the OnPrem and Sandbox images .. still investigating though..
If I run Import-TestToolkitToBcContainer BC-17-CU2-DK -includeTestFrameworkOnly
the output says:
Skipping app 'C:\Applications.DK\Microsoft_Test Runner_17.2.19367.20025.app' as it is already installed
Symbols are downloaded just fine, but when trying to publish my test app I get the error:
The request for path /BC/dev/apps?tenant=default&SchemaUpdateMode=recreate&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Cannot synchronize the extension because no synchronized extension could be found to satisfy the dependency definition for Test Runner by Microsoft 17.0.0.0.
I can acknowledge that the database in the artifacts indeed has the Test Runner and the Performance Toolkit installed. I will investigate why this is a problem - it should just skip the installation of that.
I just tried to create a container and import test toolkit. It skips the Test Runner - but everything seems to work fine. @kaspermoerch you should make sure to update BcContainerHelper - I don't know if anything is different, but I do not see a problem with this at this time.
Also - all my pipelines are not failing
I think this is caused by the way ALOps installs the test apps. Have added a link to how I do it in containerhelper
In 17.2, the performance toolkit and the test runner are pre-published in the database. BcContainerHelper will automatically check whether the test apps are installed before installing, but the generic image doesn't do this (since I thought I knew that apps couldn't be installed):-( if you add -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/generic/Run/150-new/navinstall.ps1") to your new-bcimage call then it will grab the installer from the next generic version and use that.
It is not all though - it seems like the performance toolkit cannot be installed on Docker at all - there seem to be a check which disallows it to be installed on anything but onprem or online sandboxes - this check of course will need to change in the perf toolkit app - for now - avoid -includeperformancetoolkit on sandbox images.
Adding the installer to myscripts plus specifying -includeTestToolkit -includeTestFrameworkOnly
when creating the container solves the problem.
In 17.2, the performance toolkit and the test runner are pre-published in the database. BcContainerHelper will automatically check whether the test apps are installed before installing, but the generic image doesn't do this (since I thought I knew that apps couldn't be installed):-( if you add -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/generic/Run/150-new/navinstall.ps1") to your new-bcimage call then it will grab the installer from the next generic version and use that.
It is not all though - it seems like the performance toolkit cannot be installed on Docker at all - there seem to be a check which disallows it to be installed on anything but onprem or online sandboxes - this check of course will need to change in the perf toolkit app - for now - avoid -includeperformancetoolkit on sandbox images.
Will they be pre-published by default from now?
Yes, I think we can safely assume so (at least that is what they told me)
This is a quite ugly (breaking) change with a minor update. Can you share why this change happened? And do you see any chance to avoid that kind of break in the future?
The reason I got was, that the app team wanted the performance toolkit to be preinstalled on sandbox tenants and since artifacts are built on the same database as we use for artifacts, then suddenly this happened.
It was a surprise for me as well, but I am not sure that we can avoid situations where the infrastructure team adds an app to the database, sorry.
That part of the issue is not a problem, at least IMHO. We can just stop importing the testlibs. I was more worried by the fact that the performance toolkit can't be installed on an onprem container at all? Or does your comment say that this will be fixed?
That will be fixed - that is just a bug. The code should check that the perf toolkit doesn't get installed on a production tenant. The test is wrong.
ah perfect, thanks. Then it would be nice to know in advance instead of noticing through breaking pipelines, but not a real problem IMHO
Test Runner is likely to be published in the database from 17.2 and forward. When using containerhelper, there was no problem installing the test toolkit with 17.2 even though Test Runner was there. When building an image (using generic image to install the test toolkit), it would fail due to the pre-existence of Test Runner.
The fix for this, all generic images:
SQL 2019: mcr.microsoft.com/businesscentral:{0}
SQL 2017: mcr.microsoft.com/businesscentral:{0}-sql2017
have been rebuilt with a fix to handle the existence of Test Runner in the database.
generic tag for SQL 2019 is 1.0.1.2 and for SQL 2017 is 0.1.0.26 (note the new naming of the sql2017 image)
Performance toolkit fix waits for a fix from the perf toolkit team in a future version of 17.2 likely. Note: perf toolkit will still works on onprem containers.
@freddydk how do we get the fix? Just with the latest version of the artifacts?
The perf toolkit will arrive with the artifacts when they have fixed this - until then - no perf toolkit on sandbox images. I assume that onprem works. The generic images have been updated and can handle the test runner.
@freddydk do you know if the fix for the perf toolkit will appear with 17.3 sandbox images? We are still seeing it with generic 1.0.1.3 and 17.2 sandbox images
Wasn't the issue with perf toolkit that you couldn't install it on onprem containers? I have not test 17.3 (was shipped today)
@freddydk I assumed that it is the same issue, but I don't have the old logs anymore, so I can't say for sure. I have created #1617
Describe the issue Test Runner is installed by default when creating a new container using artifact version 17.2.19367.20025-DK. Pipelines now fail in DevOps because they try to install the Test Runner app. If the installation of the Test Runner app is removed from the pipeline then the compilation of the test app fails because the Test Runner app is not synchronized.
Scripts used to create container and cause the issue
Full output of scripts
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Running
Get-NavAppInfo BC | Where-Object { $_.Name -match "Test Runner" }
inside the container after creation renders the output:The Test Runner app was not installed on versions lower than 17.2.