Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions eng/templates/official/jobs/ci-core-tools-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ jobs:
AzureWebJobsEventHubConnectionString: $(LinuxEventHubConnectionString311)
AzureWebJobsServiceBusConnectionString: $(LinuxServiceBusConnectionString311)
AzureWebJobsSqlConnectionString: $(LinuxSqlConnectionString311)
AzureWebJobsEventGridTopicUri: $(LinuxEventGridTopicUriString311)
AzureWebJobsEventGridConnectionKey: $(LinuxEventGridConnectionKeyString311)
displayName: 'Running Python Language Worker E2E Tests'
2 changes: 0 additions & 2 deletions eng/templates/official/jobs/ci-custom-image-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@ jobs:
AzureWebJobsEventHubConnectionString: $(LinuxEventHubConnectionString311)
AzureWebJobsServiceBusConnectionString: $(LinuxServiceBusConnectionString311)
AzureWebJobsSqlConnectionString: $(LinuxSqlConnectionString311)
AzureWebJobsEventGridTopicUri: $(LinuxEventGridTopicUriString311)
AzureWebJobsEventGridConnectionKey: $(LinuxEventGridConnectionKeyString311)
workingDirectory: $(Build.SourcesDirectory)/${{ parameters.PROJECT_DIRECTORY }}
displayName: "Running Python DockerCustom tests"
8 changes: 0 additions & 8 deletions eng/templates/official/jobs/ci-docker-dedicated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,14 @@ jobs:
PYTHON_VERSION: '3.10'
STORAGE_CONNECTION: $(LinuxStorageConnectionString310)
SQL_CONNECTION: $(LinuxSqlConnectionString310)
EVENTGRID_URI: $(LinuxEventGridTopicUriString310)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString310)
Python311:
PYTHON_VERSION: '3.11'
STORAGE_CONNECTION: $(LinuxStorageConnectionString311)
SQL_CONNECTION: $(LinuxSqlConnectionString311)
EVENTGRID_URI: $(LinuxEventGridTopicUriString311)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString311)
Python312:
PYTHON_VERSION: '3.12'
STORAGE_CONNECTION: $(LinuxStorageConnectionString312)
SQL_CONNECTION: $(LinuxSqlConnectionString312)
EVENTGRID_URI: $(LinuxEventGridTopicUriString312)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString312)

steps:
- task: PipAuthenticate@1
Expand All @@ -54,7 +48,5 @@ jobs:
AzureWebJobsStorage: $(STORAGE_CONNECTION)
STORAGE_CONNECTION: $(STORAGE_CONNECTION)
AzureWebJobsSqlConnectionString: $(SQL_CONNECTION)
AzureWebJobsEventGridTopicUri: $(EVENTGRID_URI)
AzureWebJobsEventGridConnectionKey: $(EVENTGRID_CONNECTION)
workingDirectory: $(Build.SourcesDirectory)/${{ parameters.PROJECT_DIRECTORY }}
displayName: "Running $(PYTHON_VERSION) Docker Dedicated tests"
10 changes: 0 additions & 10 deletions eng/templates/official/jobs/ci-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,18 @@ jobs:
PYTHON_VERSION: '3.10'
STORAGE_CONNECTION: $(LinuxStorageConnectionString310)
SQL_CONNECTION: $(LinuxSqlConnectionString310)
EVENTGRID_URI: $(LinuxEventGridTopicUriString310)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString310)
Python311:
PYTHON_VERSION: '3.11'
STORAGE_CONNECTION: $(LinuxStorageConnectionString311)
SQL_CONNECTION: $(LinuxSqlConnectionString311)
EVENTGRID_URI: $(LinuxEventGridTopicUriString311)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString311)
Python312:
PYTHON_VERSION: '3.12'
STORAGE_CONNECTION: $(LinuxStorageConnectionString312)
SQL_CONNECTION: $(LinuxSqlConnectionString312)
EVENTGRID_URI: $(LinuxEventGridTopicUriString312)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString312)
Python313:
PYTHON_VERSION: '3.13'
STORAGE_CONNECTION: $(LinuxStorageConnectionString37)
SQL_CONNECTION: $(LinuxSqlConnectionString37)
EVENTGRID_URI: $(LinuxEventGridTopicUriString37)
EVENTGRID_CONNECTION: $(LinuxEventGridConnectionKeyString37)
Python314:
PYTHON_VERSION: '3.14'
STORAGE_CONNECTION: $(LinuxStorageConnectionString38)
Expand Down Expand Up @@ -204,8 +196,6 @@ jobs:
AzureWebJobsStorage: $(STORAGE_CONNECTION)
STORAGE_CONNECTION: $(STORAGE_CONNECTION)
AzureWebJobsSqlConnectionString: $(SQL_CONNECTION)
AzureWebJobsEventGridTopicUri: $(EVENTGRID_URI)
AzureWebJobsEventGridConnectionKey: $(EVENTGRID_CONNECTION)
skipTest: $(skipTest)
PYAZURE_WEBHOST_DEBUG: true
displayName: "Running $(PYTHON_VERSION) Python E2E Tests"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import json
import logging
from datetime import datetime

import azure.functions as func

from azure_functions_worker import logging

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)


@app.function_name(name="eventGridTrigger")
@app.function_name(name="eventgrid_trigger")
@app.event_grid_trigger(arg_name="event")
@app.blob_output(arg_name="$return",
path="python-worker-tests/test-eventgrid-triggered.txt",
connection="STORAGE_CONNECTION")
connection="AzureWebJobsStorage")
def event_grid_trigger(event: func.EventGridEvent) -> str:
logging.info("Event grid function is triggered!")
return json.dumps({
Expand Down Expand Up @@ -52,32 +51,11 @@ def eventgrid_output_binding(
return func.HttpResponse(r_value)


@app.function_name(name="eventgrid_output_binding_message_to_blobstore")
@app.queue_trigger(arg_name="msg", queue_name="test-event-grid-storage-queue",
connection="STORAGE_CONNECTION")
@app.blob_output(arg_name="$return",
path="python-worker-tests/test-eventgrid-output-binding.txt",
connection="STORAGE_CONNECTION")
def eventgrid_output_binding_message_to_blobstore(
msg: func.QueueMessage) -> bytes:
return msg.get_body()


@app.function_name(name="eventgrid_output_binding_success")
@app.route(route="eventgrid_output_binding_success")
@app.blob_input(arg_name="file",
path="python-worker-tests/test-eventgrid-output-binding.txt",
connection="STORAGE_CONNECTION")
def eventgrid_output_binding_success(
req: func.HttpRequest, file: func.InputStream) -> str:
return file.read().decode('utf-8')


@app.function_name(name="get_eventgrid_triggered")
@app.route(route="get_eventgrid_triggered")
@app.blob_input(arg_name="file",
path="python-worker-tests/test-eventgrid-triggered.txt",
connection="STORAGE_CONNECTION")
connection="AzureWebJobsStorage")
def get_eventgrid_triggered(
req: func.HttpRequest, file: func.InputStream) -> str:
return file.read().decode('utf-8')
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import json
import logging
from datetime import datetime

import azure.functions as func

from azure_functions_worker import logging

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)


@app.function_name(name="eventGridTrigger")
@app.function_name(name="eventgrid_trigger")
@app.event_grid_trigger(arg_name="event", type="eventGridTrigger")
@app.generic_output_binding(
arg_name="$return",
type="blob",
connection="STORAGE_CONNECTION",
connection="AzureWebJobsStorage",
path="python-worker-tests/test-eventgrid-triggered.txt")
def event_grid_trigger(event: func.EventGridEvent) -> str:
logging.info("Event grid function is triggered!")
Expand Down Expand Up @@ -57,35 +56,6 @@ def eventgrid_output_binding(
return func.HttpResponse(r_value)


@app.function_name(name="eventgrid_output_binding_message_to_blobstore")
@app.generic_trigger(arg_name="msg",
type="queueTrigger",
queue_name="test-event-grid-storage-queue",
connection="STORAGE_CONNECTION")
@app.generic_output_binding(
arg_name="$return",
type="blob",
connection="STORAGE_CONNECTION",
path="python-worker-tests/test-eventgrid-output-binding.txt")
def eventgrid_output_binding_message_to_blobstore(
msg: func.QueueMessage) -> bytes:
return msg.get_body()


@app.function_name(name="eventgrid_output_binding_success")
@app.generic_trigger(arg_name="req", type="httpTrigger",
route="eventgrid_output_binding_success")
@app.generic_output_binding(arg_name="$return", type="http")
@app.generic_input_binding(
arg_name="file",
type="blob",
path="python-worker-tests/test-eventgrid-output-binding.txt",
connection="STORAGE_CONNECTION")
def eventgrid_output_binding_success(
req: func.HttpRequest, file: func.InputStream) -> str:
return file.read().decode('utf-8')


@app.function_name(name="get_eventgrid_triggered")
@app.generic_trigger(arg_name="req", type="httpTrigger",
route="get_eventgrid_triggered")
Expand All @@ -94,7 +64,7 @@ def eventgrid_output_binding_success(
arg_name="file",
type="blob",
path="python-worker-tests/test-eventgrid-triggered.txt",
connection="STORAGE_CONNECTION")
connection="AzureWebJobsStorage")
def get_eventgrid_triggered(
req: func.HttpRequest, file: func.InputStream) -> str:
return file.read().decode('utf-8')
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "blob",
"direction": "out",
"name": "$return",
"connection": "STORAGE_CONNECTION",
"connection": "AzureWebJobsStorage",
"path": "python-worker-tests/test-eventgrid-triggered.txt"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "blob",
"direction": "in",
"name": "file",
"connection": "STORAGE_CONNECTION",
"connection": "AzureWebJobsStorage",
"path": "python-worker-tests/test-eventgrid-triggered.txt"
},
{
Expand Down
Loading
Loading