Skip to content
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
5 changes: 5 additions & 0 deletions .github/workflows/additional-prod-image-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'
2 changes: 2 additions & 0 deletions .github/workflows/ci-amd-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 12 additions & 0 deletions dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -307,6 +308,9 @@ def __hash__(self):
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$",
],
Expand Down Expand Up @@ -899,6 +903,12 @@ def run_go_sdk_tests(self) -> bool:
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)
Expand Down Expand Up @@ -951,6 +961,7 @@ def ci_image_build(self) -> bool:
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
Expand All @@ -963,6 +974,7 @@ def prod_image_build(self) -> bool:
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
)

Expand Down
55 changes: 55 additions & 0 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
(
Expand Down
Loading