HodorNV / ALOps

ALOps
59 stars 24 forks source link

Error when running build on BC22 insider build #608

Closed lvanvugt closed 1 year ago

lvanvugt commented 1 year ago

Describe the bug Not having worked directly with builds on next major (currently BC22 insider) and picking this up again yesterday my builds failed with error in step ALOpsLicenseImport:

##[error]Cannot find path 'C:\program files\microsoft dynamics nav\220\service\Microsoft.Dynamics.Nav.Apps.Management.dll' because it does not exist.

the used yaml The call to ALOpsLicenseImport is part of the following template

parameters:
  artifactVersion: ''
  artifactCountry: ''
  versionSelect: ''
  sasToken: ''
  forceCreateImage: false
  uninstallMsApps: true
  licenseUrl: ''

steps:          
- task: ALOpsDockerCreate@1
  condition: and(in(variables.versionSelect, '', 'latest'), ne(variables.artifactVersion, ''), ne(variables.artifactCountry, ''))
  displayName: "ALOPS - Create Docker Image - Version ${{ parameters.artifactVersion }} ${{ parameters.artifactCountry }}"
  inputs:
    artifactversion: ${{ parameters.artifactVersion }}
    artifactcountry: ${{ parameters.artifactCountry }}
    forcecreateimage: ${{ parameters.forceCreateImage }}
    licensefile: ${{ parameters.licenseUrl }} 

- task: ALOpsDockerCreate@1
  condition: and(in(variables.versionSelect, '', 'latest'), eq(variables.artifactVersion, ''), eq(variables.artifactCountry, ''))
  displayName: "ALOPS - Create Docker Image - latest w1"
  inputs:
    artifactcountry: 'w1'
    versionselect: 'latest'
    forcecreateimage: ${{ parameters.forceCreateImage }}
    licensefile: ${{ parameters.licenseUrl }}

- task: ALOpsDockerCreate@1
  condition: and(in(variables.versionSelect, '', 'latest'), eq(variables.artifactVersion, ''), ne(variables.artifactCountry, ''))
  displayName: "ALOPS - Create Docker Image - latest ${{ parameters.artifactCountry }}"
  inputs:
    artifactcountry: ${{ parameters.artifactCountry }}
    versionselect: 'latest'
    forcecreateimage: ${{ parameters.forceCreateImage }}
    licensefile: ${{ parameters.licenseUrl }}

- task: ALOpsDockerCreate@1
  condition: and(in(variables.versionSelect, 'nextminor', 'nextmajor'), eq(variables.artifactCountry, ''))
  displayName: "ALOPS - Create Docker Image -  Insider ${{ parameters.versionSelect }} w1"
  inputs:
    artifacttype: 'Sandbox'
    artifactcountry: 'w1'
    versionselect: ${{ parameters.versionSelect }}
    sastoken: ${{ parameters.sasToken }}
    forcecreateimage: ${{ parameters.forceCreateImage }}
    licensefile: ${{ parameters.licenseUrl }}

- task: ALOpsDockerCreate@1
  condition: and(in(variables.versionSelect, 'nextminor', 'nextmajor'), ne(variables.artifactCountry, ''))
  displayName: "ALOPS - Create Docker Image -  Insider ${{ parameters.versionSelect }} ${{ parameters.artifactCountry }}"
  inputs:
    artifacttype: 'Sandbox'
    artifactcountry: ${{ parameters.artifactCountry }}
    versionselect: ${{ parameters.versionSelect }}
    sastoken: ${{ parameters.sasToken }}
    forcecreateimage: ${{ parameters.forceCreateImage }}
    licensefile: ${{ parameters.licenseUrl }}

- task: ALOpsDockerStart@1
  displayName: 'ALOPS - Start Docker Container'

- task: ALOpsDockerWait@1
  displayName: 'ALOPS - Wait for Docker Container to start'
  inputs:
    search_string: 'Ready for connections!'

- task: ALOpsLicenseImport@1
  displayName: 'ALOPS - License Import'
  inputs:
    usedocker: true
    license_path: '${{ parameters.licenseUrl }}'

- task: ALOpsDockerExec@1
  condition: eq(variables.uninstallMsApps, 'true')
  displayName: 'ALOPS - Uninstall MS apps (but leave Application apps)'
  inputs:
    inline_script: |
      Get-NAVAppInfo -ServerInstance BC -tenant default -tenantspecificproperties | 
        where isinstalled -eq $true | 
          Where Publisher -eq Microsoft | 
            where {$_.Name -ne 'Base Application' -and $_.Name -ne 'System Application' -and $_.Name -ne 'Application'}  | 
              uninstall-navapp -tenant default -force

- task: ALOpsAppPublish@1
  displayName: 'ALOPS - Install AL TestTool'
  inputs:
    usedocker: true
    installaltesttool: true
    skip_verification: true
    install_al_app_names: |
      Any
      Library Assert
      Library Variable Storage
      System Application Test Library
      Tests-TestLibraries
      Permissions Mock
      Test Runner

the output The full log on the ** step is:

2023-02-03T14:27:56.8641286Z ##[section]Starting: ALOPS - License Import
2023-02-03T14:27:56.8818706Z ==============================================================================
2023-02-03T14:27:56.8818967Z Task         : ALOps License Import
2023-02-03T14:27:56.8819124Z Description  : Import Business Central license (.flf)
2023-02-03T14:27:56.8819298Z Version      : 1.454.3402
2023-02-03T14:27:56.8819426Z Author       : Hodor
2023-02-03T14:27:56.8819577Z Help         : Import Business Central license (.flf).
2023-02-03T14:27:56.8819736Z ==============================================================================
2023-02-03T14:27:58.3554645Z *** Validate configuration
2023-02-03T14:27:58.7024683Z *** Task Inputs:
2023-02-03T14:27:58.7076472Z 
2023-02-03T14:27:58.7166695Z name                                                                                                              value
2023-02-03T14:27:58.7170433Z ----                                                                                                              -----
2023-02-03T14:27:58.7173684Z usedocker                                                                                                          True
2023-02-03T14:27:58.7176313Z fixed_tag                                                                                                              
2023-02-03T14:27:58.7178946Z nav_serverinstance                                                                                                BC140
2023-02-03T14:27:58.7229760Z license_path        ...03T21:48:50Z&spr=https&sv=2021-06-08&sr=b&sig=FzIdiTR%2B4Hz7o9BlMofEc1oW1JPYhsyxTCoJj39%2Bp0I%3D
2023-02-03T14:27:58.7230477Z remove_license_file                                                                                                True
2023-02-03T14:27:58.7233651Z print_license_info                                                                                                False
2023-02-03T14:27:58.7236329Z license_scope                                                                                                   Default
2023-02-03T14:27:58.7236595Z 
2023-02-03T14:27:58.7261660Z 
2023-02-03T14:27:58.7270583Z 
2023-02-03T14:27:58.7461535Z 
2023-02-03T14:27:58.7471470Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
2023-02-03T14:27:58.7482413Z *** To acquire a license, please visit: https://www.alops.be/getlicense
2023-02-03T14:27:58.7493258Z *** For pricing options, please visit : https://www.alops.be/pricing
2023-02-03T14:27:58.7503844Z *** For documentation, please visit   : https://www.alops.be/documentation
2023-02-03T14:27:58.7508656Z 
2023-02-03T14:27:59.0782508Z *** ALOps License:
2023-02-03T14:27:59.0810488Z   * Trial Key  : 9e49a0a1-45c6-4038-b670-7f21fd35e892
2023-02-03T14:27:59.0836003Z   * Licensed To: Public Project (Free License)
2023-02-03T14:27:59.0841754Z 
2023-02-03T14:27:59.0961021Z *** Importing required PS-Functions
2023-02-03T14:27:59.2731550Z *** Connect Docker Session
2023-02-03T14:27:59.4480683Z *** Initiate Docker Session
2023-02-03T14:27:59.7061306Z *** Set Docker Container ErrorActionPreference = Stop
2023-02-03T14:28:00.0139360Z *** Import license in docker container.
2023-02-03T14:28:00.4954243Z *** Import NAV/BC Management DLL's
2023-02-03T14:28:00.5011430Z *** Loading assemblies for ServiceTier [BC].
2023-02-03T14:28:00.9685737Z *** Loading assemblies from: [C:\program files\microsoft dynamics nav\220\service]
2023-02-03T14:28:01.1433999Z ##[error]Cannot find path 'C:\program files\microsoft dynamics nav\220\service\Microsoft.Dynamics.Nav.Apps.Management.dll' because it does not exist.
2023-02-03T14:28:01.1757847Z ##[section]Finishing: ALOPS - License Import

Expected behavior Successful execution of ALOpsLicenseImport.

SorenKlemmensen commented 1 year ago

I get the same issue.

Seem to have started with Fridays image: sandbox-22.0.52844.0-be-10.0.20348.1487-ltsc2022

Thursdays image had another issue and the creation of docker failed: sandbox-22.0.52809.0-be-10.0.20348.1487-ltsc2022

Wednesdays Image: sandbox-22.0.52293.0-be-10.0.20348.1487-ltsc2022 did not seem to have the issue

waldo1001 commented 1 year ago

Microsoft broke something in the image (something to do with the necessity of .NET6 presence.. - let us investigate..

lvanvugt commented 1 year ago

Meanwhile BC21 builds also fail but with different error in ALOpsAppCompiler step.

This is the log:

2023-02-06T05:18:39.7252203Z ##[section]Starting: ALOPS - Compile Extension: App
2023-02-06T05:18:39.7395359Z ==============================================================================
2023-02-06T05:18:39.7396056Z Task         : ALOps App Compiler
2023-02-06T05:18:39.7396288Z Description  : Compile AL Extensions for Business Central
2023-02-06T05:18:39.7396508Z Version      : 1.454.3402
2023-02-06T05:18:39.7396705Z Author       : Hodor
2023-02-06T05:18:39.7396875Z Help         : Compile a Business Central extension from AL code.
2023-02-06T05:18:39.7397132Z ==============================================================================
2023-02-06T05:18:42.8238635Z *** Validate configuration
2023-02-06T05:18:43.1467208Z *** Task Inputs:
2023-02-06T05:18:43.1546800Z 
2023-02-06T05:18:43.1705621Z name                                                                                                              value
2023-02-06T05:18:43.1709464Z ----                                                                                                              -----
2023-02-06T05:18:43.1712308Z usedocker                                                                                                          True
2023-02-06T05:18:43.1715509Z fixed_tag                                                                                                              
2023-02-06T05:18:43.1746111Z targetproject                                    ...gents\Agent2\_work\66\s\Chapter 12 (LookupValue Extension)\app.json
2023-02-06T05:18:43.1748779Z nav_computername                                                                                                       
2023-02-06T05:18:43.1751810Z nav_serverinstance                                                                                                BC140
2023-02-06T05:18:43.1754726Z nav_tenant                                                                                                      default
2023-02-06T05:18:43.1757532Z nav_ports_dev                                                                                                      7049
2023-02-06T05:18:43.1760542Z bc_username                                                                                                            
2023-02-06T05:18:43.1763413Z bc_password                                                                                                            
2023-02-06T05:18:43.1766341Z al_compiler_version                                                                                          0.12.15355
2023-02-06T05:18:43.1769228Z ruleset                                                                                                                
2023-02-06T05:18:43.1772168Z suppresswarnings                                                                                                   KEEP
2023-02-06T05:18:43.1775060Z al_analyzer                                                                                                            
2023-02-06T05:18:43.1777825Z ignorepragmas                                                                                                          
2023-02-06T05:18:43.1780835Z nav_app_version                                                                                          ?.?.[yyyyWW].*
2023-02-06T05:18:43.1783701Z vsix_download_path                                                                                                     
2023-02-06T05:18:43.1786618Z use_ssl                                                                                                           False
2023-02-06T05:18:43.1789519Z download_test_symbols                                                                                             False
2023-02-06T05:18:43.1792496Z usecompression                                                                                                     True
2023-02-06T05:18:43.1795395Z publish_artifact                                                                                                   True
2023-02-06T05:18:43.1798250Z publishxlif                                                                                                       False
2023-02-06T05:18:43.1801256Z failed_on_warnings                                                                                                False
2023-02-06T05:18:43.1804688Z app_file_suffix                                                                                                    _APP
2023-02-06T05:18:43.1807576Z updatebuildnumber                                                                                                  True
2023-02-06T05:18:43.1810521Z setup_working_folder                                                                                              False
2023-02-06T05:18:43.1813347Z showmycode                                                                                                         Keep
2023-02-06T05:18:43.1816308Z resourceexposurepolicy_allowdebugging                                                                              Keep
2023-02-06T05:18:43.1819195Z resourceexposurepolicy_allowdownloadingsource                                                                      Keep
2023-02-06T05:18:43.1822094Z resourceexposurepolicy_includesourceinsymbolfile                                                                   Keep
2023-02-06T05:18:43.1824869Z internalsvisibleto                                                                                                 Keep
2023-02-06T05:18:43.1827836Z preprocessorsymbols                                                                                                    
2023-02-06T05:18:43.1830643Z applicationinsightskey                                                                                                 
2023-02-06T05:18:43.1833669Z printappmanifest                                                                                                   True
2023-02-06T05:18:43.1836500Z output_alc_logs                                                                                                    True
2023-02-06T05:18:43.1839497Z additionalprobingpaths                                                                                                 
2023-02-06T05:18:43.1840053Z 
2023-02-06T05:18:43.1866071Z 
2023-02-06T05:18:43.1877908Z 
2023-02-06T05:18:43.2084341Z 
2023-02-06T05:18:43.2095468Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
2023-02-06T05:18:43.2105828Z *** To acquire a license, please visit: https://www.alops.be/getlicense
2023-02-06T05:18:43.2116057Z *** For pricing options, please visit : https://www.alops.be/pricing
2023-02-06T05:18:43.2126000Z *** For documentation, please visit   : https://www.alops.be/documentation
2023-02-06T05:18:43.2130150Z 
2023-02-06T05:18:43.5104054Z *** ALOps License:
2023-02-06T05:18:43.5128339Z   * Trial Key  : d1d491ef-76ed-48d4-8f08-5664c8761e0f
2023-02-06T05:18:43.5151282Z   * Licensed To: Public Project (Free License)
2023-02-06T05:18:43.5156998Z 
2023-02-06T05:18:43.5279859Z *** Importing required PS-Functions
2023-02-06T05:18:44.1567417Z *** Initiate Docker Session
2023-02-06T05:18:44.4097885Z *** Set Docker Container ErrorActionPreference = Stop
2023-02-06T05:18:45.0455887Z *** Import NAV/BC Management DLL's
2023-02-06T05:18:45.0512935Z *** Loading assemblies for ServiceTier [BC].
2023-02-06T05:18:45.3100978Z *** Loading assemblies from: [C:\program files\microsoft dynamics nav\210\service]
2023-02-06T05:18:45.3230428Z *** Selected module: [C:\program files\microsoft dynamics nav\210\service\Microsoft.Dynamics.Nav.Apps.Management.dll]
2023-02-06T05:18:45.3238077Z *** Loading module: [C:\program files\microsoft dynamics nav\210\service\Microsoft.Dynamics.Nav.Apps.Management.dll]
2023-02-06T05:18:45.3529168Z *** Selected module: [C:\program files\microsoft dynamics nav\210\service\Microsoft.Dynamics.Nav.Management.dll]
2023-02-06T05:18:45.3538492Z *** Loading module: [C:\program files\microsoft dynamics nav\210\service\Microsoft.Dynamics.Nav.Management.dll]
2023-02-06T05:18:45.3824301Z *** BC NCL Management DLL: C:\program files\microsoft dynamics nav\210\service\Microsoft.Dynamics.Nav.Ncl.dll
2023-02-06T05:18:45.7222476Z *** BC Types DLL: C:\program files\microsoft dynamics nav\210\service\Microsoft.Dynamics.Nav.Types.dll
2023-02-06T05:18:45.9695645Z *** Setting up AL Compiler [ALLanguage]
2023-02-06T05:18:46.2126656Z *** Downloading AL Compiler [ALLanguage]
2023-02-06T05:18:46.2221584Z *** Get Extension from Local-Disk...[C:\Run\ALLanguage.vsix]
2023-02-06T05:18:46.2227222Z *** Resolving Path [C:\Run\ALLanguage.vsix]
2023-02-06T05:18:46.3476743Z *** VSIX Path Resolved: [C:\Run\ALLanguage.vsix]
2023-02-06T05:18:46.3510427Z *** Unpacking Extension to folder...
2023-02-06T05:18:53.7563581Z *** Loading Json Object: [c:\Run\Microsoft.al\al-ALLanguage\extension\package.json]
2023-02-06T05:18:53.7567940Z *** Using AL Compiler [vALLanguage] located [C:\Run\Microsoft.al\al-ALLanguage\extension\bin\win32\alc.exe]
2023-02-06T05:18:53.7775693Z ***
2023-02-06T05:18:53.7979449Z *** Working folder: C:\ADOAgents\Agent2\_work\66\s
2023-02-06T05:18:53.7980961Z ***
2023-02-06T05:18:53.7981783Z *** Copy Working folder to Docker Container: 9297bf74cbb5e36f17f99fd933b7bede2e1a382483973ea548be3f76c7ed0453
2023-02-06T05:18:53.7982760Z *** Docker Working Folder: c:\Run\DevOps\
2023-02-06T05:18:53.7983525Z *** Copy from [C:\ADOAgents\Agent2\_work\66\s] to [c:\Run\DevOps\]
2023-02-06T05:18:53.8517522Z *** Source File setup completed
2023-02-06T05:18:54.6231074Z *** Target Project: \Chapter 12 (LookupValue Extension)\app.json
2023-02-06T05:18:54.6353693Z *** Check for app.json files: c:\Run\DevOps\
2023-02-06T05:18:54.7057556Z *** Multiple projects found:
2023-02-06T05:18:54.7451300Z    - C:\Run\DevOps\Chapter 02
2023-02-06T05:18:54.7617206Z    - C:\Run\DevOps\Chapter 03
2023-02-06T05:18:54.8620675Z    - C:\Run\DevOps\Chapter 06 (LookupValue Extension)
2023-02-06T05:18:54.8645815Z    - C:\Run\DevOps\Chapter 07 (LookupValue Extension)
2023-02-06T05:18:54.8647194Z    - C:\Run\DevOps\Chapter 08 (LookupValue Extension)
2023-02-06T05:18:54.8648107Z    - C:\Run\DevOps\Chapter 09 (LookupValue Extension)
2023-02-06T05:18:54.8899839Z    - C:\Run\DevOps\Chapter 10 (LookupValue Extension)
2023-02-06T05:18:54.8939104Z    - C:\Run\DevOps\Chapter 11 (LookupValue Extension)
2023-02-06T05:18:54.9026815Z    - C:\Run\DevOps\Chapter 12 (LookupValue Extension)
2023-02-06T05:18:54.9286248Z    - C:\Run\DevOps\Chapter 13 (LookupValue Extension)
2023-02-06T05:18:54.9294151Z    - C:\Run\DevOps\Chapter 13 (VAT Registration No. Validation)
2023-02-06T05:18:55.0304524Z    - C:\Run\DevOps\LookupValue Extension\App
2023-02-06T05:18:55.0529195Z    - C:\Run\DevOps\LookupValue Extension\Test
2023-02-06T05:18:55.0605190Z *** Retrieving App-Info [\Chapter 12 (LookupValue Extension)\app.json]
2023-02-06T05:18:55.1245292Z *** Loading Json Object: [c:\Run\DevOps\Chapter 12 (LookupValue Extension)\app.json]
2023-02-06T05:18:55.1299501Z   * App.ID          = e26890f8-fafe-49c6-8951-2c1457921f9b
2023-02-06T05:18:55.1323292Z   * App.Name        = LookupValue
2023-02-06T05:18:55.1352596Z   * App.Publisher   = fluxxus.nl
2023-02-06T05:18:55.1375056Z   * App.Version     = 2.0.0.0
2023-02-06T05:18:55.1405780Z   * App.Platform    = 18.0.0.0
2023-02-06T05:18:55.1429365Z   * App.Application = 18.0.0.0
2023-02-06T05:18:55.1494593Z *** Check Runtime: [7.0]
2023-02-06T05:18:55.1597310Z *** Removing ResourceExposurePolicy
2023-02-06T05:18:55.1641374Z ***
2023-02-06T05:18:55.2150497Z *** Match: yyyyWW
2023-02-06T05:18:55.2317161Z *** Retaining original [Major] from version (?.0.0.0)
2023-02-06T05:18:55.2355285Z *** Retaining original [Minor] from version (0.?.0.0)
2023-02-06T05:18:55.2409874Z *** Setting Managed App Version [c:\Run\DevOps\Chapter 12 (LookupValue Extension)\app.json] =>  2.0.202306.1300
2023-02-06T05:18:55.2859202Z *** Final app.json:
2023-02-06T05:18:55.2860181Z {
2023-02-06T05:18:55.2860729Z     "id":  "e26890f8-fafe-49c6-8951-2c1457921f9b",
2023-02-06T05:18:55.2861335Z     "name":  "LookupValue",
2023-02-06T05:18:55.2862179Z     "publisher":  "fluxxus.nl",
2023-02-06T05:18:55.2862950Z     "brief":  "LookupValue extension for book Automated Testing in Microsoft Dynamics 365 Business Central",
2023-02-06T05:18:55.2863997Z     "description":  "LookupValue extension as basis to test examples in chapter 6 and following for the book Automated Testing in Microsoft Dynamics 365 Business Central written by Luc van Vugt and published by Packt",
2023-02-06T05:18:55.2864872Z     "version":  "2.0.202306.1300",
2023-02-06T05:18:55.2865487Z     "privacyStatement":  "",
2023-02-06T05:18:55.2866014Z     "EULA":  "",
2023-02-06T05:18:55.2866528Z     "help":  "",
2023-02-06T05:18:55.2867054Z     "url":  "",
2023-02-06T05:18:55.2867571Z     "logo":  "",
2023-02-06T05:18:55.2868105Z     "dependencies":  [
2023-02-06T05:18:55.2868620Z                          {
2023-02-06T05:18:55.2869305Z                              "id":  "e7320ebb-08b3-4406-b1ec-b4927d3e280b",
2023-02-06T05:18:55.2869948Z                              "publisher":  "Microsoft",
2023-02-06T05:18:55.2870549Z                              "version":  "18.0.0.0",
2023-02-06T05:18:55.2871114Z                              "name":  "Any"
2023-02-06T05:18:55.2871636Z                          },
2023-02-06T05:18:55.2872155Z                          {
2023-02-06T05:18:55.2872782Z                              "id":  "dd0be2ea-f733-4d65-bb34-a28f4624fb14",
2023-02-06T05:18:55.2873524Z                              "publisher":  "Microsoft",
2023-02-06T05:18:55.2874041Z                              "version":  "18.0.0.0",
2023-02-06T05:18:55.2874700Z                              "name":  "Library Assert"
2023-02-06T05:18:55.2875232Z                          },
2023-02-06T05:18:55.2875772Z                          {
2023-02-06T05:18:55.2876437Z                              "id":  "5095f467-0a01-4b99-99d1-9ff1237d286f",
2023-02-06T05:18:55.2877152Z                              "publisher":  "Microsoft",
2023-02-06T05:18:55.2877715Z                              "version":  "18.0.0.0",
2023-02-06T05:18:55.2878367Z                              "name":  "Library Variable Storage"
2023-02-06T05:18:55.2878941Z                          },
2023-02-06T05:18:55.2879473Z                          {
2023-02-06T05:18:55.2880185Z                              "id":  "5d86850b-0d76-4eca-bd7b-951ad998e997",
2023-02-06T05:18:55.2880977Z                              "publisher":  "Microsoft",
2023-02-06T05:18:55.2881663Z                              "version":  "18.0.0.0",
2023-02-06T05:18:55.2882337Z                              "name":  "Tests-TestLibraries"
2023-02-06T05:18:55.2882957Z                          },
2023-02-06T05:18:55.2883507Z                          {
2023-02-06T05:18:55.2884189Z                              "id":  "23de40a6-dfe8-4f80-80db-d70f83ce8caf",
2023-02-06T05:18:55.2884955Z                              "name":  "Test Runner",
2023-02-06T05:18:55.2885855Z                              "publisher":  "Microsoft",
2023-02-06T05:18:55.2886554Z                              "version":  "18.0.0.0"
2023-02-06T05:18:55.2887182Z                          }
2023-02-06T05:18:55.2887743Z                      ],
2023-02-06T05:18:55.2888342Z     "screenshots":  [
2023-02-06T05:18:55.2888689Z 
2023-02-06T05:18:55.2889114Z                     ],
2023-02-06T05:18:55.2889719Z     "platform":  "18.0.0.0",
2023-02-06T05:18:55.2890382Z     "application":  "18.0.0.0",
2023-02-06T05:18:55.2890955Z     "idRanges":  [
2023-02-06T05:18:55.2891533Z                      {
2023-02-06T05:18:55.2892117Z                          "from":  50000,
2023-02-06T05:18:55.2892744Z                          "to":  50099
2023-02-06T05:18:55.2893319Z                      },
2023-02-06T05:18:55.2894453Z                      {
2023-02-06T05:18:55.2895024Z                          "from":  80000,
2023-02-06T05:18:55.2895627Z                          "to":  81099
2023-02-06T05:18:55.2896195Z                      }
2023-02-06T05:18:55.2897422Z                  ],
2023-02-06T05:18:55.2898540Z     "target":  "OnPrem",
2023-02-06T05:18:55.2899090Z     "showMyCode":  true,
2023-02-06T05:18:55.2899638Z     "runtime":  "7.0"
2023-02-06T05:18:55.2900102Z }
2023-02-06T05:18:55.2900419Z 
2023-02-06T05:18:55.2900860Z ***
2023-02-06T05:18:55.3441086Z *** Working Direcotry: [c:\Run\DevOps\]
2023-02-06T05:18:55.3452051Z *** Target Project: [\Chapter 12 (LookupValue Extension)\app.json]
2023-02-06T05:18:55.3468089Z *** Project Directory: [c:\Run\DevOps\Chapter 12 (LookupValue Extension)]
2023-02-06T05:18:55.3505403Z *** VSCode Settings: [c:\Run\DevOps\Chapter 12 (LookupValue Extension)\.vscode\settings.json]
2023-02-06T05:18:55.3534670Z *** VSCode-Settings json found.
2023-02-06T05:18:55.3548539Z *** Loading Json Object: [c:\Run\DevOps\Chapter 12 (LookupValue Extension)\.vscode\settings.json]
2023-02-06T05:18:55.3588407Z *** No AL-RuleSet json found.
2023-02-06T05:18:55.3600080Z ***
2023-02-06T05:18:55.5269088Z *** Resolve Docker Credentials
2023-02-06T05:18:55.5349942Z *** Setup BC Username/Password from Container info
2023-02-06T05:18:55.5427711Z *** Download Symbols
2023-02-06T05:18:55.9116107Z *** Working Dir: c:\Run\DevOps\
2023-02-06T05:18:56.1019340Z *** Loading assemblies from: [C:\program files\microsoft dynamics nav\210\service]
2023-02-06T05:18:56.1950923Z *** PackageCache path created [c:\Run\DevOps\PackageCache]
2023-02-06T05:18:56.1961515Z ***
2023-02-06T05:18:56.2051361Z *** Propagated Dependency: Microsoft - Any - 18.0.0.0
2023-02-06T05:18:56.2130078Z *** Propagated Dependency: Microsoft - Library Assert - 18.0.0.0
2023-02-06T05:18:56.2144675Z *** Propagated Dependency: Microsoft - Library Variable Storage - 18.0.0.0
2023-02-06T05:18:56.2158810Z *** Propagated Dependency: Microsoft - Tests-TestLibraries - 18.0.0.0
2023-02-06T05:18:56.2174035Z *** Propagated Dependency: Microsoft - Test Runner - 18.0.0.0
2023-02-06T05:18:56.2186820Z *** Download System-Symbols for [18.0.0.0]
2023-02-06T05:18:56.2559339Z *** Downloading NAV Symbols for [System v18.0.0.0]
2023-02-06T05:18:56.2566818Z *** Downloading NAV Symbols from [https://9297bf74cbb5:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=18.0.0.0&tenant=default]
2023-02-06T05:18:56.2920375Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2023-02-06T05:18:56.2944258Z ##[command]Invoke-RestMethod -Method Get -Uri https://9297bf74cbb5:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=18.0.0.0&tenant=default
2023-02-06T05:18:57.4365154Z *** Content-Disposition: attachment; filename=Microsoft_System_21.0.52534.52761.app; filename*=UTF-8''Microsoft_System_21.0.52534.52761.app
2023-02-06T05:18:57.4588841Z *** Saving symbol file [Microsoft_System_21.0.52534.52761.app] to [c:\Run\DevOps\PackageCache]
2023-02-06T05:18:57.4818862Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_System_21.0.52534.52761.app].
2023-02-06T05:18:57.5815268Z ***
2023-02-06T05:18:57.5822790Z *** Download Application-Symbols for [18.0.0.0]
2023-02-06T05:18:57.5842548Z *** Downloading NAV Symbols for [Application v18.0.0.0]
2023-02-06T05:18:57.5852691Z *** Downloading NAV Symbols from [https://9297bf74cbb5:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=18.0.0.0&tenant=default]
2023-02-06T05:18:57.5867411Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2023-02-06T05:18:57.5877632Z ##[command]Invoke-RestMethod -Method Get -Uri https://9297bf74cbb5:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=18.0.0.0&tenant=default
2023-02-06T05:18:58.0405143Z *** Content-Disposition: attachment; filename=Microsoft_Application_21.4.52563.52785.app; filename*=UTF-8''Microsoft_Application_21.4.52563.52785.app
2023-02-06T05:18:58.0434537Z *** Saving symbol file [Microsoft_Application_21.4.52563.52785.app] to [c:\Run\DevOps\PackageCache]
2023-02-06T05:18:58.0457943Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_Application_21.4.52563.52785.app].
2023-02-06T05:18:58.0759072Z *** Propagated Dependency: Microsoft - System Application - 21.4.0.0
2023-02-06T05:18:58.0807291Z *** Propagated Dependency: Microsoft - Base Application - 21.4.0.0
2023-02-06T05:18:58.0818858Z ***
2023-02-06T05:18:58.0833478Z *** Check for Depency Apps 7
2023-02-06T05:18:58.0976352Z *** Download Application-Symbols for [Any v18.0.0.0]
2023-02-06T05:18:58.0995556Z *** Downloading NAV Symbols for [Any v18.0.0.0]
2023-02-06T05:18:58.1003229Z *** Downloading NAV Symbols from [https://9297bf74cbb5:7049/BC/dev/packages?publisher=Microsoft&appName=Any&versionText=18.0.0.0&tenant=default&appid=e7320ebb-08b3-4406-b1ec-b4927d3e280b]
2023-02-06T05:18:58.1020229Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2023-02-06T05:18:58.1029393Z ##[command]Invoke-RestMethod -Method Get -Uri https://9297bf74cbb5:7049/BC/dev/packages?publisher=Microsoft&appName=Any&versionText=18.0.0.0&tenant=default&appid=e7320ebb-08b3-4406-b1ec-b4927d3e280b
2023-02-06T05:18:58.7433914Z ##[error]Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
2023-02-06T05:18:58.7872146Z ##[section]Async Command Start: Add Build Tag
2023-02-06T05:18:58.7873253Z Build '1300' has following tags now: AL.Compiler.ALLanguage, BC.Version.21.4.52563.52785, BC.Platform.21.0.52534.52761, myimage-onprem-21.4.52563.52785-w1-10.0.20348.587-ltsc2022
2023-02-06T05:18:58.7873938Z ##[section]Async Command End: Add Build Tag
2023-02-06T05:18:58.7874846Z ##[section]Async Command Start: Update Build Number
2023-02-06T05:18:58.7875409Z Update build number to 2.0.202306.1300 for build 1300
2023-02-06T05:18:58.7875810Z ##[section]Async Command End: Update Build Number
2023-02-06T05:18:58.7876975Z ##[section]Finishing: ALOPS - Compile Extension: App

Is that because of the same issue?

It highly correlates with the time schedule @SorenKlemmensen shares above. Last weekend errors, on Tuesday succes.

waldo1001 commented 1 year ago

I'm afraid I'll need yamls .. I only get (part of the) output 🤷‍♂️.

SorenKlemmensen commented 1 year ago

I cut and pasted the important parts. I have it all templated, so I would have to give you a template repository and the main pipeline from the project, but that seems like over kill.

START YAML steps:

  • checkout: self clean: true
    - task: ALOpsDockerCreate@1
      displayName: 'ALOPS - Create Docker Image'
      inputs:
        artifacttype: sandbox
        artifactcountry: ${{artifactcountry}}
        versionselect: ${{versionselect}}
        sastoken: $(ms.bc.insider.sastoken)

    - task: ALOpsDockerStart@1
      displayName: 'ALOPS - Start Docker Container'

    - task: ALOpsDockerWait@1
      displayName: 'ALOPS - Wait for Docker Container to start'
      inputs:
        search_string: 'Ready for connections!'

    - task: DownloadSecureFile@1
      name: SecureBCLicenseFile
      displayName: 'Secure BC License File Download'
      inputs:
        secureFile: '$(ms.bc.license)'

    - task: ALOpsLicenseImport@1
      displayName: 'ALOPS - License Import'
      inputs:
        usedocker: true
        license_path: $(SecureBCLicenseFile.secureFilePath)

<<<< END YAML

The RAW log License import 2023-02-06T00:20:12.2748948Z ##[section]Starting: ALOPS - License Import 2023-02-06T00:20:12.2919406Z ============================================================================== 2023-02-06T00:20:12.2919663Z Task : ALOps License Import 2023-02-06T00:20:12.2919789Z Description : Import Business Central license (.flf) 2023-02-06T00:20:12.2919942Z Version : 1.454.3402 2023-02-06T00:20:12.2920060Z Author : Hodor 2023-02-06T00:20:12.2920199Z Help : Import Business Central license (.flf). 2023-02-06T00:20:12.2920355Z ============================================================================== 2023-02-06T00:20:14.0485875Z Validate configuration 2023-02-06T00:20:14.3392598Z Task Inputs: 2023-02-06T00:20:14.3450250Z 2023-02-06T00:20:14.3551894Z name value 2023-02-06T00:20:14.3557360Z ---- ----- 2023-02-06T00:20:14.3559698Z usedocker True 2023-02-06T00:20:14.3563179Z fixed_tag
2023-02-06T00:20:14.3566791Z nav_serverinstance BC140 2023-02-06T00:20:14.3570504Z license_path D:\a_temp\XXXXXXX.bclicense 2023-02-06T00:20:14.3574124Z remove_license_file True 2023-02-06T00:20:14.3578192Z print_license_info False 2023-02-06T00:20:14.3582664Z license_scope Default 2023-02-06T00:20:14.3583336Z 2023-02-06T00:20:14.3638513Z 2023-02-06T00:20:14.3688378Z 2023-02-06T00:20:14.3890091Z For documentation, please visit : https://www.alops.be/documentation 2023-02-06T00:20:14.3896566Z 2023-02-06T00:20:14.7675370Z ALOps License: 2023-02-06T00:20:14.7701597Z * Licensed To: GMI group NV (Collection License) 2023-02-06T00:20:14.7706146Z 2023-02-06T00:20:14.7871875Z Importing required PS-Functions 2023-02-06T00:20:15.0159425Z Connect Docker Session 2023-02-06T00:20:15.7808167Z Initiate Docker Session 2023-02-06T00:20:16.1604025Z Set Docker Container ErrorActionPreference = Stop 2023-02-06T00:20:16.4397827Z Copy BC-License to Docker Container: 0173e1db6ccb3ac9f96a0835beefc9f4050bc1675ec5b9e8fa3f23a79c4a5996 2023-02-06T00:20:16.4435231Z Docker BC-License Folder: c:\run\ALOps\License 2023-02-06T00:20:16.4447445Z License Source: D:\a_temp\XXXXXXX.bclicense 2023-02-06T00:20:16.4458479Z License Target: c:\run\ALOps\License\XXXXXXX.bclicense 2023-02-06T00:20:16.5127153Z Copy [D:\a_temp\XXXXXXX.bclicense] to Container: '0173e1db6ccb3ac9f96a0835beefc9f4050bc1675ec5b9e8fa3f23a79c4a5996:c:\run\ALOps\License\XXXXXXX.bclicense' 2023-02-06T00:20:17.0211134Z Import license in docker container. 2023-02-06T00:20:17.5577820Z Import NAV/BC Management DLL's 2023-02-06T00:20:17.5748473Z Loading assemblies for ServiceTier [BC]. 2023-02-06T00:20:18.5658428Z *** Loading assemblies from: [C:\program files\microsoft dynamics nav\220\service] 2023-02-06T00:20:18.9453873Z ##[error]Cannot find path 'C:\program files\microsoft dynamics nav\220\service\Microsoft.Dynamics.Nav.Apps.Management.dll' because it does not exist. 2023-02-06T00:20:18.9731043Z ##[section]Finishing: ALOPS - License Import <<<< END RAW log

this should do it.

Let me know if you need anything else.

waldo1001 commented 1 year ago

I hope I can migrate that to a working/failing pipeline.

In the meantime .. you can provide the licensefile on docker creation as well: image

And on DockerStart: image

Could you test that these work? It might be a shortcut in the meantime while we investigate the license import part...

waldo1001 commented 1 year ago

@SorenKlemmensen , I also see you doing a download yourself: image

do know you can just provide an url to the license-path, and we'll download it for you ...

waldo1001 commented 1 year ago

We have replicated the issue .. looks like MS changed the path to the dlls / service tier /.. .

lvanvugt commented 1 year ago

@waldo1001, still need more input on the BC21 issue?

SorenKlemmensen commented 1 year ago

Once again a heads up about this type of stuff would have been handy. I have not tested the workaround yet, but will between meetings.

waldo1001 commented 1 year ago

Other things will break, unfortunately - they moved the dlls to a subfolder, so now we need to make sure we get them there... 🤷‍♂️

lvanvugt commented 1 year ago

IMHO no need to test that. In another project I have thr license uploaded as per @waldo1001 suggestion already:

- task: ALOpsDockerCreate@1
  displayName: 'ALOPS - Create Docker Image'
  inputs:
    artifacttype: 'Sandbox'
    artifactcountry: '$(artifactCountry)'
    versionselect: 'nextmajor'
    sastoken: '$(BCInsiderToken)'
    forcecreateimage: $(forceCreateImage)
    licensefile: '$(LuxBeheerBcDevLicense)'
    includetesttoolkit: true
    includetestlibrariesonly: true

This step is giving no issues.

The same script also contains the step with ALOpsLicenseImport (to make sure that reused image always has latests license), which now fails as per the above. The latter is probably not very relevant for sandbox (and insider) artifacts as multiple builds per day, but is in the script as it is generically used.

But, now disabling ALOpsLicenseImport step, the above error occurs in the ALOpsAppCompiler step.

lvanvugt commented 1 year ago

Other things will break, unfortunately - they moved the dlls to a subfolder, so now we need to make sure we get them there... 🤷‍♂️

Was working on my comment when yours came in ...

lvanvugt commented 1 year ago

Meanwhile BC21 builds also fail but with different error in ALOpsAppCompiler step.

This issue has been solved, so, not related. Solution: force creation of image.

lvanvugt commented 1 year ago

@waldo1001 was a fix found for this?

acjdekorte commented 1 year ago

@waldo1001 When can we expect a fix, because the release of BC22 is coming closer now and it would be nice to know if the automatic tests are still working.

lvanvugt commented 1 year ago

@AdminHodor, I (we?) would love to get a status update. Thanx in advance.

JanBoes commented 1 year ago

@AdminHodor, I (we?) would love to get a status update. Thanx in advance.

CarloAxians commented 1 year ago

@AdminHodor Is there any news about a workaround of fix for this. Our NextMajor and NextMinor pipelines are all failing on this issue. Thx

waldo1001 commented 1 year ago

We have uploaded a fixed version, but we're waiting for Microsoft to verify the new extension. This takes longer than usual - and we're in contact with Microsoft about the issue. Hopefully it's uploaded soon.

Sorry about this, but it has been quite an undertaking to get this fixed :(.

AdminHodor commented 1 year ago

Dear @lvanvugt ,

Please try our latest release v1.455.3559 which should solve this.

Kind regards,

Pharrious commented 1 year ago

The task 'ALOpsAppTest@1' gave me the following output / error. The format is from the raw-log, and looks nicer in non-preview :) Running with artifactversion NextMajor

2023-03-22T12:41:28.5519162Z ##[section]Starting: Run Custom Tests 2023-03-22T12:41:28.5685049Z ============================================================================== 2023-03-22T12:41:28.5685758Z Task : ALOps App Test 2023-03-22T12:41:28.5685917Z Description : Run AL-TestSuite for Business Central 2023-03-22T12:41:28.5686108Z Version : 1.455.3559 2023-03-22T12:41:28.5686260Z Author : Hodor 2023-03-22T12:41:28.5686388Z Help : Run Business Central Test-Suite and collect results. 2023-03-22T12:41:28.5686609Z ============================================================================== 2023-03-22T12:41:29.5261516Z *** Validate configuration 2023-03-22T12:41:29.6776698Z *** Task Inputs: 2023-03-22T12:41:29.6838764Z 2023-03-22T12:41:29.6965716Z name value 2023-03-22T12:41:29.6967707Z ---- ----- 2023-03-22T12:41:29.6969322Z usedocker True 2023-03-22T12:41:29.6970769Z fixed_tag 2023-03-22T12:41:29.6972280Z nav_serverinstance BC140 2023-03-22T12:41:29.6974022Z tenant default 2023-03-22T12:41:29.6975448Z companyname 2023-03-22T12:41:29.6977119Z profile 2023-03-22T12:41:29.6978986Z bc_username 2023-03-22T12:41:29.6980213Z bc_password 2023-03-22T12:41:29.6981380Z bc_authentication NavUserPassword 2023-03-22T12:41:29.6982807Z bc_webclient_url 2023-03-22T12:41:29.6984417Z testfilter 2023-03-22T12:41:29.6986260Z disabledtests 2023-03-22T12:41:29.6987379Z show_available_tests True 2023-03-22T12:41:29.6988858Z import_testtoolkit False 2023-03-22T12:41:29.6990291Z import_action Skip 2023-03-22T12:41:29.6991805Z testpage 130455 2023-03-22T12:41:29.6993448Z testsuite SBA-TEST 2023-03-22T12:41:29.6994885Z extensionid 2023-03-22T12:41:29.6996610Z installaltesttool False 2023-03-22T12:41:29.6997785Z failed_test_action Error 2023-03-22T12:41:29.6999146Z override_finsql_path 2023-03-22T12:41:29.7000610Z resultfilename TestResults.xml 2023-03-22T12:41:29.7002372Z testrunnercodeunitid 2023-03-22T12:41:29.7002606Z 2023-03-22T12:41:29.7028362Z 2023-03-22T12:41:29.7037984Z 2023-03-22T12:41:29.7232562Z *** For documentation, please visit : https://www.alops.be/documentation 2023-03-22T12:41:29.7235954Z 2023-03-22T12:41:30.1457784Z *** ALOps License: 2023-03-22T12:41:30.1479153Z * Licensed To: ********************* 2023-03-22T12:41:30.1483842Z 2023-03-22T12:41:30.1614664Z *** Importing required PS-Functions 2023-03-22T12:41:30.2034692Z *** Working folder: C:\agent\_work\1332\s 2023-03-22T12:41:30.2042501Z *** 2023-03-22T12:41:30.2051194Z *** Prepare Docker Session 2023-03-22T12:41:30.3056834Z *** Connect Docker Session 2023-03-22T12:41:30.3164651Z *** Initiate Docker Session 2023-03-22T12:41:30.6754768Z *** Set Docker Container ErrorActionPreference = Stop 2023-03-22T12:41:30.9050196Z *** Copy Modules to Docker 2023-03-22T12:41:33.7522650Z *** Setup Docker Session 2023-03-22T12:41:33.7897192Z *** Checking for container-specific Test Assemblies 2023-03-22T12:41:33.7906981Z *** Using container-specific Test Assemblies 2023-03-22T12:41:33.8430135Z *** Import Modules in Docker Session 2023-03-22T12:41:34.2070566Z *** Import UI Client [C:\Run\DevOps\BCAppTest\bin\Microsoft.Dynamics.Framework.UI.Client.dll] 2023-03-22T12:41:34.2094499Z VERBOSE: Loading module from path 'C:\Run\DevOps\BCAppTest\bin\Microsoft.Dynamics.Framework.UI.Client.dll'. 2023-03-22T12:41:34.4017289Z *** Import NewtonSoft JSON [C:\Program Files\Microsoft Dynamics NAV\220\Service\Newtonsoft.Json.dll] 2023-03-22T12:41:34.5504602Z ##[error]Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 2023-03-22T12:41:34.5806774Z ##[section]Finishing: Run Custom Tests

acjdekorte commented 1 year ago

We have the same issue with running the tests on the nextmajor

AdminHodor commented 1 year ago

Please try our latest release v1.455.3571.

Kind regards,

lvanvugt commented 1 year ago

Tested and seems to be OK (did not run all related pipelines yet). So far, so good.