seanghaeli commented on code in PR #53000:
URL: https://github.com/apache/airflow/pull/53000#discussion_r2217056945


##########
airflow-core/tests/unit/utils/test_state.py:
##########
@@ -76,3 +76,39 @@ def test_dagrun_state_enum_escape():
         assert rows[0].state == "queued"
 
         session.rollback()
+
+
+class TestTaskInstanceStates:

Review Comment:
   I think it's good for them to enforce synchronization between 
`TaskInstanceStates`, `TerminalTIState`, `IntermediateTIState`, 
`success_states`, and `failed_states`. The reason this PR is here is because in 
places like this:
   
   
https://github.com/apache/airflow/blob/d4473555c0e7022e073489b7163d49102881a1a6/providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py#L99-L100
   
   It is best to iterate instead of hardcoding. Being certain that the 
success_states are in sync with all terminal states (in case more are added in 
the future) is useful.



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