Align standard provider empty and external_task tests with expected paths - #73267
Open
keith991001 wants to merge 2 commits into
Open
keith991001 wants to merge 2 commits into
keith991001 wants to merge 2 commits into
Conversation
…aths Two OVERLOOKED_TESTS entries in the standard provider are resolved: - providers/standard/tests/.../sensors/test_external_task.py existed as test_external_task_sensor.py, so the guard list kept treating the mirror-path test as missing. Rename the file to match the source module path (external_task.py), same as the earlier branch/latest_only alignment. While moving, add a TestExternalDagLink class: the ExternalDagLink operator link had no coverage for its name or the URL it builds for either operator that declares it. - providers/standard/tests/.../operators/test_empty.py did not exist. Add it, covering the no-op execute, the inherits_from_empty_operator marker, and the scheduler short-circuit contract (TaskInstance.is_task_schedulable): a trivial EmptyOperator is marked success without being scheduled, while callbacks/outlets/inlets opt a task back into real scheduling. Both entries are removed from OVERLOOKED_TESTS.
The check-no-new-airflow-exceptions allowlist is keyed by file path, so the renamed test_external_task.py inherited a zero quota while its one pre-existing raise AirflowException usage moved with the file. Regenerated with check_new_airflow_exception_usage.py --generate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves two
OVERLOOKED_TESTSentries for the standard provider, following the per-provider batching convention (same shape as #73111 / #73153 / #73229).What changed
sensors/test_external_task.py— the coverage already existed (2400+ lines) but under the legacy nametest_external_task_sensor.py, so the guard list kept treating the mirror-path test as missing (the stale entry was never caught because of theadded_test_filestype mismatch that #71985 fixes). Renamed viagit mvto mirror the source moduleexternal_task.py, matching the earlierbranch/latest_onlyalignment in #73229.While moving, added a
TestExternalDagLinkclass — theExternalDagLinkoperator link had no dedicated coverage: itsname, and the exact dag-run URL it builds, asserted for both operators that declare it (ExternalTaskSensorandExternalTaskMarker).operators/test_empty.py— new file.EmptyOperatoris 39 lines of source but carries a scheduler-facing contract worth pinning:executeis a no-op returningNone;inherits_from_empty_operatorisTrueon class and instance;TaskInstance.is_task_schedulable(3.2+ guarded): a trivialEmptyOperatoris marked success without being scheduled, whileon_execute_callback/on_success_callback/outlets/inletseach opt the task back into real scheduling.Both entries removed from
OVERLOOKED_TESTSintest_project_structure.py.Verification
pytest providers/standard/tests/unit/standard/operators/test_empty.py→ 7 passedpytest providers/standard/tests/unit/standard/sensors/test_external_task.py→ 42 passed, 65 skipped (pre-existing version-gated skips, unchanged by the move)pytest airflow-core/tests/unit/always/test_project_structure.py→ 10 passed, 1 xfailedprek run --from-ref maincleanWas generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) 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.