HodorNV / ALOps

ALOps
59 stars 24 forks source link

ALOpsAppSource: Install of Powershell Module AZ happens every time #685

Closed DanielGoehler closed 12 months ago

DanielGoehler commented 1 year ago

Describe the bug Each run of ALOpsAppSource installs the AZ Powershell module, which takes an extra 7 minutes.

the used yaml please provide the yaml that you used. It helps you put the yaml like this:

steps:
- task: Hodor.hodor-alops.ALOpsAppSource.ALOpsAppSource@1
  displayName: 'ALOps AppSource'
  inputs:
    azure_tenant_id: '$(TenantID)'
    azure_app_client_id: '$(AppSourceClientId)'
    azure_app_client_secret: '$(AppSourceClientSecret)'

the output Also the complete output is necessary for us to see what is going on. Also use backtics:

2023-10-13T19:22:24.4525407Z ##[section]Starting: ALOps AppSource
2023-10-13T19:22:24.4655271Z ==============================================================================
2023-10-13T19:22:24.4655508Z Task         : ALOps AppSource
2023-10-13T19:22:24.4655603Z Description  : Compile AL Extensions for Business Central
2023-10-13T19:22:24.4655721Z Version      : 1.459.4971
2023-10-13T19:22:24.4655821Z Author       : Hodor
2023-10-13T19:22:24.4655901Z Help         : Compile a Business Central extension from AL code.
2023-10-13T19:22:24.4656018Z ==============================================================================
2023-10-13T19:22:25.6365775Z *** Validate configuration
2023-10-13T19:22:25.6429383Z *** Task Inputs:
2023-10-13T19:22:25.6503840Z 
2023-10-13T19:22:25.6510195Z name                    value                                   
2023-10-13T19:22:25.6512004Z ----                    -----                                   
2023-10-13T19:22:25.6513751Z azure_tenant_id         ***    
2023-10-13T19:22:25.6516108Z azure_app_client_id     ***    
2023-10-13T19:22:25.6517768Z azure_app_client_secret ***
2023-10-13T19:22:25.6542202Z 
2023-10-13T19:22:25.6548751Z 
2023-10-13T19:22:25.6734431Z 
2023-10-13T19:22:25.6743258Z *** For documentation, please visit   : https://www.alops.be/documentation
2023-10-13T19:22:25.9814132Z 
2023-10-13T19:22:26.0062934Z *** Importing required PS-Functions
2023-10-13T19:22:26.0259965Z *** Load Management DLL's
2023-10-13T19:22:26.0310113Z *** Import NAV/BC Management DLL's [False]
2023-10-13T19:22:26.0437503Z *** ServiceTier not specified, loading default assemblies.
2023-10-13T19:22:26.0622654Z *** Default Assemblies not found. Load via BC-Artifacts
2023-10-13T19:22:26.0705308Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2023-10-13T19:22:26.0778745Z *** Check BcContainerHelper
2023-10-13T19:22:26.2283955Z *** Load BcContainerHelper
2023-10-13T19:22:26.3471164Z BcContainerHelper version 6.0.0
2023-10-13T19:22:26.8686243Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2023-10-13T19:22:29.4229484Z 
2023-10-13T19:22:29.4230837Z ModuleType Version    Name                                ExportedCommands                                             
2023-10-13T19:22:29.4231447Z ---------- -------    ----                                ----------------                                             
2023-10-13T19:22:29.4232098Z Script     6.0.0      BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, AddTele...
2023-10-13T19:22:29.4259616Z 
2023-10-13T19:22:29.4273649Z 
2023-10-13T19:22:29.4274185Z 
2023-10-13T19:22:29.4274585Z 
2023-10-13T19:22:29.4276100Z ##[command]"Get-BCArtifactUrl" 
2023-10-13T19:22:29.4276568Z Name                           Value                                                                                   
2023-10-13T19:22:29.4277026Z ----                           -----                                                                                   
2023-10-13T19:22:29.4277421Z select                         Latest                                                                                  
2023-10-13T19:22:29.4277810Z type                           OnPrem                                                                                  
2023-10-13T19:22:29.4278204Z country                        W1                                                                                      
2023-10-13T19:22:29.4278451Z 
2023-10-13T19:22:29.4278682Z 
2023-10-13T19:22:29.4372940Z  -select: Latest -type: OnPrem -country: W1
2023-10-13T19:22:32.9008591Z *** Platform: C:\bcartifacts.cache\onprem\23.0.12034.12841\platform
2023-10-13T19:22:32.9895144Z *** Localisation: C:\bcartifacts.cache\onprem\23.0.12034.12841\w1
2023-10-13T19:22:32.9983176Z *** BC Management DLL: C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management\Microsoft.Dynamics.Nav.Management.dll
2023-10-13T19:22:33.0017784Z *** Selected module: [C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2023-10-13T19:22:33.0140179Z *** Loading module: [C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2023-10-13T19:22:33.1443194Z *** BC App Management DLL: C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll
2023-10-13T19:22:33.1453265Z *** Selected module: [C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll]
2023-10-13T19:22:33.1639887Z *** Loading module: [C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll]
2023-10-13T19:22:33.1818264Z *** Load CodeAnalysis from [C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management]
2023-10-13T19:22:33.1926254Z *** Loading assemblies from: [C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management]
2023-10-13T19:22:33.2570750Z *** Loading: [C:\bcartifacts.cache\onprem\23.0.12034.12841\platform\ServiceTier\program files\Microsoft Dynamics NAV\230\Service\Management\Microsoft.Dynamics.Nav.CodeAnalysis.dll]
2023-10-13T19:22:33.2638972Z *** Check Powershell Module [AZ]
2023-10-13T19:22:33.3115989Z *** Install Powershell Module [AZ]
2023-10-13T19:29:39.5133622Z *** Request OAuth token for [api.partner.microsoft.com]
2023-10-13T19:29:39.5146043Z   * Client ID: ***
2023-10-13T19:29:39.7584062Z *** Fetch Offering-Data from [api.partner.microsoft.com]
[..]

Expected behavior The same version should not be reinstalled if the AZ Powershell module is already installed.

waldo1001 commented 1 year ago

Fixed in next release!

We have far shorter time loss though ..

AdminHodor commented 12 months ago

Dear @DanielGoehler ,

Please check our latest release v1.461, improvements are made on loading of this specific module. Loading is skipped if the required version is found. Thanks for bringing this to our attention!

Kind regards,

DanielGoehler commented 12 months ago

@AdminHodor Yes, it works, nice. Thank you very much!