kaxil opened a new pull request, #62749: URL: https://github.com/apache/airflow/pull/62749
`SkipMixin` and `BranchMixIn` are branching primitives used by multiple providers. They currently live in the standard provider (`providers/standard/`), but branching is a framework concern and not a provider concern. The Task SDK already has all dependencies they need. Moving them to the SDK fixes the layering violation and eliminates the cross-package import in `MappedOperator` (which imports `SkipMixin` from `providers/standard`). **What changed:** - Created `task-sdk/src/airflow/sdk/bases/skipmixin.py` with `SkipMixin`, constants, and `_ensure_tasks` helper - Created `task-sdk/src/airflow/sdk/bases/branch.py` with `BranchMixIn` and `BaseBranchOperator` - Exported all three from `airflow.sdk` - Converted standard provider files to re-export shims - Added common-compat entries for cross-version provider support - Updated `MappedOperator` to import from SDK instead of cross-package - Updated `common/sql` provider to use `common.compat.sdk` import path - Added 26 SDK-level unit tests (logic + import path verification) All existing import paths (`airflow.providers.standard.utils.skipmixin`, `airflow.providers.standard.operators.branch`, `airflow.models.skipmixin`) continue to work through re-export shims. `airflow-core/src/airflow/models/skipmixin.py` still imports via the standard provider shim (not directly from SDK) because the "Check for SDK imports in core files" pre-commit hook prohibits direct SDK imports in core. --- ##### Was generative AI tooling used to co-author this PR? - [ ] Yes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
