Skip to content

Azure CLI bicep extenstion not present in ubuntu-24.04 #11987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 15 tasks
jakub-i opened this issue Apr 10, 2025 · 8 comments
Open
2 of 15 tasks

Azure CLI bicep extenstion not present in ubuntu-24.04 #11987

jakub-i opened this issue Apr 10, 2025 · 8 comments

Comments

@jakub-i
Copy link

jakub-i commented Apr 10, 2025

Description

In our organization we are using ubuntu-latest and as of this week this is ubuntu-24-04

We debloy bicep templates to Azure Cloud using Azure CLI. In ubuntu-22.04 had bicep extension installed on the image and there was no need to build an ARM-template to use that.

We use:

az deployment group create --resource-group '$(resourceGroup)' --name '$(Build.BuildNumber)' --no-prompt --template-file 'main.bicep' --parameters '$(paramFilePath)'

Which has worked fine, but with ubuntu-24.04 we get following error:

Image

I am unaware if this is intentional but it was functionality available before

Thanks in advance

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Image

Image

Is it regression?

Yes, this worked in earlier versions

Expected behavior

Expected behavior is that using bicep templates to deploy infrastructure to Azure Cloud using Azure CLI works as intended, meaning that bicep extension handles the trasplaining of bicep to ARM json format.

Actual behavior

Error as depicted in the screenshot in the description

Repro steps

  1. Start a pipeline run for a pipeline using Azure CLI to deploy bicep template to Azure Cloud
@jakub-i
Copy link
Author

jakub-i commented Apr 10, 2025

This is the latest version of ubuntu-latest that worked:

2025-04-07T11:56:41.7482810Z ##[section]Starting: Initialize job
2025-04-07T11:56:41.7486081Z Agent name: 'Hosted Agent'
2025-04-07T11:56:41.7486489Z Agent machine name: 'fv-az359-536'
2025-04-07T11:56:41.7486693Z Current agent version: '3.251.0'
2025-04-07T11:56:41.7529183Z ##[group]Operating System
2025-04-07T11:56:41.7529414Z Ubuntu
2025-04-07T11:56:41.7529532Z 22.04.5
2025-04-07T11:56:41.7529915Z LTS
2025-04-07T11:56:41.7530044Z ##[endgroup]
2025-04-07T11:56:41.7530197Z ##[group]Runner Image
2025-04-07T11:56:41.7530368Z Image: ubuntu-22.04
2025-04-07T11:56:41.7530510Z Version: 20250330.1.0
2025-04-07T11:56:41.7530970Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20250330.1/images/ubuntu/Ubuntu2204-Readme.md
2025-04-07T11:56:41.7531507Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20250330.1
2025-04-07T11:56:41.7531732Z ##[endgroup]
2025-04-07T11:56:41.7531905Z ##[group]Runner Image Provisioner
2025-04-07T11:56:41.7532257Z 2.0.422.1
2025-04-07T11:56:41.7532402Z ##[endgroup]
2025-04-07T11:56:41.7538138Z Current image version: '20250330.1.0'
2025-04-07T11:56:41.8988817Z Agent running as: 'vsts'
2025-04-07T11:56:41.9047227Z Prepare build directory.
2025-04-07T11:56:41.9405629Z Set build variables.
2025-04-07T11:56:41.9449341Z Download all required tasks.
2025-04-07T11:56:41.9673291Z Downloading task: AzureCLI (2.251.1)
2025-04-07T11:56:42.6319156Z Checking job knob settings.
2025-04-07T11:56:42.6323360Z    Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 
2025-04-07T11:56:42.6323811Z    Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
2025-04-07T11:56:42.6325509Z    Knob: UseGitLongPaths = true Source: $(USE_GIT_LONG_PATHS) 
2025-04-07T11:56:42.6326864Z    Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
2025-04-07T11:56:42.6328232Z    Knob: EnableIssueSourceValidation = true Source: $(ENABLE_ISSUE_SOURCE_VALIDATION) 
2025-04-07T11:56:42.6329037Z    Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 
2025-04-07T11:56:42.6332432Z    Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 
2025-04-07T11:56:42.6333197Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC) 
2025-04-07T11:56:42.6333730Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG) 
2025-04-07T11:56:42.6334240Z    Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT) 
2025-04-07T11:56:42.6334808Z    Knob: UseNewNodeHandlerTelemetry = True Source: $(DistributedTask.Agent.USENEWNODEHANDLERTELEMETRY) 
2025-04-07T11:56:42.6335618Z    Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC) 
2025-04-07T11:56:42.6336416Z    Knob: EnableResourceMonitorDebugOutput = true Source: $(AZP_ENABLE_RESOURCE_MONITOR_DEBUG_OUTPUT) 
2025-04-07T11:56:42.6337007Z    Knob: EnableResourceUtilizationWarnings = true Source: $(AZP_ENABLE_RESOURCE_UTILIZATION_WARNINGS) 
2025-04-07T11:56:42.6337834Z    Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB) 
2025-04-07T11:56:42.6338336Z    Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES) 
2025-04-07T11:56:42.6338999Z    Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION) 
2025-04-07T11:56:42.6339872Z    Knob: CheckIfTaskNodeRunnerIsDeprecated246 = False Source: $(DistributedTask.Agent.CheckIfTaskNodeRunnerIsDeprecated246) 
2025-04-07T11:56:42.6340636Z    Knob: UseNode20ToStartContainer = True Source: $(DistributedTask.Agent.UseNode20ToStartContainer) 
2025-04-07T11:56:42.6341316Z    Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT) 
2025-04-07T11:56:42.6341883Z    Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK) 
2025-04-07T11:56:42.6342548Z    Knob: Rosetta2Warning = true Source: $(ROSETTA2_WARNING) 
2025-04-07T11:56:42.6344285Z    Knob: AddForceCredentialsToGitCheckout = True Source: $(DistributedTask.Agent.AddForceCredentialsToGitCheckout) 
2025-04-07T11:56:42.6345298Z Finished checking job knob settings.
2025-04-07T11:56:42.6704978Z Start tracking orphan processes.
2025-04-07T11:56:42.6934817Z ##[section]Finishing: Initialize job


We tried to downgrade to 22.04 and get the same error as documented above, so we experience that 22.04 and 24.04 latest versions have the same issue

@jakub-i
Copy link
Author

jakub-i commented Apr 10, 2025

This is the version info of the failing ubuntu-24.04:

2025-04-10T07:34:40.2459661Z ##[section]Starting: Initialize job
2025-04-10T07:34:40.2461836Z Agent name: 'Azure Pipelines 3'
2025-04-10T07:34:40.2462258Z Agent machine name: 'fv-az963-716'
2025-04-10T07:34:40.2462503Z Current agent version: '3.251.0'
2025-04-10T07:34:40.2496378Z ##[group]Operating System
2025-04-10T07:34:40.2496688Z Ubuntu
2025-04-10T07:34:40.2496800Z 24.04.2
2025-04-10T07:34:40.2496964Z LTS
2025-04-10T07:34:40.2497136Z ##[endgroup]
2025-04-10T07:34:40.2497274Z ##[group]Runner Image
2025-04-10T07:34:40.2497479Z Image: ubuntu-24.04
2025-04-10T07:34:40.2497621Z Version: 20250406.1.0
2025-04-10T07:34:40.2498075Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250406.1/images/ubuntu/Ubuntu2404-Readme.md
2025-04-10T07:34:40.2498467Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250406.1
2025-04-10T07:34:40.2498674Z ##[endgroup]
2025-04-10T07:34:40.2498885Z ##[group]Runner Image Provisioner
2025-04-10T07:34:40.2499245Z 2.0.422.1
2025-04-10T07:34:40.2499417Z ##[endgroup]
2025-04-10T07:34:40.2504065Z Current image version: '20250406.1.0'
2025-04-10T07:34:40.3711598Z Agent running as: 'vsts'
2025-04-10T07:34:40.3753879Z Prepare build directory.
2025-04-10T07:34:40.4046981Z Set build variables.
2025-04-10T07:34:40.4083844Z Download all required tasks.
2025-04-10T07:34:40.4258588Z Downloading task: AzureCLI (2.251.1)
2025-04-10T07:34:41.0535527Z Checking job knob settings.
2025-04-10T07:34:41.0538269Z    Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 
2025-04-10T07:34:41.0538614Z    Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
2025-04-10T07:34:41.0539818Z    Knob: UseGitLongPaths = true Source: $(USE_GIT_LONG_PATHS) 
2025-04-10T07:34:41.0540605Z    Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
2025-04-10T07:34:41.0541778Z    Knob: EnableIssueSourceValidation = true Source: $(ENABLE_ISSUE_SOURCE_VALIDATION) 
2025-04-10T07:34:41.0542507Z    Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 
2025-04-10T07:34:41.0544690Z    Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 
2025-04-10T07:34:41.0545360Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC) 
2025-04-10T07:34:41.0546019Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG) 
2025-04-10T07:34:41.0546480Z    Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT) 
2025-04-10T07:34:41.0546968Z    Knob: UseNewNodeHandlerTelemetry = True Source: $(DistributedTask.Agent.USENEWNODEHANDLERTELEMETRY) 
2025-04-10T07:34:41.0547443Z    Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC) 
2025-04-10T07:34:41.0548134Z    Knob: EnableResourceMonitorDebugOutput = true Source: $(AZP_ENABLE_RESOURCE_MONITOR_DEBUG_OUTPUT) 
2025-04-10T07:34:41.0548641Z    Knob: EnableResourceUtilizationWarnings = true Source: $(AZP_ENABLE_RESOURCE_UTILIZATION_WARNINGS) 
2025-04-10T07:34:41.0549316Z    Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB) 
2025-04-10T07:34:41.0549733Z    Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES) 
2025-04-10T07:34:41.0550297Z    Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION) 
2025-04-10T07:34:41.0550934Z    Knob: CheckIfTaskNodeRunnerIsDeprecated246 = False Source: $(DistributedTask.Agent.CheckIfTaskNodeRunnerIsDeprecated246) 
2025-04-10T07:34:41.0551576Z    Knob: UseNode20ToStartContainer = True Source: $(DistributedTask.Agent.UseNode20ToStartContainer) 
2025-04-10T07:34:41.0552157Z    Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT) 
2025-04-10T07:34:41.0552633Z    Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK) 
2025-04-10T07:34:41.0553178Z    Knob: Rosetta2Warning = true Source: $(ROSETTA2_WARNING) 
2025-04-10T07:34:41.0554612Z    Knob: AddForceCredentialsToGitCheckout = True Source: $(DistributedTask.Agent.AddForceCredentialsToGitCheckout) 
2025-04-10T07:34:41.0555272Z Finished checking job knob settings.
2025-04-10T07:34:41.0824325Z Start tracking orphan processes.
2025-04-10T07:34:41.1000920Z ##[section]Finishing: Initialize job

And this is the version info of the failing ubuntu-22.04:

2025-04-10T07:55:59.1404525Z ##[section]Starting: Initialize job
2025-04-10T07:55:59.1407665Z Agent name: 'Hosted Agent'
2025-04-10T07:55:59.1408096Z Agent machine name: 'fv-az1007-977'
2025-04-10T07:55:59.1408325Z Current agent version: '3.251.0'
2025-04-10T07:55:59.1449730Z ##[group]Operating System
2025-04-10T07:55:59.1449951Z Ubuntu
2025-04-10T07:55:59.1450097Z 22.04.5
2025-04-10T07:55:59.1450235Z LTS
2025-04-10T07:55:59.1450386Z ##[endgroup]
2025-04-10T07:55:59.1450534Z ##[group]Runner Image
2025-04-10T07:55:59.1450716Z Image: ubuntu-22.04
2025-04-10T07:55:59.1450891Z Version: 20250406.1.0
2025-04-10T07:55:59.1451182Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20250406.1/images/ubuntu/Ubuntu2204-Readme.md
2025-04-10T07:55:59.1451624Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20250406.1
2025-04-10T07:55:59.1451874Z ##[endgroup]
2025-04-10T07:55:59.1452032Z ##[group]Runner Image Provisioner
2025-04-10T07:55:59.1452399Z 2.0.422.1
2025-04-10T07:55:59.1452531Z ##[endgroup]
2025-04-10T07:55:59.1458869Z Current image version: '20250406.1.0'
2025-04-10T07:55:59.2984581Z Agent running as: 'vsts'
2025-04-10T07:55:59.3043087Z Prepare build directory.
2025-04-10T07:55:59.3457646Z Set build variables.
2025-04-10T07:55:59.3510390Z Download all required tasks.
2025-04-10T07:55:59.3779996Z Downloading task: DownloadPipelineArtifact (1.230.0)
2025-04-10T07:55:59.5251114Z Downloading task: AzureCLI (2.251.1)
2025-04-10T07:56:00.1141353Z Checking job knob settings.
2025-04-10T07:56:00.1146804Z    Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 
2025-04-10T07:56:00.1147294Z    Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
2025-04-10T07:56:00.1152572Z    Knob: UseGitLongPaths = true Source: $(USE_GIT_LONG_PATHS) 
2025-04-10T07:56:00.1155998Z    Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
2025-04-10T07:56:00.1158373Z    Knob: EnableIssueSourceValidation = true Source: $(ENABLE_ISSUE_SOURCE_VALIDATION) 
2025-04-10T07:56:00.1159428Z    Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 
2025-04-10T07:56:00.1164298Z    Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 
2025-04-10T07:56:00.1165474Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC) 
2025-04-10T07:56:00.1166141Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG) 
2025-04-10T07:56:00.1167616Z    Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT) 
2025-04-10T07:56:00.1168423Z    Knob: UseNewNodeHandlerTelemetry = True Source: $(DistributedTask.Agent.USENEWNODEHANDLERTELEMETRY) 
2025-04-10T07:56:00.1169094Z    Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC) 
2025-04-10T07:56:00.1171198Z    Knob: EnableResourceMonitorDebugOutput = true Source: $(AZP_ENABLE_RESOURCE_MONITOR_DEBUG_OUTPUT) 
2025-04-10T07:56:00.1171973Z    Knob: EnableResourceUtilizationWarnings = true Source: $(AZP_ENABLE_RESOURCE_UTILIZATION_WARNINGS) 
2025-04-10T07:56:00.1175884Z    Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB) 
2025-04-10T07:56:00.1178559Z    Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES) 
2025-04-10T07:56:00.1182645Z    Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION) 
2025-04-10T07:56:00.1183833Z    Knob: CheckIfTaskNodeRunnerIsDeprecated246 = False Source: $(DistributedTask.Agent.CheckIfTaskNodeRunnerIsDeprecated246) 
2025-04-10T07:56:00.1184717Z    Knob: UseNode20ToStartContainer = True Source: $(DistributedTask.Agent.UseNode20ToStartContainer) 
2025-04-10T07:56:00.1185540Z    Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT) 
2025-04-10T07:56:00.1186187Z    Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK) 
2025-04-10T07:56:00.1187471Z    Knob: Rosetta2Warning = true Source: $(ROSETTA2_WARNING) 
2025-04-10T07:56:00.1189102Z    Knob: AddForceCredentialsToGitCheckout = True Source: $(DistributedTask.Agent.AddForceCredentialsToGitCheckout) 
2025-04-10T07:56:00.1189962Z Finished checking job knob settings.
2025-04-10T07:56:00.1674211Z Start tracking orphan processes.
2025-04-10T07:56:00.1965492Z ##[section]Finishing: Initialize job

@jakub-i jakub-i changed the title Azure CLI bicep extenstion not present in ubuntu-24-04 Azure CLI bicep extenstion not present in ubuntu-24.04 Apr 10, 2025
@BBTristanBenschop
Copy link

Literally copy of mine:
#11978

Which was changed to not planned, Which makes no sense, since now people will create duplicate issues of this issue that I already reported and has to be fixed. The fix is updating the az cli library in the image runner with a newer version.

@subir0071 I wonder what your opinion is on this. Since it is work that has to be done after the az cli library is fixed. For now its important that the temp fix is visible (by not changing this to not planned)

@BBTristanBenschop
Copy link

I'll repeat the az cli issue which needs to be resolved and then their can be an updated az cli in the image runner.
Azure/azure-cli#31189

the temp fix:
az config set bicep.use_binary_from_path=false

@vidyasagarnimmagaddi
Copy link
Contributor

Hi @jakub-i ,Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating.


@alles60
Copy link

alles60 commented Apr 10, 2025

We've had apparently the same issue today with the runner image ubuntu-latest trying to run this command:

az deployment group create \
--name "deploy" \
--resource-group groupToDeployTo \
--parameters ./parameters.bicepparam

The job failed with this error message:

ERROR: [Errno 2] No such file or directory: '/home/runner/.azure/bin/bicep'

Running the command proposed by @BBTristanBenschop in a previous step fixed it for now. We'll see if a fix is pushed and we'll remove the workaround step once it is.

@johnpetersjr
Copy link

I also have this issue, started today it seems. The workaround is fixing it, but obviously would prefer the base image to work as it used to without having to add more config shell commands.

command that used to work, and now is broken on ubuntu-latest

az deployment group create --resource-group resource_group_name_goes_here --template-file ./bicep_files/some_bicep_file_here.bicep --parameters some_param_file_here.bicepparam

workaround command that allows it to continue to work if run beforehand:

az config set bicep.use_binary_from_path=false

@subir0071
Copy link
Contributor

You are correct @BBTristanBenschop .
keeping this open as of now.
Will see after the issue gets fixed at az-cli side,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants