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
3 changes: 3 additions & 0 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ labelPRBasedOnFilePath:
area:docker-tests:
- docker-tests/**/*

area:e2e-tests:
- airflow-e2e-tests/**/*

area:kubernetes-tests:
- kubernetes-tests/**/*

Expand Down
1 change: 1 addition & 0 deletions dev/breeze/doc/ci/04_selective_checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ This table summarizes the labels you can use on PRs to control the selective che
|----------------------------------|----------------------------------|-------------------------------------------------------------------------------------------|
| all versions | all-versions, *-versions-* | Run tests for all python and k8s versions. |
| allow suspended provider changes | allow-suspended-provider-changes | Allow changes to suspended providers. |
| area:e2e-tests | prod-image-build | If set, the Airflow E2E tests are run regardless of changed files (does not force the full test matrix). |
| area:kubernetes-tests | run-kubernetes-tests | If set, the Kubernetes tests job is run regardless of changed files (does not force the full test matrix). |
| canary | is-canary-run | If set, the PR run from apache/airflow repo behaves as `canary` run. |
| debug ci resources | debug-ci-resources | If set, then debugging resources is enabled during parallel tests and you can see them. |
Expand Down
7 changes: 7 additions & 0 deletions dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
USE_PUBLIC_RUNNERS_LABEL = "use public runners"
ALLOW_PROVIDER_DEPENDENCY_BUMP_LABEL = "allow provider dependency bump"
SKIP_COMMON_COMPAT_CHECK_LABEL = "skip common compat check"
AREA_E2E_TESTS_LABEL = "area:e2e-tests"
AREA_KUBERNETES_TESTS_LABEL = "area:kubernetes-tests"
ALL_CI_SELECTIVE_TEST_TYPES = "API Always CLI Core Other Serialization"

Expand Down Expand Up @@ -1205,6 +1206,12 @@ def ci_image_build(self) -> bool:

@cached_property
def prod_image_build(self) -> bool:
if AREA_E2E_TESTS_LABEL in self._pr_labels:
console_print(
"[warning]Building the PROD image to run Airflow E2E tests because "
f"label '{AREA_E2E_TESTS_LABEL}' is in {self._pr_labels}[/]"
)
return True
return (
self.run_kubernetes_tests
or self.run_helm_tests
Expand Down
13 changes: 13 additions & 0 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3718,6 +3718,19 @@ def test_run_kubernetes_tests_forced_by_label_with_no_changed_files():
assert checks.full_tests_needed is False


@pytest.mark.parametrize("files", [("INTHEWILD.md",), ()], ids=["unrelated-file", "no-files"])
def test_prod_image_build_forced_by_e2e_tests_label(files):
checks = SelectiveChecks(
files=files,
commit_ref=NEUTRAL_COMMIT,
github_event=GithubEvents.PULL_REQUEST,
default_branch="main",
pr_labels=("area:e2e-tests",),
)
assert checks.prod_image_build is True
assert checks.full_tests_needed is False


def test_filter_platform_excluded_test_types_handles_all_shapes():
"""Direct unit check of the in-place filter for the three Providers[...] shapes."""
checks = SelectiveChecks(
Expand Down
Loading