thevenkatesh opened a new pull request, #73391:
URL: https://github.com/apache/airflow/pull/73391

   Adds `run_if` and `skip_if` support for regular `BaseOperator` instances, 
not only TaskFlow-decorated tasks.
   
   The decorators now compose their condition into the operator's existing 
`pre_execute` hook, so regular operators can be conditionally skipped while 
preserving any pre-existing setup hook.
   
   Closes: #44205
   
   ## Tests
   
   ```bash
   UV_CACHE_DIR=.uv-cache /Users/venk1tesh/.local/bin/uv run ruff format 
task-sdk/src/airflow/sdk/definitions/decorators/condition.py 
task-sdk/tests/task_sdk/definitions/decorators/test_condition.py
   UV_CACHE_DIR=.uv-cache /Users/venk1tesh/.local/bin/uv run ruff check --fix 
task-sdk/src/airflow/sdk/definitions/decorators/condition.py 
task-sdk/tests/task_sdk/definitions/decorators/test_condition.py
   PATH=/Users/venk1tesh/.local/bin:$PATH UV_CACHE_DIR=.uv-cache 
UV_PYTHON_INSTALL_DIR=.uv-python /Users/venk1tesh/.local/bin/uv run --project 
task-sdk pytest 
task-sdk/tests/task_sdk/definitions/decorators/test_condition.py -xvs
   ```
   
   ## Results
   
   - `ruff format`: passed
   - `ruff check --fix`: passed
   - `pytest task-sdk/tests/task_sdk/definitions/decorators/test_condition.py 
-xvs`: 9 passed
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes - Codex (GPT-5)
   
   Generated-by: Codex (GPT-5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to