This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new b04894e512 Export SUSPENDED_PROVIDERS_FOLDERS for breeze testing
commands (#30780)
b04894e512 is described below
commit b04894e5125e682d9ad043602d4babe5b0b39b0c
Author: Niko Oliveira <[email protected]>
AuthorDate: Thu Apr 20 16:44:25 2023 -0700
Export SUSPENDED_PROVIDERS_FOLDERS for breeze testing commands (#30780)
Export the SUSPENDED_PROVIDERS_FOLDERS env var in breeze directly
instead of in Airflow CI workflows. This will fix the issue for users
executing `breeze testing ...` commands locally.
---
.github/workflows/ci.yml | 11 -----------
dev/breeze/src/airflow_breeze/commands/testing_commands.py | 2 ++
dev/breeze/src/airflow_breeze/utils/selective_checks.py | 5 -----
3 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c8f0d0c65e..94a86bbea0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -168,7 +168,6 @@ jobs:
skip-pre-commits: ${{ steps.selective-checks.outputs.skip-pre-commits }}
helm-test-packages: ${{
steps.selective-checks.outputs.helm-test-packages }}
debug-resources: ${{ steps.selective-checks.outputs.debug-resources }}
- suspended-providers-folders: ${{
steps.selective-checks.outputs.suspended-providers-folders }}
source-head-repo: ${{ steps.source-run-info.outputs.source-head-repo }}
pull-request-labels: ${{ steps.source-run-info.outputs.pr-labels }}
in-workflow-build: ${{ steps.source-run-info.outputs.in-workflow-build }}
@@ -926,7 +925,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
BACKEND: sqlite
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PYTHON_MAJOR_MINOR_VERSION:
"${{needs.build-info.outputs.default-python-version}}"
TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
@@ -969,7 +967,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
@@ -1010,7 +1007,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
@@ -1056,7 +1052,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
@@ -1110,7 +1105,6 @@ jobs:
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
BACKEND: "mysql"
PYTHON_MAJOR_MINOR_VERSION: "${{matrix.python-version}}"
@@ -1154,7 +1148,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
@@ -1197,7 +1190,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
PYTHON_MAJOR_MINOR_VERSION: "${{matrix.python-version}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
@@ -1234,7 +1226,6 @@ jobs:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
BACKEND: "postgres"
@@ -1294,7 +1285,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "${{needs.build-info.outputs.parallel-test-types}}"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
FULL_TESTS_NEEDED: "${{needs.build-info.outputs.full-tests-needed}}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
@@ -1336,7 +1326,6 @@ jobs:
env:
RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
PARALLEL_TEST_TYPES: "Quarantined"
- SUSPENDED_PROVIDERS_FOLDERS: "${{
needs.build-info.outputs.suspended-providers-folders }}"
PR_LABELS: "${{needs.build-info.outputs.pull-request-labels}}"
PYTHON_MAJOR_MINOR_VERSION:
"${{needs.build-info.outputs.default-python-version}}"
DEBUG_RESOURCES: "${{needs.build-info.outputs.debug-resources}}"
diff --git a/dev/breeze/src/airflow_breeze/commands/testing_commands.py
b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
index 1e569460df..5107f345a0 100644
--- a/dev/breeze/src/airflow_breeze/commands/testing_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/testing_commands.py
@@ -70,6 +70,7 @@ from airflow_breeze.utils.parallel import (
from airflow_breeze.utils.path_utils import FILES_DIR,
cleanup_python_generated_files
from airflow_breeze.utils.run_tests import file_name_from_test_type,
run_docker_compose_tests
from airflow_breeze.utils.run_utils import get_filesystem_type, run_command
+from airflow_breeze.utils.suspended_providers import
get_suspended_providers_folders
LOW_MEMORY_CONDITION = 8 * 1024 * 1024 * 1024
@@ -136,6 +137,7 @@ def _run_test(
env_variables["COLLECT_ONLY"] = str(exec_shell_params.collect_only).lower()
env_variables["REMOVE_ARM_PACKAGES"] =
str(exec_shell_params.remove_arm_packages).lower()
env_variables["SKIP_PROVIDER_TESTS"] =
str(exec_shell_params.skip_provider_tests).lower()
+ env_variables["SUSPENDED_PROVIDERS_FOLDERS"] = "
".join(get_suspended_providers_folders()).strip()
if "[" in exec_shell_params.test_type and not
exec_shell_params.test_type.startswith("Providers"):
get_console(output=output).print(
"[error]Only 'Providers' test type can specify actual tests with
\\[\\][/]"
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index 7bcd0e03ed..97fa9d6ff5 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -30,7 +30,6 @@ from airflow_breeze.utils.path_utils import (
SYSTEM_TESTS_PROVIDERS_ROOT,
TESTS_PROVIDERS_ROOT,
)
-from airflow_breeze.utils.suspended_providers import
get_suspended_providers_folders
if sys.version_info >= (3, 8):
from functools import cached_property
@@ -685,10 +684,6 @@ class SelectiveChecks:
def debug_resources(self) -> bool:
return DEBUG_CI_RESOURCES_LABEL in self._pr_labels
- @cached_property
- def suspended_providers_folders(self) -> str:
- return " ".join(get_suspended_providers_folders())
-
@cached_property
def helm_test_packages(self) -> str:
return json.dumps(all_helm_test_packages())