pierrejeambrun commented on code in PR #42973:
URL: https://github.com/apache/airflow/pull/42973#discussion_r1820806737


##########
airflow/api_fastapi/core_api/serializers/dag_run.py:
##########
@@ -18,13 +18,28 @@
 from __future__ import annotations
 
 from datetime import datetime
+from enum import Enum
 
 from pydantic import BaseModel, Field
 
 from airflow.utils.state import DagRunState
 from airflow.utils.types import DagRunTriggeredByType, DagRunType
 
 
+class DAGRunModifyStates(str, Enum):
+    """Enum for DAG Run states when updating a DAG Run."""
+
+    QUEUED = DagRunState.QUEUED
+    SUCCESS = DagRunState.SUCCESS
+    FAILED = DagRunState.FAILED
+
+
+class DAGRunPatchBody(BaseModel):
+    """DAG Run Serializer for PATCH requests."""
+

Review Comment:
   Yes we can definitely make the patch broader than just the `state`.
   
   Maybe we can merge this one as is, and @rawwar can follow up with a feature 
PR to make transform this route into a more general `patch dag_run` that allow 
update on both `state` and `note content` ?



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