Azure / Azure/azure-cli

functionapp deployment github-actions add: "Unable to retrieve workflow template."

Open
#29,253 3 comments 0 reactions 4 assignees Claimed by @kamperiadis View on GitHub
act-observability-squad Auto-Assign bug customer-reported Functions Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

When executing the github-actions add command for a FunctionApp that runs on linux in dotnet-isolated (8.0) mode, I get the following output:

> az functionapp deployment github-actions add --repo my/repo -g $group -n $name --token $pat
Verified GitHub repo and branch
Getting workflow template using runtime: dotnet-isolated
Unable to retrieve workflow template.

When inspecting the code, it looks like the constants table to look up the workflow template doesn't contain an entry for "dotnet-isolated":

https://github.com/Azure/azure-cli/blob/a83263c3dea477cd343d5cb3f4d5ebd3eaeb1de3/src/azure-cli/azure/cli/command_modules/appservice/_constants.py#L87-L93

This seems to be the case for the windows one as well:

https://github.com/Azure/azure-cli/blob/a83263c3dea477cd343d5cb3f4d5ebd3eaeb1de3/src/azure-cli/azure/cli/command_modules/appservice/_constants.py#L95-L100

### Related command

az functionapp deployment github-actions add --repo my/repo -g $group -n $name --token $pat

### Errors

Unable to retrieve workflow template.

### Issue script & Debug output

...
cli.azure.cli.command_modules.appservice.custom: Getting workflow template using runtime: dotnet-isolated
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 664, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 701, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 334, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 7596, in add_functionapp_github_actions
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 7867, in _get_functionapp_workflow_template
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 7986, in _get_functionapp_template_file_path
azure.cli.core.azclierror.ResourceNotFoundError: Unable to retrieve workflow template.

cli.azure.cli.core.azclierror: Unable to retrieve workflow template.
az_command_data_logger: Unable to retrieve workflow template.
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 3
cli.__main__: Command ran in 12.687 seconds (init: 0.295, invoke: 12.393)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3835 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc C:\Users\fretje\.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

### Expected behavior

The command should succeed without an error.

### Environment Summary

azure-cli 2.61.0

core 2.61.0
telemetry 1.1.0

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\fretje\.azure\cliextensions'

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.