AIP-44 Migrate TaskInstance._run_raw_task to Internal API
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
Prerequisite:
https://github.com/apache/airflow/issues/29311
Link:
https://github.com/apache/airflow/blob/main/airflow/models/taskinstance.py#L1351
This metho adds/updates multiple objects (TaskInstance, Log).
It also calls some other methods passing session.
We may simply migrate all method called there or (preferred) refactor the method to have multiple phases :
Internal API call - Local execution - internal API call ....
It is preferred as the whole sections there are executed in a transaction.
Contributor guide
Research direction
Start with prerequisite issue #29311, then inspect airflow/models/taskinstance.py at line 1351 and trace _run_raw_task and the methods it calls with a session. Determine how its TaskInstance and Log updates can be split around Internal API calls while preserving the transaction boundaries described in the issue. Done means the migration design is implemented without losing the existing transaction behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100