Skip to content

Commit 0bceb62

Browse files
authored
Add error message when deploying to flex apps with python 3.14 (#4861)
1 parent 0fad838 commit 0bceb62

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/commands/deploy/deploy.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string |
144144

145145
const isFlexConsumption: boolean = await client.getIsConsumptionV2(actionContext);
146146
actionContext.telemetry.properties.isFlexConsumption = String(isFlexConsumption);
147+
148+
if (language === ProjectLanguage.Python && isFlexConsumption) {
149+
const runtimeVersion = site.rawSite.functionAppConfig?.runtime?.version;
150+
if (runtimeVersion === '3.14') {
151+
const errorMessage = localize('python314FlexError', 'Remote build for Python 3.14 is not supported for flex. Please refer to https://aka.ms/py314-remote-build-flex.');
152+
ext.outputChannel.appendLog(errorMessage);
153+
throw new Error(errorMessage);
154+
}
155+
}
156+
147157
// don't use remote build setting for consumption v2
148158
const doRemoteBuild: boolean | undefined = getWorkspaceSetting<boolean>(remoteBuildSetting, deployPaths.effectiveDeployFsPath) && !isFlexConsumption;
149159
actionContext.telemetry.properties.scmDoBuildDuringDeployment = String(doRemoteBuild);

0 commit comments

Comments
 (0)