Skip to content

Commit 16fd981

Browse files
authored
Merge branch 'dev' into log_thread
2 parents d6a9fb6 + 2e91fa1 commit 16fd981

File tree

275 files changed

+7729
-1936
lines changed

Some content is hidden

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

275 files changed

+7729
-1936
lines changed

.ci/e2e_integration_test/pipeline.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pool:
1111

1212
variables:
1313
DOTNET_VERSION: '3.1.x'
14-
DOTNET_VERSION_5: '5.0.x'
1514
DOTNET_VERSION_6: '6.x'
1615
PYTHON_VERSION: '3.9'
1716

@@ -26,11 +25,6 @@ steps:
2625
inputs:
2726
packageType: 'sdk'
2827
version: $(DOTNET_VERSION)
29-
- task: UseDotNet@2
30-
displayName: 'Install DotNet 5'
31-
inputs:
32-
packageType: 'sdk'
33-
version: $(DOTNET_VERSION_5)
3428
- task: UseDotNet@2
3529
displayName: 'Install DotNet 6'
3630
inputs:
@@ -42,6 +36,7 @@ steps:
4236
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
4337
AzureWebJobsEventHubConnectionString: $(AzureWebJobsEventHubConnectionString)
4438
AzureWebJobsServiceBusConnectionString: $(AzureWebJobsServiceBusConnectionString)
39+
AzureWebJobsSqlConnectionString: $(AzureWebJobsSqlConnectionString)
4540
AzureWebJobsEventGridTopicUri: $(AzureWebJobsEventGridTopicUri)
4641
AzureWebJobsEventGridConnectionKey: $(AzureWebJobsEventGridConnectionKey)
4742
PythonVersion: $(PYTHON_VERSION)

.ci/e2e_integration_test/start-e2e.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Write-Host "--------------------------------------------------------------------
8888
Write-Host "Preparing E2E integration tests..." -ForegroundColor Green
8989
Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green
9090
python -m pip install -U pip
91-
pip install -e .[dev]
91+
python -m pip install -U -e .[dev]
9292
python setup.py build
9393
python setup.py extension
9494
Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green
@@ -97,5 +97,5 @@ Write-Host "--------------------------------------------------------------------
9797
Write-Host "Running E2E integration tests..." -ForegroundColor Green
9898
Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green
9999
$env:CORE_TOOLS_EXE_PATH = "$funcExePath"
100-
pytest --junitxml=e2e-integration-test-report.xml --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml --cov-report html
100+
python -m pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend
101101
Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green

.ci/linux_devops_e2e_tests.sh

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export AzureWebJobsStorage=$LINUXSTORAGECONNECTIONSTRING
55
export AzureWebJobsCosmosDBConnectionString=$LINUXCOSMOSDBCONNECTIONSTRING
66
export AzureWebJobsEventHubConnectionString=$LINUXEVENTHUBCONNECTIONSTRING
77
export AzureWebJobsServiceBusConnectionString=$LINUXSERVICEBUSCONNECTIONSTRING
8+
export AzureWebJobsSqlConnectionString=$LINUXSQLCONNECTIONSTRING
89
export AzureWebJobsEventGridTopicUri=$LINUXEVENTGRIDTOPICURI
910
export AzureWebJobsEventGridConnectionKey=$LINUXEVENTGRIDTOPICCONNECTIONKEY
1011

.ci/perf_tests/dockerfiles/perf_tests.Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PYTHON_VERSION=3.8
1+
ARG PYTHON_VERSION=3.11
22

33
FROM mcr.microsoft.com/azure-functions/python:4-python$PYTHON_VERSION
44

@@ -15,7 +15,8 @@ ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
1515
FUNCTIONS_WORKER_SHARED_MEMORY_DATA_TRANSFER_ENABLED=1
1616

1717
RUN apt-get --quiet update && \
18-
apt-get install --quiet -y git && \
18+
apt-get install --quiet -y git procps && \
19+
# Procps is required for displaying worker and profiling processes info
1920
cd /home && \
2021
git clone https://github.com/vrdmr/AzFunctionsPythonPerformance.git && \
2122
mkdir -p /home/site/wwwroot/ && \

.ci/perf_tests/dockerfiles/perf_tests_3.6.Dockerfile

-25
This file was deleted.

.ci/perf_tests/dockerfiles/perf_tests_3.7.Dockerfile

-25
This file was deleted.

.ci/perf_tests/dockerfiles/perf_tests_3.9.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ VOLUME ["/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_work
194194
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 && \
195195
echo "deb https://dl.bintray.com/loadimpact/deb stable main" | tee -a /etc/apt/sources.list && \
196196
apt-get update && \
197-
apt-get install -y git k6 && \
197+
apt-get install -y git k6 procps && \
198+
# Procps is required for displaying worker and profiling processes info
198199
cd /home && \
199200
git clone https://github.com/vrdmr/AzFunctionsPythonPerformance.git && \
200201
mkdir -p /home/site/wwwroot/ && \

.ci/perf_tests/k6scripts/SyncHttpTriggerHelloWorld.js renamed to .ci/perf_tests/k6scripts/SyncHelloWorld.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export let options = {
3535

3636
// Main function
3737
export default function () {
38-
let response = http.get(`${PROTOCOL}://${HOSTNAME}:${PORT}/api/SyncHttpTriggerHelloWorld`);
38+
let response = http.get(`${PROTOCOL}://${HOSTNAME}:${PORT}/api/SyncHelloWorld`);
3939

4040
// check() returns false if any of the specified conditions fail
4141
let checkRes = check(response, {
@@ -45,4 +45,4 @@ export default function () {
4545

4646
// We reverse the check() result since we want to count the failures
4747
failureRate.add(!checkRes);
48-
}
48+
}

.devcontainer/Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/python-3/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
4+
ARG VARIANT="3.9"
5+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
6+
7+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8+
ARG NODE_VERSION="none"
9+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10+
11+
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
12+
# COPY requirements.txt /tmp/pip-tmp/
13+
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
14+
# && rm -rf /tmp/pip-tmp
15+
16+
# [Optional] Uncomment this section to install additional OS packages.
17+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
18+
# && apt-get -y install --no-install-recommends <your-package-list-here>
19+
20+
# [Optional] Uncomment this line to install global node packages.
21+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/python-3
3+
{
4+
"name": "Python 3",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"context": "..",
8+
"args": {
9+
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7
10+
// Append -bullseye or -buster to pin to an OS version.
11+
// Use -bullseye variants on local on arm64/Apple Silicon.
12+
"VARIANT": "3.9",
13+
// Options
14+
"NODE_VERSION": "none"
15+
}
16+
},
17+
18+
// Set *default* container specific settings.json values on container create.
19+
"settings": {
20+
"python.defaultInterpreterPath": "/usr/local/bin/python",
21+
"python.linting.enabled": true,
22+
"python.linting.pylintEnabled": true,
23+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
24+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
25+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
26+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
27+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
28+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
29+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
30+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
31+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
32+
"python.testing.pytestArgs": [
33+
"tests/unittests"
34+
],
35+
"python.testing.unittestEnabled": false,
36+
"python.testing.pytestEnabled": true
37+
},
38+
39+
// Add the IDs of extensions you want installed when the container is created.
40+
"extensions": [
41+
"ms-python.python",
42+
"ms-python.vscode-pylance"
43+
],
44+
45+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
46+
// "forwardPorts": [],
47+
48+
// Use 'postCreateCommand' to run commands after the container is created.
49+
"postCreateCommand": "sudo python -m pip install -U pip && sudo python -m pip install -U -e .[dev] && sudo python setup.py webhost",
50+
51+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
52+
"remoteUser": "vscode",
53+
54+
"features": {
55+
"dotnet": "latest"
56+
}
57+
}

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ exclude = .git, __pycache__, build, dist, .eggs, .github, .local, docs/,
1212
tests/unittests/broken_functions/syntax_error/main.py,
1313
.env*, .vscode, venv*, *.venv*
1414

15-
max-line-length = 80
15+
max-line-length = 88
+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
title: "[Survey] "
2+
labels: ["Survey"]
3+
body:
4+
- type: checkboxes
5+
attributes:
6+
label: What stack do you primarily use?
7+
options:
8+
- label: Python
9+
- label: Node
10+
- label: PowerShell
11+
- label: .NET
12+
- label: Java
13+
- label: Go
14+
- label: Other (Please specify below)
15+
- type: textarea
16+
id: role
17+
attributes:
18+
label: What is your current role in which you use Azure Functions?
19+
description: Software Developer, Machine Learning Engineer, Full Stack Engineer, etc.
20+
render: bash
21+
validations:
22+
required: false
23+
- type: textarea
24+
id: scenarios
25+
attributes:
26+
label: What are the use cases and scenarios in which you use Azure Functions today?
27+
description: Describe how you are using Azure Functions, and expected end goals.
28+
render: bash
29+
validations:
30+
required: false
31+
- type: textarea
32+
id: pain-points
33+
attributes:
34+
label: What are the pain points you have experienced using Azure Functions?
35+
render: bash
36+
validations:
37+
required: false
38+
- type: textarea
39+
id: improvements
40+
attributes:
41+
label: Please share any suggestions for product improvements.
42+
render: bash
43+
validations:
44+
required: false
45+
- type: textarea
46+
id: tooling
47+
attributes:
48+
label: What developer tools do you use?
49+
description: Visual Studio Code, Command Line, etc.
50+
render: bash
51+
validations:
52+
required: false
53+
- type: checkboxes
54+
attributes:
55+
label: Would you be interested in meeting with the Azure Functions team to provide additional feedback?
56+
options:
57+
- label: "Yes"
58+
- label: "No"
59+
- type: textarea
60+
id: comments
61+
attributes:
62+
label: Please provide any other comments or feedback here, as well as your email if you indicated 'Yes' to being contacted from the Azure Functions team.
63+
render: bash
64+
validations:
65+
required: false
66+
- type: markdown
67+
attributes:
68+
value: |
69+
"Thank you for your feedback! For any specific questions or to report a bug, please create an issue [here](https://github.com/Azure/azure-functions-python-worker/issues)."

.github/Scripts/e2e-tests.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
python -m pytest -q -n auto --dist loadfile --reruns 4 --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend/test_worker_process_count_functions.py tests/endtoend/test_threadpool_thread_count_functions.py
3+
python -m pytest -q -n auto --dist loadfile --reruns 4 --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append --ignore=tests/endtoend/test_worker_process_count_functions.py --ignore=tests/endtoend/test_threadpool_thread_count_functions.py tests/endtoend

0 commit comments

Comments
 (0)