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 82d74036d17 Run airflow-ctl integration tests conditionally on 
airflowctl changes (#60010)
82d74036d17 is described below

commit 82d74036d174732460aac92eb71f2f335fab5b4d
Author: Amogh Desai <[email protected]>
AuthorDate: Thu Jan 1 14:40:17 2026 +0530

    Run airflow-ctl integration tests conditionally on airflowctl changes 
(#60010)
---
 .github/workflows/additional-prod-image-tests.yml  |  5 ++
 .github/workflows/ci-amd-arm.yml                   |  2 +
 .../src/airflow_breeze/utils/selective_checks.py   | 12 +++++
 dev/breeze/tests/test_selective_checks.py          | 55 ++++++++++++++++++++++
 4 files changed, 74 insertions(+)

diff --git a/.github/workflows/additional-prod-image-tests.yml 
b/.github/workflows/additional-prod-image-tests.yml
index d4e2d4061a8..94c6f1d9336 100644
--- a/.github/workflows/additional-prod-image-tests.yml
+++ b/.github/workflows/additional-prod-image-tests.yml
@@ -68,6 +68,10 @@ on:  # yamllint disable-line rule:truthy
         description: "Whether to run UI e2e tests (true/false)"
         required: true
         type: string
+      run-airflow-ctl-integration-tests:
+        description: "Whether to run Airflow CTL integration tests 
(true/false)"
+        required: true
+        type: string
 permissions:
   contents: read
 jobs:
@@ -288,3 +292,4 @@ jobs:
         id: breeze
       - name: "Run airflowctl integration tests"
         run: breeze testing airflow-ctl-integration-tests
+    if: inputs.run-airflow-ctl-integration-tests == 'true'
diff --git a/.github/workflows/ci-amd-arm.yml b/.github/workflows/ci-amd-arm.yml
index ca1954acfdb..dccf4125a8e 100644
--- a/.github/workflows/ci-amd-arm.yml
+++ b/.github/workflows/ci-amd-arm.yml
@@ -105,6 +105,7 @@ jobs:
       python-versions-list-as-string: ${{ 
steps.selective-checks.outputs.python-versions-list-as-string }}
       python-versions: ${{ steps.selective-checks.outputs.python-versions }}
       run-airflow-ctl-tests: ${{ 
steps.selective-checks.outputs.run-airflow-ctl-tests }}
+      run-airflow-ctl-integration-tests: ${{ 
steps.selective-checks.outputs.run-airflow-ctl-integration-tests }}
       run-amazon-tests: ${{ steps.selective-checks.outputs.run-amazon-tests }}
       run-api-codegen: ${{ steps.selective-checks.outputs.run-api-codegen }}
       run-api-tests: ${{ steps.selective-checks.outputs.run-api-tests }}
@@ -792,6 +793,7 @@ jobs:
       canary-run: ${{ needs.build-info.outputs.canary-run }}
       use-uv: ${{ needs.build-info.outputs.use-uv }}
       run-ui-e2e-tests: ${{ needs.build-info.outputs.run-ui-e2e-tests }}
+      run-airflow-ctl-integration-tests: ${{ 
needs.build-info.outputs.run-airflow-ctl-integration-tests }}
     if: needs.build-info.outputs.prod-image-build == 'true'
 
   tests-kubernetes:
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py 
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index c897f0509bc..844729fe460 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -118,6 +118,7 @@ class FileGroupForCi(Enum):
     TASK_SDK_INTEGRATION_TEST_FILES = auto()
     GO_SDK_FILES = auto()
     AIRFLOW_CTL_FILES = auto()
+    AIRFLOW_CTL_INTEGRATION_TEST_FILES = auto()
     ALL_PYPROJECT_TOML_FILES = auto()
     ALL_PYTHON_FILES = auto()
     ALL_SOURCE_FILES = auto()
@@ -307,6 +308,9 @@ CI_FILE_GROUP_MATCHES: HashableDict[FileGroupForCi] = 
HashableDict(
             r"^airflow-ctl/src/airflowctl/.*\.py$",
             r"^airflow-ctl/tests/.*\.py$",
         ],
+        FileGroupForCi.AIRFLOW_CTL_INTEGRATION_TEST_FILES: [
+            r"^airflow-ctl-tests/.*\.py$",
+        ],
         FileGroupForCi.DEVEL_TOML_FILES: [
             r"^devel-common/pyproject\.toml$",
         ],
@@ -899,6 +903,12 @@ class SelectiveChecks:
     def run_airflow_ctl_tests(self) -> bool:
         return self._should_be_run(FileGroupForCi.AIRFLOW_CTL_FILES)
 
+    @cached_property
+    def run_airflow_ctl_integration_tests(self) -> bool:
+        return self._should_be_run(FileGroupForCi.AIRFLOW_CTL_FILES) or 
self._should_be_run(
+            FileGroupForCi.AIRFLOW_CTL_INTEGRATION_TEST_FILES
+        )
+
     @cached_property
     def run_kubernetes_tests(self) -> bool:
         return self._should_be_run(FileGroupForCi.KUBERNETES_FILES)
@@ -951,6 +961,7 @@ class SelectiveChecks:
             or self.docs_build
             or self.run_kubernetes_tests
             or self.run_task_sdk_integration_tests
+            or self.run_airflow_ctl_integration_tests
             or self.run_helm_tests
             or self.run_ui_tests
             or self.pyproject_toml_changed
@@ -963,6 +974,7 @@ class SelectiveChecks:
             self.run_kubernetes_tests
             or self.run_helm_tests
             or self.run_task_sdk_integration_tests
+            or self.run_airflow_ctl_integration_tests
             or self.run_ui_e2e_tests
         )
 
diff --git a/dev/breeze/tests/test_selective_checks.py 
b/dev/breeze/tests/test_selective_checks.py
index 6c5139d2214..66a356dda4d 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -649,6 +649,61 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                 "Task SDK integration tests and prod image build should run 
but no other tests",
             )
         ),
+        (
+            pytest.param(
+                ("airflow-ctl/src/airflowctl/random.py",),
+                {
+                    "all-python-versions": 
f"['{DEFAULT_PYTHON_MAJOR_MINOR_VERSION}']",
+                    "all-python-versions-list-as-string": 
DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
+                    "python-versions": 
f"['{DEFAULT_PYTHON_MAJOR_MINOR_VERSION}']",
+                    "python-versions-list-as-string": 
DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
+                    "run-api-tests": "false",
+                    "run-helm-tests": "false",
+                    "run-kubernetes-tests": "false",
+                    "run-unit-tests": "true",
+                    "run-airflow-ctl-tests": "true",
+                    "run-airflow-ctl-integration-tests": "true",
+                    "docs-build": "true",
+                    "full-tests-needed": "false",
+                    "skip-prek-hooks": 
ALL_SKIPPED_COMMITS_IF_NO_PROVIDERS_UI_AND_HELM_TESTS,
+                    "skip-providers-tests": "true",
+                    "upgrade-to-newer-dependencies": "false",
+                    "run-mypy": "true",
+                    "mypy-checks": "['mypy-airflow-ctl']",
+                },
+                id="Airflow CTL source file changed - Airflow CTL tests should 
run",
+            )
+        ),
+        (
+            pytest.param(
+                ("airflow-ctl-tests/tests/random.py",),
+                {
+                    "all-python-versions": 
f"['{DEFAULT_PYTHON_MAJOR_MINOR_VERSION}']",
+                    "all-python-versions-list-as-string": 
DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
+                    "python-versions": 
f"['{DEFAULT_PYTHON_MAJOR_MINOR_VERSION}']",
+                    "python-versions-list-as-string": 
DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
+                    "run-api-tests": "false",
+                    "run-helm-tests": "false",
+                    "run-kubernetes-tests": "false",
+                    "run-unit-tests": "false",
+                    "run-airflow-ctl-tests": "false",
+                    "run-airflow-ctl-integration-tests": "true",
+                    "docs-build": "false",
+                    "full-tests-needed": "false",
+                    "skip-prek-hooks": 
ALL_SKIPPED_COMMITS_IF_NO_PROVIDERS_UI_AND_HELM_TESTS,
+                    "skip-providers-tests": "true",
+                    "upgrade-to-newer-dependencies": "false",
+                    "run-mypy": "false",
+                    "mypy-checks": "[]",
+                },
+                id="Airflow CTL integration tests files changed - "
+                "Airflow CTL integration tests and prod image build should run 
but no other tests",
+            )
+        ),
         (
             pytest.param(
                 (

Reply via email to