Skip to content

[AppService] Fail fast for az functionapp deploy outside AzureCloud with actionable guidance#33364

Draft
Copilot wants to merge 2 commits into
devfrom
copilot/fix-az-functionapp-deployment-error
Draft

[AppService] Fail fast for az functionapp deploy outside AzureCloud with actionable guidance#33364
Copilot wants to merge 2 commits into
devfrom
copilot/fix-az-functionapp-deployment-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

Related command
az functionapp deploy

Description
az functionapp deploy currently reaches OneDeploy and can fail with a generic backend message (This API isn't available in this environment yet!) for non-public clouds. This change moves that failure to CLI validation with a deterministic, actionable error.

  • Scope: functionapp deploy only
    • Added validate_onedeploy_functionapp_params(cmd, namespace) to keep existing OneDeploy argument validation and add cloud gating for Function App deploy.
  • Behavior change
    • If cloud is not AzureCloud, CLI now stops before OneDeploy call and returns guidance to use az functionapp deployment source config-zip.
  • Command wiring
    • Updated functionapp deploy command registration to use the new functionapp-specific validator; webapp deploy path is unchanged.
  • Coverage
    • Added validator unit tests for:
      • allow in AzureCloud
      • reject in non-public cloud with expected guidance text
def validate_onedeploy_functionapp_params(cmd, namespace):
    validate_onedeploy_params(namespace)
    if cmd.cli_ctx.cloud.name != AZURE_PUBLIC_CLOUD.name:
        raise ValidationError(
            "The 'az functionapp deploy' command is currently available only in AzureCloud. "
            "Use 'az functionapp deployment source config-zip' in this cloud."
        )

Testing Guide

  • Public cloud behavior:
    • az functionapp deploy -g <rg> -n <app> --src-path <artifact> --type jar
  • Non-public cloud behavior:
    • Same command should fail at validation with cloud-specific guidance and no OneDeploy backend call.

History Notes
[AppService] az functionapp deploy: Add cloud-aware pre-validation and actionable guidance for non-AzureCloud environments


This checklist is used to make sure that common guidelines for a pull request are followed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • azcliprod.blob.core.windows.net
    • Triggering command: /usr/bin/python python -m unittest azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands_thru_mock (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 12, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 12, 2026

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

Copilot AI changed the title [WIP] Fix az functionapp deploy error for Java FunctionApp [AppService] Fail fast for az functionapp deploy outside AzureCloud with actionable guidance May 12, 2026
Copilot finished work on behalf of a0x1ab May 12, 2026 06:14
Copilot AI requested a review from a0x1ab May 12, 2026 06:14
@yonzhan yonzhan assigned yanzhudd and unassigned zhoxing-ms May 12, 2026
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 12, 2026

AppService

@bblommers
Copy link
Copy Markdown

bblommers commented May 12, 2026

Please note that this does not fix the attached issue!

can fail with a generic backend message (This API isn't available in this environment yet!) for non-public clouds

The attached issue is about the API failing in the Public Cloud.

Edit: Also, custom clouds exist, and they could implement this functionality. So the current scope (fail fast for any and all non-public clouds) seems ill-adviced.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az functionapp deploy gives error: This API isn't available in this environment yet!

6 participants