Skip to content

Commit ca87969

Browse files
authored
Merge branch 'dev' into hallvictoria/allow-nill-data
2 parents 40c105b + 51758a2 commit ca87969

File tree

37 files changed

+3154
-124
lines changed

37 files changed

+3154
-124
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Python Worker Deferred Bindings Feature Request
2+
description: File a Deferred Bindings bug report
3+
title: "[Bug] Bug Title Here"
4+
labels: ["python", "bug", "deferred-bindings"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
This form will help you to fill in a bug report for the Azure Functions Python Worker Deferred Bindings feature.
10+
11+
- type: textarea
12+
id: expected-behavior
13+
attributes:
14+
label: Expected Behavior
15+
description: A clear and concise description of what you expected to happen.
16+
placeholder: What should have occurred?
17+
18+
- type: textarea
19+
id: actual-behavior
20+
attributes:
21+
label: Actual Behavior
22+
description: A clear and concise description of what actually happened.
23+
placeholder: What went wrong?
24+
25+
- type: textarea
26+
id: reproduction-steps
27+
attributes:
28+
label: Steps to Reproduce
29+
description: Please provide detailed step-by-step instructions on how to reproduce the bug.
30+
placeholder: |
31+
1. Go to the [specific page or section] in the application.
32+
2. Click on [specific button or link].
33+
3. Scroll down to [specific location].
34+
4. Observe [describe what you see, e.g., an error message or unexpected behavior].
35+
5. Include any additional steps or details that may be relevant.
36+
37+
- type: textarea
38+
id: code-snippet
39+
attributes:
40+
label: Relevant code being tried
41+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
42+
render: shell
43+
44+
- type: textarea
45+
id: logs
46+
attributes:
47+
label: Relevant log output
48+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
49+
render: shell
50+
51+
- type: textarea
52+
id: requirements
53+
attributes:
54+
label: requirements.txt file
55+
description: Please copy and paste your requirements.txt file. This will be automatically formatted into code, so no need for backticks.
56+
render: shell
57+
58+
- type: dropdown
59+
id: environment
60+
attributes:
61+
label: Where are you facing this problem?
62+
default: 0
63+
options:
64+
- Local - Core Tools
65+
- Production Environment (explain below)
66+
67+
- type: textarea
68+
id: additional-info
69+
attributes:
70+
label: Additional Information
71+
description: Add any other information about the problem here.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Python Worker Deferred Bindings Feature Request
2+
description: File a Deferred Bindings Feature report
3+
title: "Request a feature"
4+
labels: ["python", "feature", "deferred-bindings"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
This form will help you to fill in a feature request for the Azure Functions Python Worker Deferred Bindings feature.
10+
11+
- type: textarea
12+
id: binding-type
13+
attributes:
14+
label: Binding Type
15+
description: Add information about the binding type.
16+
placeholder: Is this on an existing binding or new binding?
17+
18+
- type: textarea
19+
id: expected-behavior
20+
attributes:
21+
label: Expected Behavior
22+
description: A clear and concise description of what you expected to happen.
23+
placeholder: What should have occurred?
24+
25+
- type: textarea
26+
id: code-snippet
27+
attributes:
28+
label: Relevant sample code snipped
29+
description: Please copy and paste any relevant code snippet of how you want the feature to be used. (This will be automatically formatted into code, so no need for backticks)
30+
render: shell
31+
32+
- type: textarea
33+
id: additional-info
34+
attributes:
35+
label: Additional Information
36+
description: Add any other information about the problem here.

.github/Scripts/e2e-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/usr/bin/env bash
22
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
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
4+
python -m pytest -q -n auto --dist loadfile --reruns 4 --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/extension_tests/deferred_bindings_tests

.github/workflows/ci_consumption_workflow.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ jobs:
3232
python-version: ${{ matrix.python-version }}
3333
- name: Install dependencies
3434
run: |
35+
python -m pip install --upgrade pip
3536
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre
3637
python -m pip install -U -e .[dev]
38+
if [[ "${{ matrix.python-version }}" != "3.7" ]]; then
39+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --pre -U -e .[test-http-v2]
40+
fi
3741
python setup.py build
3842
- name: Running 3.7 Tests
3943
if: matrix.python-version == 3.7

.github/workflows/ci_e2e_workflow.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ on:
1515
pull_request:
1616
branches: [dev, main, release/*]
1717
schedule:
18-
# Monday to Thursday 3 AM CST build
18+
# Monday to Friday 3 AM CST build
1919
# * is a special character in YAML so you have to quote this string
20-
- cron: "0 8 * * 1,2,3,4"
20+
- cron: "0 8 * * 1,2,3,4,5"
2121

2222
jobs:
2323
build:
@@ -61,6 +61,13 @@ jobs:
6161
python -m pip install --upgrade pip
6262
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre
6363
python -m pip install -U -e .[dev]
64+
65+
if [[ "${{ matrix.python-version }}" != "3.7" ]]; then
66+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --pre -U -e .[test-http-v2]
67+
fi
68+
if [[ "${{ matrix.python-version }}" != "3.7" && "${{ matrix.python-version }}" != "3.8" ]]; then
69+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --pre -U -e .[test-deferred-bindings]
70+
fi
6471

6572
# Retry a couple times to avoid certificate issue
6673
retry 5 python setup.py build

.github/workflows/ci_ut_workflow.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ jobs:
5858
5959
python -m pip install --upgrade pip
6060
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre
61+
6162
python -m pip install -U -e .[dev]
63+
if [[ "${{ matrix.python-version }}" != "3.7" ]]; then
64+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --pre -U -e .[test-http-v2]
65+
fi
6266
6367
# Retry a couple times to avoid certificate issue
6468
retry 5 python setup.py build

.github/workflows/linter.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ jobs:
2626
name: Lint Code Base
2727
# Set the agent to run on
2828
runs-on: ubuntu-latest
29-
permissions: read-all
30-
29+
permissions:
30+
contents: read
31+
packages: read
32+
# To report GitHub Actions status checks
33+
statuses: write
3134
##################
3235
# Load all steps #
3336
##################
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "PR Title Enforcer"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions:
11+
pull-requests: read
12+
13+
jobs:
14+
main:
15+
name: Validate PR title
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: amannn/action-semantic-pull-request@v5
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

azure_functions_worker/bindings/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from .meta import has_implicit_output
99
from .meta import is_trigger_binding, load_binding_registry
1010
from .meta import from_incoming_proto, to_outgoing_proto, \
11-
to_outgoing_param_binding
11+
to_outgoing_param_binding, check_deferred_bindings_enabled, \
12+
get_deferred_raw_bindings
1213
from .out import Out
1314

1415

@@ -19,5 +20,6 @@
1920
'check_input_type_annotation', 'check_output_type_annotation',
2021
'has_implicit_output',
2122
'from_incoming_proto', 'to_outgoing_proto', 'TraceContext', 'RetryContext',
22-
'to_outgoing_param_binding'
23+
'to_outgoing_param_binding', 'check_deferred_bindings_enabled',
24+
'get_deferred_raw_bindings'
2325
)

azure_functions_worker/bindings/datumdef.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def from_typed_data(cls, td: protos.TypedData):
9393
val = td.collection_string
9494
elif tt == 'collection_sint64':
9595
val = td.collection_sint64
96+
elif tt == 'model_binding_data':
97+
val = td.model_binding_data
9698
elif tt is None:
9799
return None
98100
else:

0 commit comments

Comments
 (0)