uranusjr commented on PR #69193:
URL: https://github.com/apache/airflow/pull/69193#issuecomment-4851173609
Got this from Claude:
> The root cause is two sources of truth for the same set: the
RunLifeCycleState enum and the hand-maintained RUN_LIFE_CYCLE_STATES list. This
PR patches the symptom (adds the two missing values) but leaves the duplication
in place, so the list can silently drift again the next time Databricks adds a
state.
Since the enum is already the canonical definition, deriving the allowlist
from it would make this class of bug structurally impossible:
```python
class RunState:
RUN_LIFE_CYCLE_STATES = frozenset(s.value for s in RunLifeCycleState)
```
This aligns with Airflow's preference for a single source of truth over
hand-maintained parallel lists. It's equivalent to the current post-fix list
(verified: same 9 members) and would prevent recurrence. Reasonable to do here
or leave as a small follow-up — not a merge blocker.
---
Not sure how doable this is, but I’m leaving it here just in case.
--
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]