HodorNV / ALOps

ALOps
59 stars 24 forks source link

Cannot find path '...Applications.DE\Any.Source.zip' #376

Closed dNsl9r closed 3 years ago

dNsl9r commented 3 years ago

Describe the bug Out NextMajor Pipelines are currently failing with the error: Cannot find path 'C:\bcartifacts.cache\sandbox\19.0.26131.0\w0lozrtc.wio\Applications.DE\Any.Source.zip'

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

name: Weekly Core Next Major Build $(Build.BuildId)

trigger: none

resources:
    repositories:
    - repository: CITemplates
      type: git
      name: PAY_CI-CD_Pipelines

variables:
  - template: CI/Templates/PipelineVariables.yml@CITemplates

schedules:
- cron: "0 0 * * 2,4"
  displayName: Dienstag / Donnerstag
  branches:
    include:
      - master
  always: true

stages:
- stage: StartBuildVM
  condition: always()
  pool:
    name: 'Azure Pipelines'
    vmImage: 'vs2017-win2016'

.....

- stage: CompileCoreApp
  condition: succeeded('StartBuildVM')
  pool: Default

  jobs:
  - job: CompileJobDE
    steps:
    - checkout: self
      clean: true

    - task: ALOpsAppCompiler@2
      inputs:
        versionselect: NextMajor
        artifacttype: Sandbox
        artifactcountry: 'de'
        appversiontemplate: '$(D365BC17-ReleaseNo).*'  
        appfilenametemplate: '%APP_PUBLISHER%_%APP_NAME%_%APP_VERSION%_%BC_TYPE%_%BC_VERSION%_%BC_COUNTRY%.app'
        alcodeanalyzer: 'CodeCop,AppSourceCop'
        showmycode: 'Disable'        
        publishartifact: true
        sastoken: $(sasToken)

- stage: StopBuildVM
  condition: always()
  pool:
    name: 'Azure Pipelines'
    vmImage: 'vs2017-win2016'
....

the output

2021-05-28T08:26:31.8073428Z ##[section]Starting: ALOpsAppCompiler
2021-05-28T08:26:31.8221772Z ==============================================================================
2021-05-28T08:26:31.8222060Z Task         : ALOps App Compiler
2021-05-28T08:26:31.8222272Z Description  : Compile AL Extension(s) for Business Central
2021-05-28T08:26:31.8222459Z Version      : 2.0.2488
2021-05-28T08:26:31.8222628Z Author       : Hodor
2021-05-28T08:26:31.8222836Z Help         : Compile Business Central extension(s) from AL code.
2021-05-28T08:26:31.8223083Z ==============================================================================
2021-05-28T08:26:35.1878420Z ******************************************************************************
2021-05-28T08:26:35.1889740Z *** ALOps v2 - Preview                                                     ***
2021-05-28T08:26:35.1899929Z ******************************************************************************
2021-05-28T08:26:35.1911180Z *** Importing required ALOps-Functions
2021-05-28T08:26:35.8009805Z *** Task Inputs:
2021-05-28T08:26:35.8070939Z 
2021-05-28T08:26:35.8206152Z name                   value                                                                                           
2021-05-28T08:26:35.8210080Z ----                   -----                                                                                           
2021-05-28T08:26:35.8214994Z artifactversion                                                                                                        
2021-05-28T08:26:35.8218466Z artifacttype           Sandbox                                                                                         
2021-05-28T08:26:35.8221895Z artifactcountry        de                                                                                              
2021-05-28T08:26:35.8224926Z versionselect          NextMajor                                                                                       
2021-05-28T08:26:35.8229761Z alternativevsixurl                                                                                                     
2021-05-28T08:26:35.8233653Z alsourcepath           C:\Agent\_work\264\s                                                                            
2021-05-28T08:26:35.8237478Z ruleset                                                                                                                
2021-05-28T08:26:35.8242230Z appversiontemplate     17.4.0.*                                                                                        
2021-05-28T08:26:35.8247793Z appfilenametemplate    %APP_PUBLISHER%_%APP_NAME%_%APP_VERSION%_%BC_TYPE%_%BC_VERSION%_%BC_COUNTRY%.app                
2021-05-28T08:26:35.8251100Z alcodeanalyzer         CodeCop,AppSourceCop                                                                            
2021-05-28T08:26:35.8254010Z showmycode             Disable                                                                                         
2021-05-28T08:26:35.8255882Z applicationinsightskey                                                                                                 
2021-05-28T08:26:35.8259467Z alcachepath            C:\Agent\_work\264\s                                                                            
2021-05-28T08:26:35.8264590Z publishartifact        True                                                                                            
2021-05-28T08:26:35.8268344Z publishxlif            False                                                                                           
2021-05-28T08:26:35.8271798Z failonwarnings         False                                                                                           
2021-05-28T08:26:35.8275145Z storageaccount                                                                                                         
2021-05-28T08:26:35.8345758Z sastoken              you know it.
2021-05-28T08:26:35.8349613Z printappmanifest       True                                                                                            
2021-05-28T08:26:35.8351209Z outputalclogs          True                                                                                            
2021-05-28T08:26:35.8354455Z additionalprobingpaths                                                                                                 
2021-05-28T08:26:35.8355009Z 
2021-05-28T08:26:35.8376717Z 
2021-05-28T08:26:35.8382968Z 
2021-05-28T08:26:35.8598162Z *** For documentation, please visit   : https://www.alops.be/documentation
2021-05-28T08:26:35.8601173Z 
2021-05-28T08:26:36.1675528Z *** ALOps License:
2021-05-28T08:26:36.1699543Z   * Licensed To: us
2021-05-28T08:26:36.1702835Z 
2021-05-28T08:26:36.3168348Z *** Importing required Task-Functions
2021-05-28T08:26:39.2960165Z 
2021-05-28T08:26:39.3616641Z *** Artifact Type   : [Sandbox]
2021-05-28T08:26:39.3633723Z *** Artifact Version: []
2021-05-28T08:26:39.3645981Z *** Artifact Country: [de]
2021-05-28T08:26:39.3651820Z *** AL Source Path  : [C:\Agent\_work\264\s]
2021-05-28T08:26:39.3685009Z *** AL Cache Path   : [C:\Agent\_work\264\s]
2021-05-28T08:26:39.3955417Z 
2021-05-28T08:26:39.4190255Z 
2021-05-28T08:26:39.4190903Z *** Default Working Folder: C:\Agent\_work\264\s
2021-05-28T08:26:39.4191406Z *** Artifact Folder       : C:\Agent\_work\264\a
2021-05-28T08:26:39.4192263Z *** Agent Tool Folder     : C:\Agent\_work\_tool
2021-05-28T08:26:39.4193005Z *** Agent Temp Folder     : C:\Agent\_work\_temp
2021-05-28T08:26:39.4193476Z 
2021-05-28T08:26:39.4193958Z *** Resolving Path: [C:\Agent\_work\264\s]
2021-05-28T08:26:39.4260403Z *** AL Source Folder      : C:\Agent\_work\264\s
2021-05-28T08:26:39.4263933Z *** Resolving Path: [C:\Agent\_work\264\s]
2021-05-28T08:26:39.4280107Z *** AL Cache Folder       : C:\Agent\_work\264\s
2021-05-28T08:26:39.4284576Z 
2021-05-28T08:26:39.4308484Z *** Check BcContainerHelper
2021-05-28T08:26:40.0011947Z *** Load BcContainerHelper
2021-05-28T08:26:41.2399255Z BcContainerHelper version 2.0.6
2021-05-28T08:26:44.2713222Z 
2021-05-28T08:26:44.2719694Z 
2021-05-28T08:26:44.2802037Z ##[command]"Get-BCArtifactUrl" 
2021-05-28T08:26:44.2802661Z Name                           Value                                                                                   
2021-05-28T08:26:44.2803417Z ----                           -----                                                                                   
2021-05-28T08:26:44.2803883Z sasToken                      you know it
2021-05-28T08:26:44.2804344Z select                         NextMajor                                                                               
2021-05-28T08:26:44.2804806Z type                           Sandbox                                                                                 
2021-05-28T08:26:44.2805303Z country                        de                                                                                      
2021-05-28T08:26:44.2805524Z 
2021-05-28T08:26:44.2805598Z 
2021-05-28T08:26:44.2806111Z  -sasToken:you know it -select: NextMajor -type: Sandbox -country: de
2021-05-28T08:27:14.8095246Z Downloading application artifact /sandbox/19.0.26131.0/de
2021-05-28T08:27:14.8287722Z Downloading C:\Users\akquinet\AppData\Local\Temp\3b83f8f9-b6f1-4e9d-84b3-1a1872a1f958.zip
2021-05-28T08:27:30.0306468Z Unpacking application artifact to tmp folder using Expand-Archive
2021-05-28T08:27:38.7010111Z ##[error]Cannot find path 'C:\bcartifacts.cache\sandbox\19.0.26131.0\w0lozrtc.wio\Applications.DE\Any.Source.zip' because it does not exist.
2021-05-28T08:27:38.7617198Z ##[section]Finishing: ALOpsAppCompiler

Expected behavior That the archive gets unziped and our app get's compiled I guess

waldo1001 commented 3 years ago

Is that since today .. have you had any successful builds?

dNsl9r commented 3 years ago

Since yesterday evening. Last run on tuesday ran without a problem.

dNsl9r commented 3 years ago

Since now the same error happening for other versions, too - e.g.: /sandbox/17.5.22499.26192/de

waldo1001 commented 3 years ago

I'm looking into it... I haven't had this error myself :( - but I'm running a default pipeline now.

waldo1001 commented 3 years ago

Hm, I can't repro it .. also all our pipelines are running smooth. image So ... I need a repro. Would you be able to set up a sample project that fails on your end?

Also .. can you try to "clean" your agent, or try on a different agent?

dNsl9r commented 3 years ago

Cleaned the agent, deleted all old artifacts, images and everything - now it's working. Perfect!

NAVFreak commented 2 years ago

We got the same issue ##[error]Cannot find path 'C:\bcartifacts.cache\sandbox\20.0.37253.40082\vd444zno.rts\Applications.SE\Any.Source.zip' because it does not exist. What do mean exactly with "cleaning" the agent. Which steps should I follow to do the cleaning?

dNsl9r commented 2 years ago

@NAVFreak a step like

- task: ALOpsAgentMaintenance@1
  displayName: 'ALOps Agent Maintenance'
  inputs:
    removeoldtasks: true
    removeunusedcontainers: true
    removebcartifacts: true
    daysunused: 7