HodorNV / ALOps

ALOps
56 stars 24 forks source link

The AzureKeyVault@1 task is deprecated, please use the latest version of the AzureKeyVault task #784

Closed PeterConijn closed 3 weeks ago

PeterConijn commented 1 month ago

Describe the bug Since just a few minutes ago, our pipelines started showing the following warning on the "Initialize Job" step:

Task 'Azure Key Vault' version 1 (AzureKeyVault@1) is deprecated
The AzureKeyVault@1 task is deprecated, please use the latest version of the AzureKeyVault task

This was not the case this morning, so it is probably due to an update of Azure DevOps itself that deprecated that task version. Since there is no explicit step in the yml that lists that task, I am assuming that it is called somewhere from the ALOps libraries.

the used yaml This is one of our pipelines (I took a short one), but they're all getting it now.

name: $(Build.BuildId)
trigger:
  branches:
    include:
    - Dummy
variables:
- group: 'PipelineVariables'
resources:
  repositories:
  - repository: BuildTemplates
    name: [REDACTED]
    type: Git
    ref: main
  - repository: [REDACTED]
    name: [REDACTED]
    type: Git
    ref: Release
stages:
- stage: __default
  jobs:
  - job: 'Build'
    pool:
      name: DyselBC_A
    workspace:
      clean: resources
    displayName: 'Create Build'
    timeoutInMinutes: 120
    steps:
    - task: PowerShell@2
      displayName: "Remove all .app files from $(Agent.BuildDirectory) and sub folders"
      inputs:
        targetType: 'inline'
        script: Get-ChildItem -Path "$(Agent.BuildDirectory)" -Filter "*.app" -Recurse | Remove-Item -Force:$true -Confirm:$false -ErrorAction SilentlyContinue
        errorActionPreference: 'continue'
    - task: ALOpsDockerCreate@1
      displayName: 'ALOPS - Create Docker Image'
      inputs:
        artifactversion: 24.3
        artifacttype: Sandbox
        artifactcountry: us
        versionselect: ''
        accept_insider_eula: true
    - 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 - Dev License Import'
      inputs:
        usedocker: true
        license_path: $(BCDevLicense)
    - task: ALOpsAppPublish@1
      displayName: 'ALOPS - Install AL TestTool'
      condition: False
      inputs:
        usedocker: true
        installaltesttool: true
        skip_verification: true
        install_al_app_names: "Tests-TestLibraries\nSystem Application Test\nSystem Application Test Library\nAny\nLibrary Assert\nTest Runner\nPermissions Mock\nLibrary Variable Storage  "
    - task: DownloadPipelineArtifact@2
      displayName: Download Artifact - Dysel System App
      inputs:
        buildType: 'specific'
        project: [REDACTED]
        definition: [REDACTED]
        buildVersionToDownload: 'latest'
        itemPattern: '**/*_APP.app'
        targetPath: '$(Pipeline.Workspace)'
    - task: DownloadPipelineArtifact@2
      displayName: Download Artifact - Dysel W1
      inputs:
        buildType: 'specific'
        project: [REDACTED]
        definition: [REDACTED]
        buildVersionToDownload: 'latest'
        itemPattern: '**/*_APP.app'
        targetPath: '$(Pipeline.Workspace)'
    - task: ALOpsAppPublish@1
      displayName: 'Publish: Dysel Apps'
      inputs:
        usedocker: true
        batch_publish_folder: '$(Pipeline.Workspace)'
        nav_artifact_app_filter: '*.app'
        skip_verification: true
      continueOnError: true
    - task: ALOpsAppCompiler@1
      displayName: 'ALOPS - Compile: Dysel BillTrust App'
      inputs:
        usedocker: true
        nav_app_version: 24.3.[yyyy]08.*
        targetproject: App/app.json
        ruleset: [REDACTED]
        al_analyzer: ''
        internalsvisibleto: Remove
        failed_on_warnings: false
        app_file_suffix: '_APP'
    - task: ALOpsAppPublish@1
      displayName: 'ALOPS - Publish: Dysel BillTrust App'
      inputs:
        usedocker: true
        nav_artifact_app_filter: '*_APP.app'
        skip_verification: true
    - task: ALOpsAppRuntimePackage@1
      displayName: 'ALOPS - Create Runtime Package'
      inputs:
        usedocker: true
        targetproject: 'app/app.json'
        showmycode: true
        publish_artifact: true
    - task: ALOpsDockerRemove@1
      displayName: 'ALOPS - Remove Docker Container'
      enabled: true
      condition: always()
      inputs:
        createsqlbackup: 'disabled'

the output I am only attaching the first log (1_Initialize job.txt), since that is where the warning occurs. The warning itself has no detrimental effect on the pipeline or its successful result.

2024-08-15T08:21:42.5680535Z ##[section]Starting: Initialize job
2024-08-15T08:21:42.5685354Z Agent name: 'agent4'
2024-08-15T08:21:42.5685957Z Agent machine name: 'DYSELBUILDAGENT'
2024-08-15T08:21:42.5686211Z Current agent version: '3.234.0'
2024-08-15T08:21:42.5718423Z Agent running as: 'DYSELBUILDAGENT$'
2024-08-15T08:21:42.5783875Z Prepare build directory.
2024-08-15T08:21:42.9414605Z Set build variables.
2024-08-15T08:21:42.9476592Z Download all required tasks.
2024-08-15T08:21:42.9769708Z Downloading task: AzureKeyVault (1.244.1)
2024-08-15T08:21:50.4942204Z ##[warning]Task 'Azure Key Vault' version 1 (AzureKeyVault@1) is deprecated.
2024-08-15T08:21:50.4964426Z ##[warning]The AzureKeyVault@1 task is deprecated, please use the latest version of the AzureKeyVault task
2024-08-15T08:21:50.6767817Z Checking job knob settings.
2024-08-15T08:21:50.6786422Z    Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 
2024-08-15T08:21:50.6790671Z    Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 
2024-08-15T08:21:50.6793656Z    Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 
2024-08-15T08:21:50.6794524Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC) 
2024-08-15T08:21:50.6795259Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG) 
2024-08-15T08:21:50.6795824Z    Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT) 
2024-08-15T08:21:50.6796404Z    Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC) 
2024-08-15T08:21:50.6797673Z    Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB) 
2024-08-15T08:21:50.6798251Z    Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES) 
2024-08-15T08:21:50.6799035Z    Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION) 
2024-08-15T08:21:50.6799678Z    Knob: MountWorkspace = true Source: $(AZP_AGENT_MOUNT_WORKSPACE) 
2024-08-15T08:21:50.6800172Z Finished checking job knob settings.
2024-08-15T08:21:50.7791617Z Start tracking orphan processes.
2024-08-15T08:21:50.7952104Z ##[section]Finishing: Initialize job

Expected behavior I am assuming that the download is a step that occurs in the inner mysteries of ALOps for DevOps and that it is using a now obsoleted procedure. I would expect that the latest AzureKeyVault version (presumably AzureKeyVault@2) be used so that this warning no longer shows.

Screenshots image

Version: image

Additional context This started happening around 10.30 this morning (CET) on 15-08-2024)

epernst commented 4 weeks ago

Not due to ALOps, but a "bug" in ADO: https://github.com/microsoft/azure-pipelines-tasks/issues/20302

waldo1001 commented 3 weeks ago

Thanks, Erik. It seems indeed a ADO issue. Hopefully solved fast! I'll close this issue here, just because there's nothing we can do!