Add providers E2E tests framework and OpenLineage tests - #69212
Conversation
2091603 to
a85933b
Compare
a85933b to
878b7c3
Compare
|
Quickest fix: git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-leaseAutomated nudge — ignore if you're not ready to rebase. This comment is updated in place on future |
878b7c3 to
d6f45d7
Compare
shahar1
left a comment
There was a problem hiding this comment.
Overall LGTM, minor comments and nits.
d6f45d7 to
c1cccfd
Compare
potiuk
left a comment
There was a problem hiding this comment.
Thanks @kacpermuda — this is a well-built, well-documented framework. Reviewed the whole diff: it's test/CI-only (no production code), the providers/openlineage/tests/system/** edits are uniform and keep those DAGs as the single source of truth, and the design is empirically validated by this PR's own green CI — the PROD run plus every compat variant (3.0.6 → 3.3.0, and the 2.x skip path) all pass.
Particularly liked: the selective-checks gating + forced PROD image build, the "adding a new provider" runbook in the README, and the honest handling of first-run flakiness (retry-once with a surfaced ⚠ notice rather than hiding it).
A couple of purely-cosmetic nits, non-blocking: the fixed time.sleep(15) in the auth_headers fixture is a touch fragile given compose.up(wait=True) already gates readiness, and wait_for_airflow_api() uses a bare requests.get while its siblings use the retry-mounted self.session. Neither needs to hold up merge.
shahar1's comments look addressed. LGTM 👍
This review was drafted by an AI-assisted tool and confirmed by an Apache Airflow maintainer. The maintainer approving this PR has read the findings and signed off. If something feels off, please reply on the PR and a maintainer will follow up.
More on how Apache Airflow handles maintainer review: contributing-docs/05_pull_requests.rst.
|
Let's see if that will be "bearable" in terms of stablity and build time. |
Agreed, this is probably to many safety checks for that. I've ported some of the code from the actual e2e tests I've been running on 3rd party infra for some time, where there is much more instability of infra causing flakiness, so I might have been too cautious here. Let's keep it for now if it's okay, will be happy to adjust soon if we see these tests taking up to much time or just during my next update to this framework (I'll leave a note to myself about cleaning this) |
Sure, I'll try to keep an eye for scheduled runs failures or any flakiness, but feel free to ping me if it goes unnoticed |
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker e756975 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
jason810496
left a comment
There was a problem hiding this comment.
Sorry to come here late. May I ask what is the purpose of introducing another providers-e2e-tests directory? Since the existing airflow-e2e-tests already includes the providers, for examples: The ES and OS provider for remote logging feature, the Kafka provider for external event driven feature.
Would it be better to consolidate there to reuse all the setup instead of re-introducing a new test suite?
Good catch - didn't notice that all e2e tests are already there. |
Yup, that would probably be the cleanest solution |
Add framework for providers E2E tests and implement OpenLineage provider e2e tests to Airflow CI
The OpenLineage provider emits lineage events when Dags run, but until now there was no automated way in Airflow CI to verify those events are actually correct against a real, deployed Airflow stack. This PR introduces that capability: a self-contained e2e test harness that spins up Airflow via docker-compose, runs the provider system-test Dags, and asserts the OpenLineage events emitted by the transport match expected payloads. The tests run on demand (via
workflow_dispatch) and are triggered automatically by selective checks when theopenlineageorcommonproviders, theproviders-e2e-testsharness, or related files change.The approach follows the same pattern already established by the Task SDK integration tests and the Airflow e2e tests: a standalone directory under
providers-e2e-tests/openlineage/with its ownpyproject.toml,docker-compose.yaml, and pytest suite, invoked through a newbreeze testing providers-e2e-tests <provider>command.More providers can be added in the future if needed. These OL test do not rely on any external service, so they can easily be run in CI (no db, external api, google/amazon/azure service needed).
What's included:
providers-e2e-tests/— new top-level directory; each provider gets its own subdirectory with adocker-compose stack, tests, and
pyproject.toml.breeze testing providers-e2e-tests <provider>— spins up the stack and runs pytest.--airflow-version <ver>to test older Airflow + current providersfrom main (builds
apache/airflow:<ver>+ provider wheels). Required providers are declared in eachprovider's
pyproject.tomlunder[tool.e2e-tests] required-providers— nothing hardcoded in breeze.DAGs come from the existing
providers/openlineage/tests/system/openlineage/—prepare_dags.pycopies and strips their pytest-only footers at runtime. Events are captured via
VariableTransport(stores OL events in Airflow Variables); each DAG's
OpenLineageTestOperatorvalidates them — noexternal backend needed. A run that ends
successmeans lineage matched.I tried to add a new breeze command for this, but it's first time ever for me contributing in this area, so it may not be ideal, tried to follow an example of current code.
When tests are failing, there is a nice log summary for what exactly failed so we don't have to get zipped logs every time. Here is how it looks like (it's how the TestOperator in system tests logs failures, we can improve that as we go to be better, the idea here is that we include up to 100 lines of warning, error and critical logs from failed tasks for easier debugging)

Was generative AI tooling used to co-author this PR?
Generated-by: Claude Sonnet 4.6 following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.