Function App deploy warns "Invalid version" for runtime and then times out¶
One-sentence summary: the Invalid version warning during az functionapp zip deploy is unrelated to the deploy failure — a 504 gateway timeout on the zip deploy step is the real cause, and a pipeline re-run is the fix.
🚨 Symptom¶
A Function App deployment pipeline (for example policyportal-sub deploying to production) fails with:
WARNING: Invalid version: 10.0 for runtime dotnet-isolated and os linux. Supported versions for runtime dotnet-isolated and os linux are: ['10', '9', '8', '7', '6']. Run 'az functionapp list-runtimes' for more details on supported runtimes.
WARNING: Getting scm site credentials for zip deployment
WARNING: Starting zip deployment. This operation can take a while to complete ...
WARNING: Deployment endpoint responded with status code 504
ERROR: An error occured during deployment. Status Code: 504, Details: 504.0 GatewayTimeout
❌ Zip deployment to Function App production (no slot) failed with exit code: 1
Appears in Azure DevOps pipeline logs during the "Zip deployment" step of a Function App release.
📌 Applies to¶
| Aspect | Value |
|---|---|
| Component | Azure DevOps pipelines, Azure Function App deployment (az functionapp / AzureFunctionApp@1) |
| Forge versions | Any pipeline deploying a dotnet-isolated Function App on Linux |
| Related versions | Seen with a 10.0 runtime version configured; the warning also appears with other decimal versions |
🧠 Cause¶
Two separate things happen in the same log and are easy to conflate:
- The
Invalid versionline is a cosmetic warning. The Azure CLI expects a whole-number runtime version (10,9,8,7,6) and rejects the decimal form (10.0) used in configuration, but this does not fail the deployment by itself. Changing the configured version to a non-decimal value to silence the warning has caused the zip deploy to report success while the Function App silently fails to start — reverting to the decimal version restored a working deploy. Do not "fix" the version to make the warning go away. - The actual failure is a 504 Gateway Timeout on the zip deployment endpoint, which is typically a transient timeout, not a configuration problem. Re-running the pipeline has resolved it without any other change.
✅ Fix¶
-
Re-run (retry) the failed pipeline stage/build. No configuration change is needed.
-
If retries fail repeatedly (not just an occasional timeout), escalate — automatic pipeline retries for this case have been considered but not yet implemented, as manual retries are infrequent.
Do not change the configured runtime version from its decimal form (e.g. 10.0) to a non-decimal value (e.g. 10) solely to suppress the Invalid version warning — this has been tried and caused the Function App to fail to start after an apparently successful zip deploy.
🔬 Verify¶
The pipeline's zip deployment step completes without a 504, and the Function App production slot is reachable and serving requests after the run.