From e7d92582c780fb78d6b141b21f28c5bfc8bbf593 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 15 Sep 2025 15:30:43 -0500 Subject: [PATCH 01/10] support python 3.14 --- ...oft.Azure.Functions.V4.PythonWorker.nuspec | 5 +++ eng/pack/scripts/rc_mac_arm64_deps.sh | 32 +++++++++++++++ eng/pack/scripts/rc_win_deps.ps1 | 39 +++++++++++++++++++ eng/pack/templates/macos_64_env_gen.yml | 10 ++++- eng/pack/templates/nix_env_gen.yml | 1 + eng/pack/templates/win_env_gen.yml | 9 +++++ .../official/jobs/build-artifacts.yml | 10 +++++ workers/python/prodV4/worker.config.json | 2 +- 8 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 eng/pack/scripts/rc_mac_arm64_deps.sh create mode 100644 eng/pack/scripts/rc_win_deps.ps1 diff --git a/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec b/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec index de2689704..361995fb4 100644 --- a/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec +++ b/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec @@ -48,6 +48,11 @@ + + + + + diff --git a/eng/pack/scripts/rc_mac_arm64_deps.sh b/eng/pack/scripts/rc_mac_arm64_deps.sh new file mode 100644 index 000000000..7a06a5ccb --- /dev/null +++ b/eng/pack/scripts/rc_mac_arm64_deps.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +python -m venv .env +source .env/bin/activate +python -m pip install --upgrade pip + +cd workers + +# Build and install grpcio from source +git clone --recursive https://github.com/grpc/grpc +cd grpc +python tools/distrib/python/make_grpcio_tools.py +python tools/distrib/python/make_grpcio_wheel.py +pip install artifacts/grpcio-*.whl + + +python -m pip install . +python -m pip install . --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" + +python -m pip install invoke +cd tests +python -m invoke -c test_setup build-protos + +cd .. +cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps" + +version_minor=$(echo $1 | cut -d '.' -f 2) +if [[ $version_minor -lt 13 ]]; then + cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker" +else + cp -r proxy_worker/protos "$BUILD_SOURCESDIRECTORY/deps/proxy_worker" +fi \ No newline at end of file diff --git a/eng/pack/scripts/rc_win_deps.ps1 b/eng/pack/scripts/rc_win_deps.ps1 new file mode 100644 index 000000000..6f717cb3f --- /dev/null +++ b/eng/pack/scripts/rc_win_deps.ps1 @@ -0,0 +1,39 @@ +param ( + [string]$pythonVersion +) +$versionParts = $pythonVersion -split '\.' # Splitting by dot +$versionMinor = [int]$versionParts[1] + +python -m venv .env +.env\Scripts\Activate.ps1 +python -m pip install --upgrade pip + +cd workers + +# Build and install grpcio from source +git clone --recursive https://github.com/grpc/grpc +cd grpc +python tools\distrib\python\make_grpcio_tools.py +python tools\distrib\python\make_grpcio_wheel.py +pip install artifacts/grpcio-*.whl + +python -m pip install . + +$depsPath = Join-Path -Path $env:BUILD_SOURCESDIRECTORY -ChildPath "deps" + +python -m pip install . azure-functions --no-compile --target $depsPath.ToString() + +python -m pip install invoke +cd tests +python -m invoke -c test_setup build-protos + +cd .. +Copy-Item -Path ".artifactignore" -Destination $depsPath.ToString() + +if ($versionMinor -lt 13) { + $protosPath = Join-Path -Path $depsPath -ChildPath "azure_functions_worker/protos" + Copy-Item -Path "azure_functions_worker/protos/*" -Destination $protosPath.ToString() -Recurse -Force +} else { + $protosPath = Join-Path -Path $depsPath -ChildPath "proxy_worker/protos" + Copy-Item -Path "proxy_worker/protos/*" -Destination $protosPath.ToString() -Recurse -Force +} diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index 2ea91858f..a6e051f94 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -7,6 +7,7 @@ steps: - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} + allowUnstable: true addToPath: true - powershell: | # Parse the Python minor version @@ -45,7 +46,14 @@ steps: disableAutoCwd: true scriptPath: 'eng/pack/scripts/mac_arm64_deps.sh' args: '${{ parameters.pythonVersion }}' - displayName: 'Install Dependencies' + displayName: 'Build and install dependencies' + condition: ne(variables['minorVersion'], '14') +- task: PowerShell@2 + inputs: + filePath: 'eng/pack/scripts/rc_mac_arm64_deps.sh' + arguments: '${{ parameters.pythonVersion }}' + displayName: 'Build and install dependencies from scratch' + condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit cd workers diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index c29188c56..7dbfcf668 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -7,6 +7,7 @@ steps: - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} + allowUnstable: true addToPath: true - powershell: | # Parse the Python minor version diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index 833f3e9ef..e587190b8 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -7,6 +7,7 @@ steps: - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} + allowUnstable: true architecture: ${{ parameters.architecture }} addToPath: true - powershell: | @@ -45,6 +46,14 @@ steps: inputs: filePath: 'eng\pack\scripts\win_deps.ps1' arguments: '${{ parameters.pythonVersion }}' + displayName: 'Build and install dependencies' + condition: ne(variables['minorVersion'], '14') +- task: PowerShell@2 + inputs: + filePath: 'eng\pack\scripts\rc_win_deps.ps1' + arguments: '${{ parameters.pythonVersion }}' + displayName: 'Build and install dependencies from scratch' + condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit cd workers diff --git a/eng/templates/official/jobs/build-artifacts.yml b/eng/templates/official/jobs/build-artifacts.yml index 91f2b94df..d9348835f 100644 --- a/eng/templates/official/jobs/build-artifacts.yml +++ b/eng/templates/official/jobs/build-artifacts.yml @@ -20,6 +20,8 @@ jobs: pythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + Python314V4: + pythonVersion: '3.14.0-rc.2' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: @@ -54,6 +56,8 @@ jobs: pythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + Python314V4: + pythonVersion: '3.14.0-rc.2' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: @@ -88,6 +92,8 @@ jobs: pythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + Python314V4: + pythonVersion: '3.14.0-rc.2' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: @@ -121,6 +127,8 @@ jobs: pythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + Python314V4: + pythonVersion: '3.14.0-rc.2' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: @@ -150,6 +158,8 @@ jobs: pythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + Python314V4: + pythonVersion: '3.14.0-rc.2' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: diff --git a/workers/python/prodV4/worker.config.json b/workers/python/prodV4/worker.config.json index eaa3c50cb..d638b9980 100644 --- a/workers/python/prodV4/worker.config.json +++ b/workers/python/prodV4/worker.config.json @@ -3,7 +3,7 @@ "language":"python", "defaultRuntimeVersion":"3.12", "supportedOperatingSystems":["LINUX", "OSX", "WINDOWS"], - "supportedRuntimeVersions":["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"], + "supportedRuntimeVersions":["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], "supportedArchitectures":["X64", "X86", "Arm64"], "extensions":[".py"], "defaultExecutablePath":"python", From 9cb7b4216af407d62563701172cc79b492e3cfa3 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Tue, 16 Sep 2025 11:06:31 -0500 Subject: [PATCH 02/10] tentative --- eng/pack/scripts/rc_mac_arm64_deps.sh | 61 +++++++++++++++++++++---- eng/pack/scripts/rc_win_deps.ps1 | 47 +++++++++++++++---- eng/pack/templates/macos_64_env_gen.yml | 2 +- 3 files changed, 89 insertions(+), 21 deletions(-) diff --git a/eng/pack/scripts/rc_mac_arm64_deps.sh b/eng/pack/scripts/rc_mac_arm64_deps.sh index 7a06a5ccb..726a3b893 100644 --- a/eng/pack/scripts/rc_mac_arm64_deps.sh +++ b/eng/pack/scripts/rc_mac_arm64_deps.sh @@ -1,20 +1,61 @@ -#!/bin/bash - -python -m venv .env +#!/usr/bin/env bash +# Step 1: Create venv +python${PYTHON_VERSION} -m venv .env source .env/bin/activate -python -m pip install --upgrade pip +python -m pip install "setuptools<68" wheel -cd workers +# Step 2: Install Bazel +# Try system package manager first, otherwise fallback to binary download +echo "=== Install Bazel ===" +if command -v apt-get &>/dev/null; then + sudo apt-get update + sudo apt-get install -y bazel +elif command -v brew &>/dev/null; then + brew install bazelisk # macOS: bazelisk auto-tracks correct Bazel version +else + BAZEL_VERSION=6.5.0 + curl -LO "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64" + chmod +x "bazel-${BAZEL_VERSION}-linux-x86_64" + sudo mv "bazel-${BAZEL_VERSION}-linux-x86_64" /usr/local/bin/bazel +fi + +bazel --version + +echo "=== Checking Python version being used ===" +python --version +pip --version + +echo "=== Cloning grpc repo ===" +if [ ! -d "grpc" ]; then + git clone --recursive https://github.com/grpc/grpc +else + ( cd grpc && git fetch origin && git submodule update --init --recursive ) +fi -# Build and install grpcio from source -git clone --recursive https://github.com/grpc/grpc cd grpc -python tools/distrib/python/make_grpcio_tools.py -python tools/distrib/python/make_grpcio_wheel.py -pip install artifacts/grpcio-*.whl +echo "=== Building grpcio wheel with setup.py ===" +python setup.py bdist_wheel -d dist + +echo "=== Checking built wheels ===" +ls -la dist + +echo "=== Installing grpcio wheel into venv ===" +for whl in dist/grpcio-*.whl; do + if [ -f "$whl" ]; then + echo "Installing wheel: $whl" + pip install "$whl" + else + echo "❌ No grpcio wheel found in dist/" + exit 1 + fi +done +cd .. +echo "=== Installing your workers package ===" +cd workers python -m pip install . + python -m pip install . --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" python -m pip install invoke diff --git a/eng/pack/scripts/rc_win_deps.ps1 b/eng/pack/scripts/rc_win_deps.ps1 index 6f717cb3f..ff5081cfc 100644 --- a/eng/pack/scripts/rc_win_deps.ps1 +++ b/eng/pack/scripts/rc_win_deps.ps1 @@ -1,22 +1,49 @@ param ( [string]$pythonVersion ) -$versionParts = $pythonVersion -split '\.' # Splitting by dot -$versionMinor = [int]$versionParts[1] +# Create venv python -m venv .env -.env\Scripts\Activate.ps1 -python -m pip install --upgrade pip +. .env\Scripts\Activate.ps1 +python -m pip install "setuptools<68" wheel -cd workers +# Install Bazel +choco install bazel --version=6.5.0 -y +refreshenv +bazel --version + +Write-Host "=== Checking Python version being used ===" +.\.env\Scripts\python.exe --version +.\.env\Scripts\pip.exe --version + +Write-Host "=== Cloning gRPC repo ===" +if (-not (Test-Path "grpc")) { + git clone --recursive https://github.com/grpc/grpc +} else { + cd grpc + Write-Host "Repo already exists. Updating submodules..." + git submodule update --init --recursive + cd .. +} -# Build and install grpcio from source -git clone --recursive https://github.com/grpc/grpc cd grpc -python tools\distrib\python\make_grpcio_tools.py -python tools\distrib\python\make_grpcio_wheel.py -pip install artifacts/grpcio-*.whl +Write-Host "=== Building grpcio wheel with setup.py ===" +..\.\.env\Scripts\python.exe setup.py bdist_wheel -d dist + +Write-Host "=== Checking built wheels ===" +Get-ChildItem dist + +Write-Host "=== Installing grpcio wheel into venv ===" +Get-ChildItem -Path "dist" -Filter "grpcio-*.whl" | ForEach-Object { + Write-Host "Installing wheel: $($_.FullName)" + ..\.\.env\Scripts\pip.exe install $_.FullName +} + +cd .. + +# Go back to your project root and install your workers package +Set-Location workers python -m pip install . $depsPath = Join-Path -Path $env:BUILD_SOURCESDIRECTORY -ChildPath "deps" diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index a6e051f94..b6ca0bb92 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -48,7 +48,7 @@ steps: args: '${{ parameters.pythonVersion }}' displayName: 'Build and install dependencies' condition: ne(variables['minorVersion'], '14') -- task: PowerShell@2 +- task: ShellScript@2 inputs: filePath: 'eng/pack/scripts/rc_mac_arm64_deps.sh' arguments: '${{ parameters.pythonVersion }}' From 65c4a7907cc811a1bea3f8d08536bddbd5c1e12d Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Tue, 16 Sep 2025 11:46:04 -0500 Subject: [PATCH 03/10] update nuspec --- .../Microsoft.Azure.Functions.V4.PythonWorker.nuspec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec b/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec index 361995fb4..f9f379767 100644 --- a/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec +++ b/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec @@ -48,11 +48,11 @@ - - - - - + + + + + From db40181cf67c3734cc98f54e3ce5227abaf0894b Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 22 Sep 2025 10:22:15 -0500 Subject: [PATCH 04/10] sync with ADO --- eng/pack/scripts/rc_mac_arm64_deps.sh | 85 +++++++++---------- eng/pack/scripts/rc_nix_deps.sh | 25 ++++++ eng/pack/scripts/rc_win_deps.ps1 | 73 +++++++++------- eng/pack/templates/macos_64_env_gen.yml | 17 +++- eng/pack/templates/nix_env_gen.yml | 8 ++ eng/pack/templates/win_env_gen.yml | 12 ++- .../official/jobs/build-artifacts.yml | 8 +- workers/pyproject.toml | 9 +- 8 files changed, 146 insertions(+), 91 deletions(-) create mode 100644 eng/pack/scripts/rc_nix_deps.sh diff --git a/eng/pack/scripts/rc_mac_arm64_deps.sh b/eng/pack/scripts/rc_mac_arm64_deps.sh index 726a3b893..fd95d5eae 100644 --- a/eng/pack/scripts/rc_mac_arm64_deps.sh +++ b/eng/pack/scripts/rc_mac_arm64_deps.sh @@ -1,70 +1,61 @@ -#!/usr/bin/env bash -# Step 1: Create venv -python${PYTHON_VERSION} -m venv .env -source .env/bin/activate -python -m pip install "setuptools<68" wheel +#!/bin/bash -# Step 2: Install Bazel -# Try system package manager first, otherwise fallback to binary download -echo "=== Install Bazel ===" -if command -v apt-get &>/dev/null; then - sudo apt-get update - sudo apt-get install -y bazel -elif command -v brew &>/dev/null; then - brew install bazelisk # macOS: bazelisk auto-tracks correct Bazel version -else - BAZEL_VERSION=6.5.0 - curl -LO "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64" - chmod +x "bazel-${BAZEL_VERSION}-linux-x86_64" - sudo mv "bazel-${BAZEL_VERSION}-linux-x86_64" /usr/local/bin/bazel -fi - -bazel --version +echo "=== Upgrading pip and installing build dependencies ===" +python -m pip install --upgrade pip setuptools wheel cython -echo "=== Checking Python version being used ===" -python --version -pip --version - -echo "=== Cloning grpc repo ===" -if [ ! -d "grpc" ]; then - git clone --recursive https://github.com/grpc/grpc -else - ( cd grpc && git fetch origin && git submodule update --init --recursive ) -fi +echo "=== Cloning gRPC repo ===" +rm -rf grpc +git clone --recursive https://github.com/grpc/grpc +echo "=== Building grpcio wheel from source ===" cd grpc +git submodule update --init --recursive +export GRPC_PYTHON_BUILD_WITH_CYTHON=1 -echo "=== Building grpcio wheel with setup.py ===" -python setup.py bdist_wheel -d dist +# Build the wheel into dist/ +python -m pip wheel . -w dist -echo "=== Checking built wheels ===" -ls -la dist +# Log contents of dist +echo "=== Checking dist directory ===" +if [ -d dist ]; then + ls -lh dist +else + echo "dist/ directory not found!" +fi -echo "=== Installing grpcio wheel into venv ===" -for whl in dist/grpcio-*.whl; do - if [ -f "$whl" ]; then - echo "Installing wheel: $whl" - pip install "$whl" - else - echo "❌ No grpcio wheel found in dist/" - exit 1 - fi -done +# Log and install grpcio +GRPC_WHEEL=$(ls dist/grpcio-*.whl | head -n 1) +echo "Built grpcio wheel: $(basename "$GRPC_WHEEL")" +echo "=== Install grpcio wheel $(basename "$GRPC_WHEEL") into root ===" +python -m pip install "$GRPC_WHEEL" cd .. -echo "=== Installing your workers package ===" + +# Go back to your project root and install your workers package cd workers + +echo "=== Install other deps into root ===" python -m pip install . +python -m pip install grpcio-tools==1.70.0 + +echo "=== Installing grpcio into deps/ ===" +python -m pip install "$GRPC_WHEEL" --target "$BUILD_SOURCESDIRECTORY/deps" -python -m pip install . --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" +echo "=== Installing other deps into deps/ ===" +python -m pip install --upgrade pip setuptools wheel cython --target "$BUILD_SOURCESDIRECTORY/deps" +python -m pip install . azure-functions --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" --find-links ../grpc/dist +python -m pip install grpcio-tools==1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" --find-links ../grpc/dist +echo "=== Install invoke and build protos ===" python -m pip install invoke cd tests python -m invoke -c test_setup build-protos +echo "=== Copying .artifactignore ===" cd .. cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps" +echo "=== Copying protos ===" version_minor=$(echo $1 | cut -d '.' -f 2) if [[ $version_minor -lt 13 ]]; then cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker" diff --git a/eng/pack/scripts/rc_nix_deps.sh b/eng/pack/scripts/rc_nix_deps.sh new file mode 100644 index 000000000..cab94da82 --- /dev/null +++ b/eng/pack/scripts/rc_nix_deps.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +python -m venv .env +source .env/bin/activate +python -m pip install --upgrade pip + +cd workers +python -m pip install . +python -m pip install grpcio-tools~=1.70.0 +python -m pip install . --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" +python -m pip install grpcio-tools~=1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" + +python -m pip install invoke +cd tests +python -m invoke -c test_setup build-protos + +cd .. +cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps" + +version_minor=$(echo $1 | cut -d '.' -f 2) +if [[ $version_minor -lt 13 ]]; then + cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker" +else + cp -r proxy_worker/protos "$BUILD_SOURCESDIRECTORY/deps/proxy_worker" +fi \ No newline at end of file diff --git a/eng/pack/scripts/rc_win_deps.ps1 b/eng/pack/scripts/rc_win_deps.ps1 index ff5081cfc..30e5c8025 100644 --- a/eng/pack/scripts/rc_win_deps.ps1 +++ b/eng/pack/scripts/rc_win_deps.ps1 @@ -1,66 +1,75 @@ param ( [string]$pythonVersion ) +$versionParts = $pythonVersion -split '\.' # Splitting by dot +$versionMinor = [int]$versionParts[1] -# Create venv -python -m venv .env -. .env\Scripts\Activate.ps1 -python -m pip install "setuptools<68" wheel - -# Install Bazel -choco install bazel --version=6.5.0 -y -refreshenv -bazel --version - -Write-Host "=== Checking Python version being used ===" -.\.env\Scripts\python.exe --version -.\.env\Scripts\pip.exe --version +Write-Host "=== Upgrading pip and installing build dependencies ===" +python -m pip install --upgrade pip setuptools wheel cython Write-Host "=== Cloning gRPC repo ===" -if (-not (Test-Path "grpc")) { - git clone --recursive https://github.com/grpc/grpc -} else { - cd grpc - Write-Host "Repo already exists. Updating submodules..." - git submodule update --init --recursive - cd .. +if (Test-Path grpc) { + Remove-Item -Recurse -Force grpc } +git clone --recursive https://github.com/grpc/grpc -cd grpc +Write-Host "=== Building grpcio from source ===" +Set-Location grpc +$env:GRPC_PYTHON_BUILD_WITH_CYTHON = "1" -Write-Host "=== Building grpcio wheel with setup.py ===" -..\.\.env\Scripts\python.exe setup.py bdist_wheel -d dist +# Build the wheel into dist/ +python -m pip wheel . -w dist -Write-Host "=== Checking built wheels ===" -Get-ChildItem dist - -Write-Host "=== Installing grpcio wheel into venv ===" -Get-ChildItem -Path "dist" -Filter "grpcio-*.whl" | ForEach-Object { - Write-Host "Installing wheel: $($_.FullName)" - ..\.\.env\Scripts\pip.exe install $_.FullName +# Log contents of dist +Write-Host "=== Checking dist directory ===" +if (Test-Path dist) { + Get-ChildItem dist +} else { + Write-Host "dist/ directory not found!" } +# Log and install grpc +$grpcWheel = Get-ChildItem dist\grpcio-*.whl | Select-Object -First 1 +Write-Host "Built grpcio wheel: $($grpcWheel.Name)" +Write-Host "=== Install grpcio wheel $($grpcWheel.Name) into root ===" +$grpcWheel = Get-ChildItem dist\grpcio-*.whl | Select-Object -First 1 +python -m pip install $grpcWheel.FullName + + cd .. # Go back to your project root and install your workers package Set-Location workers + +Write-Host "=== Install other deps into root ===" python -m pip install . +python -m pip install grpcio-tools==1.70.0 $depsPath = Join-Path -Path $env:BUILD_SOURCESDIRECTORY -ChildPath "deps" -python -m pip install . azure-functions --no-compile --target $depsPath.ToString() +# Install both grpc wheels into deps +Write-Host "=== Installing grpcio into deps/ ===" +python -m pip install $grpcWheel.FullName --target $depsPath +Write-Host "=== Installing other deps into deps/ ===" +python -m pip install --upgrade pip setuptools wheel cython --target $depsPath +python -m pip install . azure-functions --no-compile --target $depsPath --find-links ..\grpc\dist +python -m pip install grpcio-tools==1.70.0 --no-compile --target $depsPath --find-links ..\grpc\dist + +Write-Host "=== Install invoke and build protos ===" python -m pip install invoke cd tests python -m invoke -c test_setup build-protos +Write-Host "=== Copying .artifactignore ===" cd .. Copy-Item -Path ".artifactignore" -Destination $depsPath.ToString() +Write-Host "=== Copying protos ===" if ($versionMinor -lt 13) { $protosPath = Join-Path -Path $depsPath -ChildPath "azure_functions_worker/protos" Copy-Item -Path "azure_functions_worker/protos/*" -Destination $protosPath.ToString() -Recurse -Force } else { $protosPath = Join-Path -Path $depsPath -ChildPath "proxy_worker/protos" Copy-Item -Path "proxy_worker/protos/*" -Destination $protosPath.ToString() -Recurse -Force -} +} \ No newline at end of file diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index b6ca0bb92..9fd4e199e 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -46,13 +46,14 @@ steps: disableAutoCwd: true scriptPath: 'eng/pack/scripts/mac_arm64_deps.sh' args: '${{ parameters.pythonVersion }}' - displayName: 'Build and install dependencies' + displayName: 'Install dependencies' condition: ne(variables['minorVersion'], '14') - task: ShellScript@2 inputs: - filePath: 'eng/pack/scripts/rc_mac_arm64_deps.sh' - arguments: '${{ parameters.pythonVersion }}' - displayName: 'Build and install dependencies from scratch' + disableAutoCwd: true + scriptPath: 'eng/pack/scripts/rc_mac_arm64_deps.sh' + args: '${{ parameters.pythonVersion }}' + displayName: 'Build dependencies from scratch' condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit @@ -169,6 +170,14 @@ steps: !werkzeug/debug/shared/debugger.js !azure_functions_worker/** !dateutil/** + !Cython/** + !__pycache__/** + !bin/** + !cython.py + !pip/** + !pyximport/** + !typing_extensions.py + !wheel/** targetFolder: '$(Build.ArtifactStagingDirectory)' condition: eq(variables['proxyWorker'], true) displayName: 'Copy proxy_worker files' diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 7dbfcf668..cb9a9ae2a 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -47,6 +47,14 @@ steps: scriptPath: 'eng/pack/scripts/nix_deps.sh' args: '${{ parameters.pythonVersion }}' displayName: 'Install Dependencies' + condition: ne(variables['minorVersion'], '14') +- task: ShellScript@2 + inputs: + disableAutoCwd: true + scriptPath: 'eng/pack/scripts/rc_nix_deps.sh' + args: '${{ parameters.pythonVersion }}' + displayName: 'Build dependencies from scratch' + condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit cd workers diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index e587190b8..11b5517ea 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -46,13 +46,13 @@ steps: inputs: filePath: 'eng\pack\scripts\win_deps.ps1' arguments: '${{ parameters.pythonVersion }}' - displayName: 'Build and install dependencies' + displayName: 'Install dependencies' condition: ne(variables['minorVersion'], '14') - task: PowerShell@2 inputs: filePath: 'eng\pack\scripts\rc_win_deps.ps1' arguments: '${{ parameters.pythonVersion }}' - displayName: 'Build and install dependencies from scratch' + displayName: 'Build dependencies from scratch' condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit @@ -169,6 +169,14 @@ steps: !werkzeug\debug\shared\debugger.js !dateutil\** !azure_functions_worker\** + !Cython\** + !__pycache__\** + !bin\** + !cython.py + !pip\** + !pyximport\** + !typing_extensions.py + !wheel\** targetFolder: '$(Build.ArtifactStagingDirectory)' condition: eq(variables['proxyWorker'], true) displayName: 'Copy proxy_worker files' diff --git a/eng/templates/official/jobs/build-artifacts.yml b/eng/templates/official/jobs/build-artifacts.yml index d9348835f..9b2615172 100644 --- a/eng/templates/official/jobs/build-artifacts.yml +++ b/eng/templates/official/jobs/build-artifacts.yml @@ -1,5 +1,6 @@ jobs: - job: Build_WINDOWS_X64 + timeoutInMinutes: 180 pool: name: 1es-pool-azfunc image: 1es-windows-2022 @@ -36,6 +37,7 @@ jobs: artifactName: '$(pythonVersion)_WINDOWS_X64' grpcBuild: 'win_amd64.pyd' - job: Build_WINDOWS_X86 + timeoutInMinutes: 180 pool: name: 1es-pool-azfunc image: 1es-windows-2022 @@ -72,6 +74,7 @@ jobs: artifactName: '$(pythonVersion)_WINDOWS_x86' grpcBuild: 'win32.pyd' - job: Build_LINUX_X64 + timeoutInMinutes: 180 pool: name: 1es-pool-azfunc image: 1es-ubuntu-22.04 @@ -107,6 +110,7 @@ jobs: artifactName: '$(pythonVersion)_LINUX_X64' grpcBuild: 'x86_64-linux-gnu.so' - job: Build_OSX_X64 + timeoutInMinutes: 180 pool: name: Azure Pipelines image: macOS-latest @@ -136,12 +140,13 @@ jobs: targetPath: $(Build.ArtifactStagingDirectory) artifactName: "$(pythonVersion)_OSX_X64" steps: - - template: ../../../pack/templates/nix_env_gen.yml + - template: ../../../pack/templates/macos_64_env_gen.yml parameters: pythonVersion: '$(pythonVersion)' artifactName: '$(pythonVersion)_OSX_X64' grpcBuild: 'darwin.so' - job: Build_OSX_ARM64 + timeoutInMinutes: 180 pool: name: Azure Pipelines image: macOS-latest @@ -173,6 +178,7 @@ jobs: artifactName: '$(pythonVersion)_OSX_ARM64' grpcBuild: 'darwin.so' - job: Build_LINUX_ARM64 + timeoutInMinutes: 240 pool: name: 1es-pool-azfunc image: 1es-ubuntu-22.04 diff --git a/workers/pyproject.toml b/workers/pyproject.toml index 69497c60a..eb742e873 100644 --- a/workers/pyproject.toml +++ b/workers/pyproject.toml @@ -35,10 +35,11 @@ dependencies = [ "protobuf~=5.29.0; python_version >= '3.13'", "grpcio-tools~=1.43.0; python_version == '3.7'", "grpcio-tools~=1.59.0; python_version >= '3.8' and python_version < '3.13'", - "grpcio-tools~=1.70.0; python_version >= '3.13'", + "grpcio-tools~=1.70.0; python_version == '3.13'", "grpcio~=1.43.0; python_version == '3.7'", "grpcio ~=1.59.0; python_version >= '3.8' and python_version < '3.13'", - "grpcio~=1.70.0; python_version >= '3.13'", + "grpcio~=1.70.0; python_version == '3.13'", + "grpcio~=1.70.0; python_version == '3.14' and sys_platform == 'linux'", "uvloop~=0.21.0; python_version >= '3.13' and sys_platform != 'win32'", "azurefunctions-extensions-base==1.1.0; python_version >= '3.8'", "azure-functions-runtime==1.0.0; python_version >= '3.13'", @@ -82,7 +83,6 @@ dev = [ "pre-commit", "invoke", "cryptography", - "jsonpickle", "orjson" ] test-http-v2 = [ @@ -91,8 +91,7 @@ test-http-v2 = [ ] test-deferred-bindings = [ "azurefunctions-extensions-bindings-blob==1.1.1", - "azurefunctions-extensions-bindings-eventhub==1.0.0b1", - "azurefunctions-extensions-bindings-servicebus==1.0.0b2" + "azurefunctions-extensions-bindings-eventhub==1.0.0b1" ] [build-system] From f1864226f0d603225c63442f9bc69a72cfa5c8a2 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 22 Sep 2025 10:28:32 -0500 Subject: [PATCH 05/10] comments --- eng/pack/scripts/rc_mac_arm64_deps.sh | 2 +- eng/pack/scripts/rc_win_deps.ps1 | 2 +- eng/pack/templates/macos_64_env_gen.yml | 2 +- eng/pack/templates/nix_env_gen.yml | 2 +- eng/pack/templates/win_env_gen.yml | 2 +- eng/templates/official/jobs/build-artifacts.yml | 1 - workers/pyproject.toml | 4 ++-- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/eng/pack/scripts/rc_mac_arm64_deps.sh b/eng/pack/scripts/rc_mac_arm64_deps.sh index fd95d5eae..d26561d03 100644 --- a/eng/pack/scripts/rc_mac_arm64_deps.sh +++ b/eng/pack/scripts/rc_mac_arm64_deps.sh @@ -31,7 +31,7 @@ python -m pip install "$GRPC_WHEEL" cd .. -# Go back to your project root and install your workers package +# Change back to project root cd workers echo "=== Install other deps into root ===" diff --git a/eng/pack/scripts/rc_win_deps.ps1 b/eng/pack/scripts/rc_win_deps.ps1 index 30e5c8025..63483a2b4 100644 --- a/eng/pack/scripts/rc_win_deps.ps1 +++ b/eng/pack/scripts/rc_win_deps.ps1 @@ -38,7 +38,7 @@ python -m pip install $grpcWheel.FullName cd .. -# Go back to your project root and install your workers package +# Change back to project root Set-Location workers Write-Host "=== Install other deps into root ===" diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index 9fd4e199e..00cdb386c 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -53,7 +53,7 @@ steps: disableAutoCwd: true scriptPath: 'eng/pack/scripts/rc_mac_arm64_deps.sh' args: '${{ parameters.pythonVersion }}' - displayName: 'Build dependencies from scratch' + displayName: 'Build dependencies from source' condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index cb9a9ae2a..9357ae1e1 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -53,7 +53,7 @@ steps: disableAutoCwd: true scriptPath: 'eng/pack/scripts/rc_nix_deps.sh' args: '${{ parameters.pythonVersion }}' - displayName: 'Build dependencies from scratch' + displayName: 'Build dependencies from source' condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index 11b5517ea..88951f7e5 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -52,7 +52,7 @@ steps: inputs: filePath: 'eng\pack\scripts\rc_win_deps.ps1' arguments: '${{ parameters.pythonVersion }}' - displayName: 'Build dependencies from scratch' + displayName: 'Build dependencies from source' condition: eq(variables['minorVersion'], '14') - bash: | pip install pip-audit diff --git a/eng/templates/official/jobs/build-artifacts.yml b/eng/templates/official/jobs/build-artifacts.yml index 9b2615172..85a8e4b61 100644 --- a/eng/templates/official/jobs/build-artifacts.yml +++ b/eng/templates/official/jobs/build-artifacts.yml @@ -178,7 +178,6 @@ jobs: artifactName: '$(pythonVersion)_OSX_ARM64' grpcBuild: 'darwin.so' - job: Build_LINUX_ARM64 - timeoutInMinutes: 240 pool: name: 1es-pool-azfunc image: 1es-ubuntu-22.04 diff --git a/workers/pyproject.toml b/workers/pyproject.toml index eb742e873..ea7402718 100644 --- a/workers/pyproject.toml +++ b/workers/pyproject.toml @@ -39,7 +39,6 @@ dependencies = [ "grpcio~=1.43.0; python_version == '3.7'", "grpcio ~=1.59.0; python_version >= '3.8' and python_version < '3.13'", "grpcio~=1.70.0; python_version == '3.13'", - "grpcio~=1.70.0; python_version == '3.14' and sys_platform == 'linux'", "uvloop~=0.21.0; python_version >= '3.13' and sys_platform != 'win32'", "azurefunctions-extensions-base==1.1.0; python_version >= '3.8'", "azure-functions-runtime==1.0.0; python_version >= '3.13'", @@ -91,7 +90,8 @@ test-http-v2 = [ ] test-deferred-bindings = [ "azurefunctions-extensions-bindings-blob==1.1.1", - "azurefunctions-extensions-bindings-eventhub==1.0.0b1" + "azurefunctions-extensions-bindings-eventhub==1.0.0b1", + "azurefunctions-extensions-bindings-servicebus==1.0.0b2" ] [build-system] From 6187666d6159fc7edf9273552d50307a09d1f202 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 22 Sep 2025 10:42:46 -0500 Subject: [PATCH 06/10] rc nix deps --- eng/pack/scripts/rc_nix_deps.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/pack/scripts/rc_nix_deps.sh b/eng/pack/scripts/rc_nix_deps.sh index cab94da82..6a89e85e9 100644 --- a/eng/pack/scripts/rc_nix_deps.sh +++ b/eng/pack/scripts/rc_nix_deps.sh @@ -6,8 +6,11 @@ python -m pip install --upgrade pip cd workers python -m pip install . +python -m pip install grpcio~=1.70.0 python -m pip install grpcio-tools~=1.70.0 + python -m pip install . --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" +python -m pip install grpcio~=1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" python -m pip install grpcio-tools~=1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" python -m pip install invoke From 0596b5d94fdf8e1f07f418a9a94e2f2361933345 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 22 Sep 2025 11:51:37 -0500 Subject: [PATCH 07/10] clean up scripts --- eng/pack/templates/macos_64_env_gen.yml | 14 ++++++++++++-- eng/pack/templates/nix_env_gen.yml | 14 ++++++++++++-- eng/pack/templates/win_env_gen.yml | 14 ++++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index 00cdb386c..71b4c097f 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -23,6 +23,16 @@ steps: Write-Host "Minor version: $PY_MINOR" Write-Host "##vso[task.setvariable variable=minorVersion;]$PY_MINOR" + # Detect if this is an RC build + if ($PY_VER -match "rc") { + Write-Host "RC version detected" + Write-Host "##vso[task.setvariable variable=isRC;]true" + } + else { + Write-Host "Stable version detected" + Write-Host "##vso[task.setvariable variable=isRC;]false" + } + # Set build-related variables based on Python minor version if( $PY_MINOR -ge 13 ) { @@ -47,14 +57,14 @@ steps: scriptPath: 'eng/pack/scripts/mac_arm64_deps.sh' args: '${{ parameters.pythonVersion }}' displayName: 'Install dependencies' - condition: ne(variables['minorVersion'], '14') + condition: eq(variables['isRC'], 'false') - task: ShellScript@2 inputs: disableAutoCwd: true scriptPath: 'eng/pack/scripts/rc_mac_arm64_deps.sh' args: '${{ parameters.pythonVersion }}' displayName: 'Build dependencies from source' - condition: eq(variables['minorVersion'], '14') + condition: eq(variables['isRC'], 'true') - bash: | pip install pip-audit cd workers diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 9357ae1e1..3d2cd8a0b 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -23,6 +23,16 @@ steps: Write-Host "Minor version: $PY_MINOR" Write-Host "##vso[task.setvariable variable=minorVersion;]$PY_MINOR" + # Detect if this is an RC build + if ($PY_VER -match "rc") { + Write-Host "RC version detected" + Write-Host "##vso[task.setvariable variable=isRC;]true" + } + else { + Write-Host "Stable version detected" + Write-Host "##vso[task.setvariable variable=isRC;]false" + } + # Set build-related variables based on Python minor version if( $PY_MINOR -ge 13 ) { @@ -47,14 +57,14 @@ steps: scriptPath: 'eng/pack/scripts/nix_deps.sh' args: '${{ parameters.pythonVersion }}' displayName: 'Install Dependencies' - condition: ne(variables['minorVersion'], '14') + condition: eq(variables['isRC'], 'false') - task: ShellScript@2 inputs: disableAutoCwd: true scriptPath: 'eng/pack/scripts/rc_nix_deps.sh' args: '${{ parameters.pythonVersion }}' displayName: 'Build dependencies from source' - condition: eq(variables['minorVersion'], '14') + condition: eq(variables['isRC'], 'true') - bash: | pip install pip-audit cd workers diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index 88951f7e5..af90096cc 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -24,6 +24,16 @@ steps: Write-Host "Minor version: $PY_MINOR" Write-Host "##vso[task.setvariable variable=minorVersion;]$PY_MINOR" + # Detect if this is an RC build + if ($PY_VER -match "rc") { + Write-Host "RC version detected" + Write-Host "##vso[task.setvariable variable=isRC;]true" + } + else { + Write-Host "Stable version detected" + Write-Host "##vso[task.setvariable variable=isRC;]false" + } + # Set build-related variables based on Python minor version if( $PY_MINOR -ge 13 ) { @@ -47,13 +57,13 @@ steps: filePath: 'eng\pack\scripts\win_deps.ps1' arguments: '${{ parameters.pythonVersion }}' displayName: 'Install dependencies' - condition: ne(variables['minorVersion'], '14') + condition: eq(variables['isRC'], 'false') - task: PowerShell@2 inputs: filePath: 'eng\pack\scripts\rc_win_deps.ps1' arguments: '${{ parameters.pythonVersion }}' displayName: 'Build dependencies from source' - condition: eq(variables['minorVersion'], '14') + condition: eq(variables['isRC'], 'true') - bash: | pip install pip-audit cd workers From 1521cb4dfad7618f7ffbfb89b74d555b4a6decaf Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 22 Sep 2025 13:21:59 -0500 Subject: [PATCH 08/10] rename artifact --- ...oft.Azure.Functions.V4.PythonWorker.nuspec | 10 +-- .../official/jobs/build-artifacts.yml | 68 +++++++++++++++---- 2 files changed, 61 insertions(+), 17 deletions(-) diff --git a/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec b/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec index f9f379767..361995fb4 100644 --- a/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec +++ b/eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec @@ -48,11 +48,11 @@ - - - - - + + + + + diff --git a/eng/templates/official/jobs/build-artifacts.yml b/eng/templates/official/jobs/build-artifacts.yml index 85a8e4b61..5b0b1581f 100644 --- a/eng/templates/official/jobs/build-artifacts.yml +++ b/eng/templates/official/jobs/build-artifacts.yml @@ -9,32 +9,40 @@ jobs: matrix: Python37V4: pythonVersion: '3.7' + normalizedPythonVersion: '3.7' Python38V4: pythonVersion: '3.8' + normalizedPythonVersion: '3.8' Python39V4: pythonVersion: '3.9' + normalizedPythonVersion: '3.9' Python310V4: pythonVersion: '3.10' + normalizedPythonVersion: '3.10' Python311V4: pythonVersion: '3.11' + normalizedPythonVersion: '3.11' Python312V4: pythonVersion: '3.12' + normalizedPythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + normalizedPythonVersion: '3.13' Python314V4: pythonVersion: '3.14.0-rc.2' + normalizedPythonVersion: '3.14' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - output: pipelineArtifact targetPath: $(Build.ArtifactStagingDirectory) - artifactName: "$(pythonVersion)_WINDOWS_X64" + artifactName: "$(normalizedPythonVersion)_WINDOWS_X64" steps: - template: ../../../pack/templates/win_env_gen.yml parameters: pythonVersion: '$(pythonVersion)' architecture: 'x64' - artifactName: '$(pythonVersion)_WINDOWS_X64' + artifactName: '$(normalizedPythonVersion)_WINDOWS_X64' grpcBuild: 'win_amd64.pyd' - job: Build_WINDOWS_X86 timeoutInMinutes: 180 @@ -46,32 +54,40 @@ jobs: matrix: Python37V4: pythonVersion: '3.7' + normalizedPythonVersion: '3.7' Python38V4: pythonVersion: '3.8' + normalizedPythonVersion: '3.8' Python39V4: pythonVersion: '3.9' + normalizedPythonVersion: '3.9' Python310V4: pythonVersion: '3.10' + normalizedPythonVersion: '3.10' Python311V4: pythonVersion: '3.11' + normalizedPythonVersion: '3.11' Python312V4: pythonVersion: '3.12' + normalizedPythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + normalizedPythonVersion: '3.13' Python314V4: pythonVersion: '3.14.0-rc.2' + normalizedPythonVersion: '3.14' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - output: pipelineArtifact targetPath: $(Build.ArtifactStagingDirectory) - artifactName: "$(pythonVersion)_WINDOWS_X86" + artifactName: "$(normalizedPythonVersion)_WINDOWS_X86" steps: - template: ../../../pack/templates/win_env_gen.yml parameters: pythonVersion: '$(pythonVersion)' architecture: 'x86' - artifactName: '$(pythonVersion)_WINDOWS_x86' + artifactName: '$(normalizedPythonVersion)_WINDOWS_x86' grpcBuild: 'win32.pyd' - job: Build_LINUX_X64 timeoutInMinutes: 180 @@ -83,31 +99,39 @@ jobs: matrix: Python37V4: pythonVersion: '3.7' + normalizedPythonVersion: '3.7' Python38V4: pythonVersion: '3.8' + normalizedPythonVersion: '3.8' Python39V4: pythonVersion: '3.9' + normalizedPythonVersion: '3.9' Python310V4: pythonVersion: '3.10' + normalizedPythonVersion: '3.10' Python311V4: pythonVersion: '3.11' + normalizedPythonVersion: '3.11' Python312V4: pythonVersion: '3.12' + normalizedPythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + normalizedPythonVersion: '3.13' Python314V4: pythonVersion: '3.14.0-rc.2' + normalizedPythonVersion: '3.14' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - output: pipelineArtifact targetPath: $(Build.ArtifactStagingDirectory) - artifactName: "$(pythonVersion)_LINUX_X64" + artifactName: "$(normalizedPythonVersion)_LINUX_X64" steps: - template: ../../../pack/templates/nix_env_gen.yml parameters: pythonVersion: '$(pythonVersion)' - artifactName: '$(pythonVersion)_LINUX_X64' + artifactName: '$(normalizedPythonVersion)_LINUX_X64' grpcBuild: 'x86_64-linux-gnu.so' - job: Build_OSX_X64 timeoutInMinutes: 180 @@ -119,31 +143,39 @@ jobs: matrix: Python37V4: pythonVersion: '3.7' + normalizedPythonVersion: '3.7' Python38V4: pythonVersion: '3.8' + normalizedPythonVersion: '3.8' Python39V4: pythonVersion: '3.9' + normalizedPythonVersion: '3.9' Python310V4: pythonVersion: '3.10' + normalizedPythonVersion: '3.10' Python311V4: pythonVersion: '3.11' + normalizedPythonVersion: '3.11' Python312V4: pythonVersion: '3.12' + normalizedPythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + normalizedPythonVersion: '3.13' Python314V4: pythonVersion: '3.14.0-rc.2' + normalizedPythonVersion: '3.14' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - output: pipelineArtifact targetPath: $(Build.ArtifactStagingDirectory) - artifactName: "$(pythonVersion)_OSX_X64" + artifactName: "$(normalizedPythonVersion)_OSX_X64" steps: - template: ../../../pack/templates/macos_64_env_gen.yml parameters: pythonVersion: '$(pythonVersion)' - artifactName: '$(pythonVersion)_OSX_X64' + artifactName: '$(normalizedPythonVersion)_OSX_X64' grpcBuild: 'darwin.so' - job: Build_OSX_ARM64 timeoutInMinutes: 180 @@ -155,29 +187,36 @@ jobs: matrix: Python39V4: pythonVersion: '3.9' + normalizedPythonVersion: '3.9' Python310V4: pythonVersion: '3.10' + normalizedPythonVersion: '3.10' Python311V4: pythonVersion: '3.11' + normalizedPythonVersion: '3.11' Python312V4: pythonVersion: '3.12' + normalizedPythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + normalizedPythonVersion: '3.13' Python314V4: pythonVersion: '3.14.0-rc.2' + normalizedPythonVersion: '3.14' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - output: pipelineArtifact targetPath: $(Build.ArtifactStagingDirectory) - artifactName: "$(pythonVersion)_OSX_ARM64" + artifactName: "$(normalizedPythonVersion)_OSX_ARM64" steps: - template: ../../../pack/templates/macos_64_env_gen.yml parameters: pythonVersion: '$(pythonVersion)' - artifactName: '$(pythonVersion)_OSX_ARM64' + artifactName: '$(normalizedPythonVersion)_OSX_ARM64' grpcBuild: 'darwin.so' - job: Build_LINUX_ARM64 + timeoutInMinutes: 240 pool: name: 1es-pool-azfunc image: 1es-ubuntu-22.04 @@ -186,25 +225,30 @@ jobs: matrix: Python39V4: pythonVersion: '3.9' + normalizedPythonVersion: '3.9' Python310V4: pythonVersion: '3.10' + normalizedPythonVersion: '3.10' Python311V4: pythonVersion: '3.11' + normalizedPythonVersion: '3.11' Python312V4: pythonVersion: '3.12' + normalizedPythonVersion: '3.12' Python313V4: pythonVersion: '3.13' + normalizedPythonVersion: '3.13' templateContext: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - output: pipelineArtifact targetPath: $(Build.ArtifactStagingDirectory) - artifactName: "$(pythonVersion)_LINUX_ARM64" + artifactName: "$(normalizedPythonVersion)_LINUX_ARM64" steps: - template: ../../../pack/templates/nix_arm64_env_gen.yml parameters: pythonVersion: '$(pythonVersion)' - artifactName: '$(pythonVersion)_LINUX_ARM64' + artifactName: '$(normalizedPythonVersion)_LINUX_ARM64' grpcBuild: 'aarch64-linux-gnu.so' - job: PackageWorkers From 6c0a152987611c4ca268580895a1bbe0aabf0c4d Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 22 Sep 2025 14:36:28 -0500 Subject: [PATCH 09/10] pyproject miss --- workers/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/workers/pyproject.toml b/workers/pyproject.toml index ea7402718..e561a0b77 100644 --- a/workers/pyproject.toml +++ b/workers/pyproject.toml @@ -82,6 +82,7 @@ dev = [ "pre-commit", "invoke", "cryptography", + "jsonpickle", "orjson" ] test-http-v2 = [ From be4cb82999bf61df6d1cee7381525a50ba8523e9 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Mon, 22 Sep 2025 14:48:34 -0500 Subject: [PATCH 10/10] extra space --- eng/pack/scripts/rc_win_deps.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pack/scripts/rc_win_deps.ps1 b/eng/pack/scripts/rc_win_deps.ps1 index 63483a2b4..5a3b0130c 100644 --- a/eng/pack/scripts/rc_win_deps.ps1 +++ b/eng/pack/scripts/rc_win_deps.ps1 @@ -35,7 +35,6 @@ Write-Host "=== Install grpcio wheel $($grpcWheel.Name) into root ===" $grpcWheel = Get-ChildItem dist\grpcio-*.whl | Select-Object -First 1 python -m pip install $grpcWheel.FullName - cd .. # Change back to project root