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 e31f52e0a05 Stop running OpenLineage e2e compat tests when full tests
are derived (#75262)
e31f52e0a05 is described below
commit e31f52e0a058f604520d827174b9f7f7deda90ae
Author: PoAn Yang <[email protected]>
AuthorDate: Wed Oct 28 10:35:42 2026 +0800
Stop running OpenLineage e2e compat tests when full tests are derived
(#75262)
Signed-off-by: PoAn Yang <[email protected]>
---
dev/breeze/doc/ci/04_selective_checks.md | 17 +++++++-----
.../src/airflow_breeze/utils/selective_checks.py | 18 ++++++-------
dev/breeze/tests/test_selective_checks.py | 31 +++++++++++++++++++---
3 files changed, 47 insertions(+), 19 deletions(-)
diff --git a/dev/breeze/doc/ci/04_selective_checks.md
b/dev/breeze/doc/ci/04_selective_checks.md
index 4bf5fffa284..03d5ccf2c96 100644
--- a/dev/breeze/doc/ci/04_selective_checks.md
+++ b/dev/breeze/doc/ci/04_selective_checks.md
@@ -547,13 +547,16 @@ together using `pytest-xdist` (pytest-xdist distributes
the tests among parallel
`PROD Image building`.
* `OpenLineage E2E compat tests` (the same suite rerun against older released
Airflow versions with
current provider code, exposed as the `run-openlineage-e2e-compat-tests`
output) are costly, so
- they do NOT run on every OpenLineage PR: on `canary` runs, when the `full
tests needed` label is
- explicitly set, or when a file that drives the compat setup but does not
itself force the full
- matrix changes — the shared e2e harness
- (`airflow-e2e-tests/tests/airflow_e2e_tests/conftest.py` / `constants.py`)
or the compat Dockerfile
- (`airflow-e2e-tests/docker/openlineage-compat.Dockerfile`). The compat
workflow
- (`.github/workflows/openlineage-e2e-compat-tests.yml`) matches
`ENVIRONMENT_FILES` and so already
- forces the full matrix — the same rationale as `run-ui-e2e-tests`.
+ they do NOT run on every OpenLineage PR. They run on `canary` runs, when the
`full tests needed`
+ label is explicitly set, or when a file that drives the compat setup
changes. These files are
+ the compat workflow (`.github/workflows/openlineage-e2e-compat-tests.yml`),
the compat Dockerfile
+ (`airflow-e2e-tests/docker/openlineage-compat.Dockerfile`), the compat
database override
+ (`airflow-e2e-tests/docker/openlineage-compat-db.yml`) and the shared e2e
harness
+ (`airflow-e2e-tests/tests/airflow_e2e_tests/conftest.py` / `constants.py`).
Like
+ `run-ui-e2e-tests`, `run-openlineage-e2e-compat-tests` ignores
`full_tests_needed`. Many changes
+ that do not touch the compat setup also turn on `full_tests_needed`, for
example changes to
+ environment files or the API spec. So a PR that changes only breeze's e2e
command does not run
+ the compat tests, and the next `canary` run tests that change.
* The specific unit test type is enabled only if changed files match the
expected patterns for each type
(`API`, `CLI`, `WWW`, `Providers` etc.). The `Always` test type is added
always if any unit
tests are run. `Providers` tests are removed if current branch is different
than `main`
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index b5415d504d3..733e1b68b61 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -308,12 +308,13 @@ CI_FILE_GROUP_MATCHES: HashableDict[FileGroupForCi] =
HashableDict(
r"^providers/common/sql/.*",
],
FileGroupForCi.OPENLINEAGE_E2E_COMPAT_FILES: [
- # Only add files that affect the compat setup and do NOT already
trigger the full matrix
- # here. The compat workflow
(.github/workflows/openlineage-e2e-compat-tests.yml) is
- # intentionally absent: it matches ENVIRONMENT_FILES and so
already forces full_tests.
+ # run_openlineage_e2e_compat_tests ignores full_tests_needed. A
file that drives the compat setup
+ # belongs here even when it also forces the full matrix, as the
compat workflow does.
+ r"^\.github/workflows/openlineage-e2e-compat-tests\.yml$",
r"^airflow-e2e-tests/tests/airflow_e2e_tests/conftest\.py$",
r"^airflow-e2e-tests/tests/airflow_e2e_tests/constants\.py$",
r"^airflow-e2e-tests/docker/openlineage-compat\.Dockerfile$",
+ r"^airflow-e2e-tests/docker/openlineage-compat-db\.yml$",
],
FileGroupForCi.TS_SDK_E2E_FILES: [
# API documentation entry points and Markdown do not affect
runtime e2e tests.
@@ -1453,14 +1454,13 @@ class SelectiveChecks:
@cached_property
@_scoped_to_component_branch
def run_openlineage_e2e_compat_tests(self) -> bool:
- # Costly older-Airflow matrix. Like run_ui_e2e_tests it is not
triggered by *derived*
- # full_tests_needed (pushes, env changes, large PRs) — only by canary,
an explicit label, or
- # an actual change to a file that drives the compat setup but does not
itself force the full
- # matrix: the shared e2e harness (conftest / constants) or the compat
Dockerfile. The compat
- # workflow already forces full_tests_needed via ENVIRONMENT_FILES.
+ # The older-Airflow matrix is costly. Like run_ui_e2e_tests, this
check ignores full_tests_needed.
+ # Many changes that do not touch the compat setup also set
full_tests_needed, for example changes to
+ # environment files or the API spec. So a PR that changes only
breeze's e2e command does not run
+ # this matrix, and the next canary run tests that change.
if self._is_canary_run() or FULL_TESTS_NEEDED_LABEL in self._pr_labels:
return True
- return self._should_be_run(FileGroupForCi.OPENLINEAGE_E2E_COMPAT_FILES)
+ return
bool(self._matching_files(FileGroupForCi.OPENLINEAGE_E2E_COMPAT_FILES,
CI_FILE_GROUP_MATCHES))
@cached_property
@_scoped_to_component_branch
diff --git a/dev/breeze/tests/test_selective_checks.py
b/dev/breeze/tests/test_selective_checks.py
index ddce03204ad..7dbf8a004f8 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -1843,13 +1843,37 @@ def assert_outputs_are_printed(expected_outputs:
dict[str, str], stderr: str):
pytest.param(
(".github/workflows/openlineage-e2e-compat-tests.yml",),
{
- # The compat workflow matches ENVIRONMENT_FILES, so it forces
the full matrix.
- # The compat therefore runs via full_tests_needed, not via
OPENLINEAGE_E2E_COMPAT_FILES.
"run-openlineage-e2e-tests": "true",
"run-openlineage-e2e-compat-tests": "true",
"full-tests-needed": "true",
},
- id="Compat workflow change forces the full matrix (compat runs via
full_tests_needed)",
+ id="Run OpenLineage e2e compat tests when the compat workflow
changes",
+ ),
+ pytest.param(
+ ("airflow-e2e-tests/docker/openlineage-compat-db.yml",),
+ {
+ "run-openlineage-e2e-tests": "false",
+ "run-openlineage-e2e-compat-tests": "true",
+ "full-tests-needed": "false",
+ "prod-image-build": "true",
+ },
+ id="Run OpenLineage e2e compat tests when the compat database
override changes",
+ ),
+ pytest.param(
+ ("scripts/ci/docker-compose/base.yml",),
+ {
+ "run-openlineage-e2e-compat-tests": "false",
+ "full-tests-needed": "true",
+ },
+ id="Do not run OpenLineage e2e compat tests when an environment
file forces full tests",
+ ),
+ pytest.param(
+
("airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml",),
+ {
+ "run-openlineage-e2e-compat-tests": "false",
+ "full-tests-needed": "true",
+ },
+ id="Do not run OpenLineage e2e compat tests when the API contract
forces full tests",
),
(
pytest.param(
@@ -2896,6 +2920,7 @@ def test_expected_output_pull_request_v2_7(
"core-test-types-list-as-strings-in-json":
ALL_CI_SELECTIVE_TEST_TYPES_AS_JSON,
"run-mypy-providers": "true",
"run-ui-e2e-tests": "false",
+ "run-openlineage-e2e-compat-tests": "true",
},
id="All tests run on push if core file changed",
),