deepmodeling / deepmodeling/dpti
[Code scan] GDI sub-DAG polling treats queued runs as failures
- Dominant language
- Python
- Stars
- 42
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Source: Codex global repository scan of deepmodeling/dpti at commit b719828e7eeb571bd26411430197cd74ea78e38c.
Project: https://github.com/orgs/deepmodeling/projects/27
Problem
After triggering a sub-DAG, `GDILoopSubDagController.wait_until_end()` only treats `success` and `running` as non-failure states. Airflow DagRuns can legitimately be `queued`, `scheduled`, or briefly not visible immediately after `trigger_dag()`. The current polling loop raises `AirflowFailException` for these healthy transient states.
Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/dags/dp_ti_gdi.py#L187
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/dags/dp_ti_gdi.py#L193
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/dags/dp_ti_gdi.py#L197
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/dags/dp_ti_gdi.py#L208
Reproduction
Unit-test `wait_until_end()` with `get_dag_run_state()` returning `State.QUEUED` and then `State.SUCCESS`.
Expected result
Queued/scheduled/non-visible transient states should be polled until they become running/success/failure, instead of being treated as immediate failures.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in dpti/dags/dp_ti_gdi.py at GDILoopSubDagController.wait_until_end() and inspect the polling logic around lines 187-208. Exercise get_dag_run_state() with queued followed by success, then verify scheduled and temporarily non-visible states are polled while terminal failure still raises an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100