apache / apache/airflow

Add missing tests for `common.compat.standard` Operators andTtriggers

Open
#72,263 2 comments 0 reactions 1 assignee Claimed by @rsdpyenugula View on GitHub
area:providers contributors-workshop
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

## Description

> This is an issue that is reserved for the Airflow Summit "Contributors" Workshop. This is denoted with the label `contributors-workshop`. Out of respect for the organizers and participants of this workshop, **please do not implement a PR that addresses this issue.**
>
> If this issue is still open following Airflow Summit, the label will be removed and the issue can be picked up.

Two modules in the `common.compat` provider have no dedicated test module, and (unlike most entries on the `OVERLOOKED_TESTS` list) they are not covered indirectly. Nothing under any `providers/*/tests/` directory imports them at all:

| Module | Expected test file |
| --- | --- |
| `providers/common/compat/src/airflow/providers/common/compat/standard/operators.py` | `providers/common/compat/tests/unit/common/compat/standard/test_operators.py` |
| `providers/common/compat/src/airflow/providers/common/compat/standard/triggers.py` | `providers/common/compat/tests/unit/common/compat/standard/test_triggers.py` |

Both are currently suppressed in the `OVERLOOKED_TESTS` allowlist in [`airflow-core/tests/unit/always/test_project_structure.py`](https://github.com/apache/airflow/blob/main/airflow-core/tests/unit/always/test_project_structure.py).

This is a scoped subset of the meta issue #35442, limited to the `common` providers.

### What should these tests cover?

There is an established pattern for this in the same provider [`providers/common/compat/tests/unit/common/compat/test_sdk.py`](https://github.com/apache/airflow/blob/main/providers/common/compat/tests/unit/common/compat/test_sdk.py), which iterates `__all__` and asserts every symbol resolves. Mirroring it is the bulk of the work:

- Every name in `__all__` / `_IMPORT_MAP` resolves to a non-`None` object.
- An unknown attribute raises `AttributeError`.
- For `standard/operators.py`, cover the `AIRFLOW_V_3_2_PLUS` branch:
- `is_async_callable` correctly unwraps `functools.partial` and identifies coroutine functions.
- The `BaseAsyncOperator` stub reports `is_async is True` and its `execute()` raises `RuntimeError` with the 3.2+ upgrade message.

## Definition of Done

1. Add the two test modules at the paths in the table above.
2. Remove the two corresponding entries from `OVERLOOKED_TESTS` in `airflow-core/tests/unit/always/test_project_structure.py`
3. Both of these tests should pass:

```bash
breeze testing providers-tests providers/common/compat/tests/unit/common/compat/standard/test_operators.py

breeze testing providers-tests providers/common/compat/tests/unit/common/compat/standard/test_triggers.py
```

---
Drafted-by: Claude Code (Opus 5); reviewed and edited by @jroachgolf84 before posting.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.