Skip to content

chore: add concurrency control for functional tests #506

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

Merged
merged 9 commits into from
Nov 13, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/functional-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
DBT_TEST_ATHENA_WORK_GROUP: athena-dbt-tests
DBT_TEST_ATHENA_THREADS: 16
DBT_TEST_ATHENA_POLL_INTERVAL: 0.5
DBT_TEST_ATHENA_NUM_RETRIES: 2

jobs:
functional-tests:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
name: Functional Tests - PR
if: contains(github.event.pull_request.labels.*.name, 'enable-functional-tests')
uses: ./.github/workflows/functional-tests-workflow.yml
concurrency:
# global functional tests control to avoid to run more than 1 workflow at the same time across different PRs
group: functional_tests_pr
secrets: inherit
strategy:
matrix:
Expand All @@ -32,6 +35,8 @@ jobs:
name: Functional Tests - main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ./.github/workflows/functional-tests-workflow.yml
concurrency:
group: functional_tests_main
secrets: inherit
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def dbt_profile_target():
"region_name": os.getenv("DBT_TEST_ATHENA_REGION_NAME"),
"threads": int(os.getenv("DBT_TEST_ATHENA_THREADS", "1")),
"poll_interval": float(os.getenv("DBT_TEST_ATHENA_POLL_INTERVAL", "1.0")),
"num_retries": 1,
"num_retries": int(os.getenv("DBT_TEST_ATHENA_NUM_RETRIES", "2")),
"work_group": os.getenv("DBT_TEST_ATHENA_WORK_GROUP"),
"aws_profile_name": os.getenv("DBT_TEST_ATHENA_AWS_PROFILE_NAME") or None,
}
Expand Down