Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker e2e test fixes #1192

Merged
merged 40 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
87d5f38
Docker e2e test fixes
Mar 1, 2023
232ae03
Installing libraries in the container
Mar 1, 2023
808d433
Fixing broken tests
Mar 13, 2023
e014941
Skipping check log tests
Mar 13, 2023
370a7e1
Skipping dependency isolation tests for docker tests
Mar 14, 2023
2092218
Adding worker indexing flag
Mar 29, 2023
bf6e0fa
Adding os.env to the docker container
Mar 30, 2023
cee3ce8
Added env variables to docker container
Mar 31, 2023
305ad08
None check for env
Apr 3, 2023
8779b32
Added retries
Apr 3, 2023
d0a39ba
Removing unused variable
Apr 3, 2023
c6e028c
Refactored and fixed flaky tests
Apr 4, 2023
2c7814e
Skipping durable and table tests
Apr 5, 2023
fb68c37
Installing azure-eventhub in the docker container
Apr 6, 2023
b3510cd
Fix eventhub function.json
Apr 6, 2023
23dc5e6
Added eventhub library
Apr 6, 2023
c6dff72
Docker comment workflow update
Apr 9, 2023
d7ed2c6
updated docker workflow to check for comment
Apr 9, 2023
b579a60
Update github workflow
Apr 11, 2023
b8b7c23
Testing issue_comment
Apr 11, 2023
f299113
Issue comment test
Apr 12, 2023
9be0922
Issue comment test
Apr 12, 2023
37f2567
Reverted workflow changes
Apr 17, 2023
97dfe70
Installing libraries for eventhub batch
Apr 17, 2023
6eb9314
Added retries to workflow
Apr 17, 2023
0170d02
Updated eventhub testscase
Apr 17, 2023
52da636
Fixing env variables
Apr 18, 2023
e60cb6a
Merge remote-tracking branch 'origin/dev' into gaaguiar/e2e_docker_te…
Apr 18, 2023
5dc59e6
Removing xdist
Apr 18, 2023
c6faaba
Fixed eventhub tests
Apr 19, 2023
b108e1e
Fixing eventhub with longer wait and retries
Apr 19, 2023
b4f0a64
Addressed comments
Apr 19, 2023
1b7a5b9
Skipping durable tests
Apr 19, 2023
3fa6b1f
Added custom image env
Apr 19, 2023
f283199
Removing env variables
Apr 20, 2023
58411f2
Merge remote-tracking branch 'origin/dev' into gaaguiar/e2e_docker_te…
Apr 20, 2023
4e8530f
Running setup build
Apr 20, 2023
5fe55b9
Updated comments
Apr 21, 2023
f5d41ec
Minor fixes and refactoring
Apr 27, 2023
2539342
Addind setup build to consumption tests
Apr 27, 2023
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
8 changes: 4 additions & 4 deletions .github/workflows/ci_consumption_workflow.yml
gavin-aguiar marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ jobs:
if: matrix.python-version == 3.7
env:
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString37 }}
run: python -m pytest -n auto --instafail tests/consumption_tests
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
- name: Running 3.8 Tests
if: matrix.python-version == 3.8
env:
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString38 }}
run: python -m pytest -n auto --instafail tests/consumption_tests
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
- name: Running 3.9 Tests
if: matrix.python-version == 3.9
env:
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString39 }}
run: python -m pytest -n auto --instafail tests/consumption_tests
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
- name: Running 3.10 Tests
if: matrix.python-version == 3.10
env:
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }}
run: python -m pytest -n auto --instafail tests/consumption_tests
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
20 changes: 7 additions & 13 deletions .github/workflows/ci_docker_con_workflow.yml
vrdmr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: CI Docker Consumption tests
on:
workflow_dispatch:
schedule:
# Monday to Thursday 1 AM PDT build
# Monday to Thursday 2 AM PDT build
# * is a special character in YAML so you have to quote this string
- cron: "0 8 * * 1,2,3,4"
- cron: "0 9 * * *"

jobs:
build:
Expand All @@ -30,6 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U -e .[dev]
python setup.py build
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
env:
Expand All @@ -41,7 +42,7 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
python -m pytest --reruns 4 -vv --instafail tests/endtoend
- name: Running 3.8 Tests
if: matrix.python-version == 3.8
env:
Expand All @@ -53,7 +54,7 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
python -m pytest --reruns 4 -vv --instafail tests/endtoend
- name: Running 3.9 Tests
if: matrix.python-version == 3.9
env:
Expand All @@ -65,7 +66,7 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
python -m pytest --reruns 4 -vv --instafail tests/endtoend
- name: Running 3.10 Tests
if: matrix.python-version == 3.10
env:
Expand All @@ -77,11 +78,4 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
- name: Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml # optional
flags: unittests # optional
name: codecov # optional
fail_ci_if_error: false # optional (default = false)
python -m pytest --reruns 4 -vv --instafail tests/endtoend
19 changes: 6 additions & 13 deletions .github/workflows/ci_docker_ded_workflow.yml
vrdmr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# This workflow will run all tests in endtoend/tests in a docker container using the latest dedicated image


name: CI Docker Dedicated tests

on:
workflow_dispatch:
schedule:
# Monday to Thursday 1 AM PDT build
# * is a special character in YAML so you have to quote this string
- cron: "0 8 * * 1,2,3,4"
- cron: "0 8 * * *"

jobs:
build:
Expand All @@ -31,6 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U -e .[dev]
python setup.py build
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
env:
Expand All @@ -42,7 +42,7 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
python -m pytest --reruns 4 -vv --instafail tests/endtoend
- name: Running 3.8 Tests
if: matrix.python-version == 3.8
env:
Expand All @@ -54,7 +54,7 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
python -m pytest --reruns 4 -vv --instafail tests/endtoend
- name: Running 3.9 Tests
if: matrix.python-version == 3.9
env:
Expand All @@ -66,7 +66,7 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
python -m pytest --reruns 4 -vv --instafail tests/endtoend
- name: Running 3.10 Tests
if: matrix.python-version == 3.10
env:
Expand All @@ -78,11 +78,4 @@ jobs:
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }}
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }}
run: |
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
- name: Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml # optional
flags: unittests # optional
name: codecov # optional
fail_ci_if_error: false # optional (default = false)
python -m pytest --reruns 4 -vv --instafail tests/endtoend
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ignore:
- "tests/utils/testutils.py"
- "tests/utils/testutils_lc.py"
- "tests/utils/"

gavin-aguiar marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import azure.functions as func

app = func.FunctionApp()
app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
gavin-aguiar marked this conversation as resolved.
Show resolved Hide resolved


@app.function_name(name="blob_trigger")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import azure.functions as func

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


@app.function_name(name="blob_trigger")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
3 changes: 2 additions & 1 deletion tests/endtoend/blob_functions/get_blob_str/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
3 changes: 2 additions & 1 deletion tests/endtoend/blob_functions/put_blob_str/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"type": "httpTrigger",
"direction": "in",
"name": "req"
"name": "req",
"authLevel": "anonymous"
},
{
"type": "blob",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import azure.functions as func
from blueprint import bp

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

app.register_functions(bp)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from blueprint import bp

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

app.register_blueprint(bp)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import azure.functions as func

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


@app.route(route="return_http")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.
import azure.functions as func

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


@app.route()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.
import azure.functions as func

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


@app.generic_trigger(arg_name="req", type="httpTrigger")
Expand Down
Loading