Skip to content

Commit 6e2bfcb

Browse files
authored
Merge branch 'dev' into hallvictoria/generic-typing
2 parents d9e25eb + 181da8c commit 6e2bfcb

File tree

71 files changed

+2127
-376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2127
-376
lines changed

.github/ISSUE_TEMPLATE/deferred_bindings_bug_report.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/deferred_bindings_feature_request.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

eng/ci/emulator-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ variables:
3434
- template: /ci/variables/build.yml@eng
3535
- template: /ci/variables/cfs.yml@eng
3636
- template: /eng/templates/utils/variables.yml@self
37+
- template: /eng/templates/utils/emulator-variables.yml@self
3738

3839
extends:
3940
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es

eng/ci/official-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ resources:
3232
variables:
3333
- template: /eng/templates/utils/variables.yml@self
3434
- template: /eng/templates/utils/official-variables.yml@self
35+
- template: /eng/templates/utils/emulator-variables.yml@self
3536
- name: codeql.excludePathPatterns
3637
value: deps/,build/
3738

@@ -115,4 +116,4 @@ extends:
115116
parameters:
116117
PROJECT_NAME: 'Python V1 Library'
117118
PROJECT_DIRECTORY: 'runtimes/v1'
118-
PoolName: 1es-pool-azfunc
119+
PoolName: 1es-pool-azfunc

eng/ci/public-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ resources:
2828

2929
variables:
3030
- template: /eng/templates/utils/variables.yml@self
31+
- template: /eng/templates/utils/emulator-variables.yml@self
3132

3233
extends:
3334
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es

eng/pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@
4848
<file src="..\..\3.13_OSX_X64\**" target="tools\3.13\OSX\X64" />
4949
<file src="..\..\3.13_OSX_ARM64\**" target="tools\3.13\OSX\Arm64" />
5050
<file src="..\..\3.13_LINUX_ARM64\**" target="tools\3.13\LINUX\Arm64" />
51+
<file src="..\..\3.14_WINDOWS_X64\**" target="tools\3.14\WINDOWS\X64" />
52+
<file src="..\..\3.14_WINDOWS_X86\**" target="tools\3.14\WINDOWS\X86" />
53+
<file src="..\..\3.14_LINUX_X64\**" target="tools\3.14\LINUX\X64" />
54+
<file src="..\..\3.14_OSX_X64\**" target="tools\3.14\OSX\X64" />
55+
<file src="..\..\3.14_OSX_ARM64\**" target="tools\3.14\OSX\Arm64" />
56+
<file src="..\..\3.14_LINUX_ARM64\**" target="tools\3.14\LINUX\Arm64" />
5157
<file src="..\..\workers\python\prodV4\worker.config.json" target="tools" />
5258
<file src="Microsoft.Azure.Functions.PythonWorker.targets" target="build" />
5359
<file src="..\..\_manifest\spdx_2.2\manifest.spdx.json" target="SBOM\manifest.spdx.json" />
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
3+
echo "=== Upgrading pip and installing build dependencies ==="
4+
python -m pip install --upgrade pip setuptools wheel cython
5+
6+
echo "=== Cloning gRPC repo ==="
7+
rm -rf grpc
8+
git clone --recursive https://github.com/grpc/grpc
9+
10+
echo "=== Building grpcio wheel from source ==="
11+
cd grpc
12+
git submodule update --init --recursive
13+
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
14+
15+
# Build the wheel into dist/
16+
python -m pip wheel . -w dist
17+
18+
# Log contents of dist
19+
echo "=== Checking dist directory ==="
20+
if [ -d dist ]; then
21+
ls -lh dist
22+
else
23+
echo "dist/ directory not found!"
24+
fi
25+
26+
# Log and install grpcio
27+
GRPC_WHEEL=$(ls dist/grpcio-*.whl | head -n 1)
28+
echo "Built grpcio wheel: $(basename "$GRPC_WHEEL")"
29+
echo "=== Install grpcio wheel $(basename "$GRPC_WHEEL") into root ==="
30+
python -m pip install "$GRPC_WHEEL"
31+
32+
cd ..
33+
34+
# Change back to project root
35+
cd workers
36+
37+
echo "=== Install other deps into root ==="
38+
python -m pip install .
39+
python -m pip install grpcio-tools==1.70.0
40+
41+
echo "=== Installing grpcio into deps/ ==="
42+
python -m pip install "$GRPC_WHEEL" --target "$BUILD_SOURCESDIRECTORY/deps"
43+
44+
echo "=== Installing other deps into deps/ ==="
45+
python -m pip install --upgrade pip setuptools wheel cython --target "$BUILD_SOURCESDIRECTORY/deps"
46+
python -m pip install . azure-functions --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" --find-links ../grpc/dist
47+
python -m pip install grpcio-tools==1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" --find-links ../grpc/dist
48+
49+
echo "=== Install invoke and build protos ==="
50+
python -m pip install invoke
51+
cd tests
52+
python -m invoke -c test_setup build-protos
53+
54+
echo "=== Copying .artifactignore ==="
55+
cd ..
56+
cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps"
57+
58+
echo "=== Copying protos ==="
59+
version_minor=$(echo $1 | cut -d '.' -f 2)
60+
if [[ $version_minor -lt 13 ]]; then
61+
cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker"
62+
else
63+
cp -r proxy_worker/protos "$BUILD_SOURCESDIRECTORY/deps/proxy_worker"
64+
fi
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/bin/bash
2+
3+
python -m venv .env
4+
source .env/bin/activate
5+
python -m pip install --upgrade pip
6+
7+
version_minor=$(echo $1 | cut -d '.' -f 2)
8+
mkdir -p $BUILD_SOURCESDIRECTORY/deps
9+
10+
# Targeting: grpcio manylinux_2_17_aarch64.whl build
11+
12+
# Starts a docker container using the linux/arm64 platform
13+
# Inside the container, we perform the same steps as our typical builds
14+
# However, since we're running them on the linux/arm64 platform, we ensure
15+
# that we pull in the correct grpc, etc. builds
16+
docker run --privileged --rm tonistiigi/binfmt --install all
17+
docker run --name my-arm64-container --platform linux/arm64 \
18+
-v ./:/src \
19+
-w /src \
20+
python:3.14.0rc3-alpine3.22 sh -c "
21+
ls -la /src # debug: see what files exist
22+
apk update && apk add --no-cache git curl build-base && \
23+
pip install --upgrade pip && \
24+
cd workers && \
25+
pip install . && \
26+
pip install . --target /src && \
27+
pip install invoke && \
28+
cd tests && \
29+
python -m invoke -c test_setup build-protos && \
30+
ls -la /src
31+
"
32+
33+
cd workers
34+
35+
# This copies over the build files from the docker container to the local pipeline
36+
docker cp my-arm64-container:/src/. $BUILD_SOURCESDIRECTORY/all/
37+
docker rm my-arm64-container
38+
39+
# From the container, we have many unnecessary files. Here, we only
40+
# copy over the relevant files to the 'deps/' directory.
41+
copy_list=(
42+
"azure"
43+
"azure_functions_worker"
44+
"azure_functions_runtime"
45+
"azure_functions_runtime_v1"
46+
"azurefunctions"
47+
"dateutil"
48+
"google"
49+
"grpc"
50+
"markupsafe"
51+
"proxy_worker"
52+
"six.py"
53+
"werkzeug"
54+
)
55+
56+
for dir in "${copy_list[@]}"; do
57+
src="$BUILD_SOURCESDIRECTORY/all/$dir"
58+
dest="$BUILD_SOURCESDIRECTORY/deps"
59+
60+
if [ -e $src ]; then
61+
echo "Copying $dir..."
62+
cp -r $src $dest
63+
else
64+
echo "Directory $dir not found in deps — skipping"
65+
fi
66+
done
67+
68+
cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps"
69+
70+
version_minor=$(echo $1 | cut -d '.' -f 2)
71+
if [[ $version_minor -lt 13 ]]; then
72+
cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker"
73+
else
74+
cp -r proxy_worker/protos "$BUILD_SOURCESDIRECTORY/deps/proxy_worker"
75+
fi
76+
77+
echo "Listing contents of deps directory:"
78+
ls -la $BUILD_SOURCESDIRECTORY/deps

eng/pack/scripts/rc_nix_deps.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
python -m venv .env
4+
source .env/bin/activate
5+
python -m pip install --upgrade pip
6+
7+
cd workers
8+
python -m pip install .
9+
python -m pip install grpcio~=1.70.0
10+
python -m pip install grpcio-tools~=1.70.0
11+
12+
python -m pip install . --no-compile --target "$BUILD_SOURCESDIRECTORY/deps"
13+
python -m pip install grpcio~=1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps"
14+
python -m pip install grpcio-tools~=1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps"
15+
16+
python -m pip install invoke
17+
cd tests
18+
python -m invoke -c test_setup build-protos
19+
20+
cd ..
21+
cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps"
22+
23+
version_minor=$(echo $1 | cut -d '.' -f 2)
24+
if [[ $version_minor -lt 13 ]]; then
25+
cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker"
26+
else
27+
cp -r proxy_worker/protos "$BUILD_SOURCESDIRECTORY/deps/proxy_worker"
28+
fi

0 commit comments

Comments
 (0)