-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
176 changed files
with
1,650 additions
and
1,111 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
# <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker | ||
|
||
| Branch | Status | CodeCov | Unittests | E2E tests | | ||
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------| | ||
| main | [![Build Status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/Azure.azure-functions-python-worker?branchName=main)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=57&branchName=main) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/main/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | ![CI Unit tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20Unit%20tests/badge.svg?branch=main) | ![CI E2E tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20E2E%20tests/badge.svg?branch=main) | | ||
| dev | [![Build Status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/Azure.azure-functions-python-worker?branchName=dev)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=57&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | ![CI Unit tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20Unit%20tests/badge.svg?branch=dev) | ![CI E2E tests](https://github.com/Azure/azure-functions-python-worker/workflows/CI%20E2E%20tests/badge.svg?branch=dev) | | ||
| Branch | Build Status | CodeCov | Test Status | | ||
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| dev | [![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-worker) | [![Test Status](https://img.shields.io/azure-devops/build/azfunc/public/658/dev)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=658&branchName=dev) | | ||
|
||
Python support for Azure Functions is based on Python 3.6, 3.7, 3.8, 3.9, and 3.10 serverless hosting on Linux and the Functions 2.0, 3.0 and 4.0 runtime. | ||
Python support for Azure Functions is based on Python 3.8, 3.9, 3.10, 3.11, and 3.12 serverless hosting on Linux and the Functions 4.0 runtime. | ||
|
||
Here is the current status of Python in Azure Functions: | ||
|
||
What are the supported Python versions? | ||
|
||
| Azure Functions Runtime | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 | | ||
|----------------------------------|------------|------------|------------|------------|-------------|-------------| | ||
| Azure Functions 2.0 (deprecated) | ✔ | ✔ | - | - | - | - | | ||
| Azure Functions 3.0 (deprecated) | ✔ | ✔ | ✔ | ✔ | - | - | | ||
| Azure Functions 4.0 | - | - | ✔ | ✔ | ✔ | ✔ | | ||
| Azure Functions Runtime | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 | | ||
|----------------------------------|------------|------------|-------------|-------------|-------------| | ||
| Azure Functions 3.0 (deprecated) | ✔ | ✔ | - | - | - | | ||
| Azure Functions 4.0 | ✔ | ✔ | ✔ | ✔ | ✔ | | ||
|
||
For information about Azure Functions Runtime, please refer to [Azure Functions runtime versions overview](https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions) page. | ||
|
||
### What's available? | ||
|
||
- Build, test, debug and publish using Azure Functions Core Tools (CLI) or Visual Studio Code | ||
- Deploy Python Function project onto consumption, dedicated, or elastic premium plan. | ||
- Deploy Python Function project in a custom docker image onto dedicated, or elastic premium plan. | ||
- Triggers / Bindings : HTTP, Blob, Queue, Timer, Cosmos DB, Event Grid, Event Hubs and Service Bus | ||
- Build, test, debug, and publish using Azure Functions Core Tools (CLI) or Visual Studio Code | ||
- Deploy Python Function project onto consumption, dedicated, elastic premium, or flex consumption plan. | ||
- Deploy Python Function project in a custom docker image onto dedicated or elastic premium plan. | ||
- Triggers / Bindings : Blob, Cosmos DB, Event Grid, Event Hub, HTTP, Kafka, MySQL, Queue, ServiceBus, SQL, Timer, and Warmup | ||
- Triggers / Bindings : Custom binding support | ||
|
||
What's coming? | ||
### What's new? | ||
|
||
- [Durable Functions For Python](https://github.com/Azure/azure-functions-durable-python) | ||
- [SDK Type Bindings for Blob](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-sdk-type-bindings-for-azure-blob-storage-with/ba-p/4146744) | ||
- [HTTP Streaming](https://techcommunity.microsoft.com/t5/azure-compute-blog/azure-functions-support-for-http-streams-in-python-is-now-in/ba-p/4146697) | ||
|
||
### Get Started | ||
|
||
|
@@ -72,4 +71,4 @@ provided by the bot. You will only need to do this once across all repos using o | |
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
VERSION = '4.33.0' | ||
VERSION = '4.34.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
trigger: none # ensure this is not ran as a CI build | ||
|
||
pr: | ||
branches: | ||
include: | ||
- dev | ||
- release/* | ||
|
||
schedules: | ||
- cron: "0 8 * * 1,2,3,4,5" | ||
displayName: Monday to Friday 3 AM CST build | ||
branches: | ||
include: | ||
- dev | ||
always: true | ||
|
||
resources: | ||
repositories: | ||
- repository: 1es | ||
type: git | ||
name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
ref: refs/tags/release | ||
- repository: eng | ||
type: git | ||
name: engineering | ||
ref: refs/tags/release | ||
|
||
variables: | ||
- template: /ci/variables/build.yml@eng | ||
- template: /ci/variables/cfs.yml@eng | ||
- template: /eng/templates/utils/variables.yml@self | ||
|
||
extends: | ||
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es | ||
parameters: | ||
pool: | ||
name: 1es-pool-azfunc | ||
image: 1es-windows-2022 | ||
os: windows | ||
|
||
stages: | ||
- stage: RunEmulatorTests | ||
jobs: | ||
- template: /eng/templates/jobs/ci-emulator-tests.yml@self | ||
parameters: | ||
PoolName: 1es-pool-azfunc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
jobs: | ||
- job: "TestPython" | ||
displayName: "Run Python Emulator Tests" | ||
|
||
pool: | ||
name: ${{ parameters.PoolName }} | ||
image: 1es-ubuntu-22.04 | ||
os: linux | ||
|
||
strategy: | ||
matrix: | ||
Python37: | ||
PYTHON_VERSION: '3.7' | ||
Python38: | ||
PYTHON_VERSION: '3.8' | ||
Python39: | ||
PYTHON_VERSION: '3.9' | ||
Python310: | ||
PYTHON_VERSION: '3.10' | ||
Python311: | ||
PYTHON_VERSION: '3.11' | ||
Python312: | ||
PYTHON_VERSION: '3.12' | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: $(PYTHON_VERSION) | ||
- task: UseDotNet@2 | ||
displayName: 'Install .NET 8' | ||
inputs: | ||
version: 8.0.x | ||
- bash: | | ||
chmod +x eng/scripts/install-dependencies.sh | ||
chmod +x eng/scripts/test-setup.sh | ||
eng/scripts/install-dependencies.sh $(PYTHON_VERSION) | ||
eng/scripts/test-setup.sh | ||
displayName: 'Install dependencies and the worker' | ||
condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: 'Download Python SDK Artifact' | ||
inputs: | ||
buildType: specific | ||
artifactName: 'azure-functions' | ||
project: 'internal' | ||
definition: 679 | ||
buildVersionToDownload: latest | ||
targetPath: '$(Pipeline.Workspace)/PythonSdkArtifact' | ||
condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) | ||
- bash: | | ||
chmod +x eng/scripts/test-sdk.sh | ||
chmod +x eng/scripts/test-setup.sh | ||
eng/scripts/test-sdk.sh $(Pipeline.Workspace) $(PYTHON_VERSION) | ||
eng/scripts/test-setup.sh | ||
displayName: 'Install test python sdk, dependencies and the worker' | ||
condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: 'Download Python Extension Artifact' | ||
inputs: | ||
buildType: specific | ||
artifactName: $(PYTHONEXTENSIONNAME) | ||
project: 'internal' | ||
definition: 798 | ||
buildVersionToDownload: latest | ||
targetPath: '$(Pipeline.Workspace)/PythonExtensionArtifact' | ||
condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) | ||
- bash: | | ||
chmod +x eng/scripts/test-setup.sh | ||
chmod +x eng/scripts/test-extensions.sh | ||
eng/scripts/test-extensions.sh $(Pipeline.Workspace) $(PYTHON_VERSION) | ||
eng/scripts/test-setup.sh | ||
displayName: 'Install test python extension, dependencies and the worker' | ||
condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) | ||
- bash: | | ||
docker compose -f tests/emulator_tests/utils/eventhub/docker-compose.yml pull | ||
docker compose -f tests/emulator_tests/utils/eventhub/docker-compose.yml up -d | ||
displayName: 'Install Azurite and Start EventHub Emulator' | ||
- bash: | | ||
python -m pytest -q -n auto --dist loadfile --reruns 4 --ignore=tests/emulator_tests/test_servicebus_functions.py tests/emulator_tests | ||
env: | ||
AzureWebJobsStorage: "UseDevelopmentStorage=true" | ||
AzureWebJobsEventHubConnectionString: "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;" | ||
displayName: "Running $(PYTHON_VERSION) Python Linux Emulator Tests" | ||
- bash: | | ||
# Stop and remove EventHub Emulator container to free up the port | ||
docker stop eventhubs-emulator | ||
docker container rm --force eventhubs-emulator | ||
docker compose -f tests/emulator_tests/utils/servicebus/docker-compose.yml pull | ||
docker compose -f tests/emulator_tests/utils/servicebus/docker-compose.yml up -d | ||
env: | ||
AzureWebJobsSQLPassword: $(AzureWebJobsSQLPassword) | ||
displayName: 'Install Azurite and Start ServiceBus Emulator' | ||
- bash: | | ||
python -m pytest -q -n auto --dist loadfile --reruns 4 tests/emulator_tests/test_servicebus_functions.py | ||
env: | ||
AzureWebJobsStorage: "UseDevelopmentStorage=true" | ||
AzureWebJobsServiceBusConnectionString: "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;" | ||
displayName: "Running $(PYTHON_VERSION) Python ServiceBus Linux Emulator Tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.