This is an automated email from the ASF dual-hosted git repository. eladkal pushed a commit to branch v2-6-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit df596416cfaf145be307a885d7c17c9c6882afdf 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. (cherry picked from commit b04894e5125e682d9ad043602d4babe5b0b39b0c) --- .github/workflows/ci.yml | 10 ---------- 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(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0f4351cb1..d71f3f47bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,7 +169,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 }} @@ -895,7 +894,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}}" @@ -936,7 +934,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}}" @@ -982,7 +979,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}}" @@ -1036,7 +1032,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}}" @@ -1080,7 +1075,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}}" @@ -1123,7 +1117,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}}" @@ -1160,7 +1153,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" @@ -1220,7 +1212,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}}" @@ -1262,7 +1253,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 36b85f5f76..d6012b6c36 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 @@ -690,10 +689,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())
