yuseok89 commented on code in PR #66554:
URL: https://github.com/apache/airflow/pull/66554#discussion_r3234832987


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py:
##########
@@ -73,6 +73,49 @@ def validate_model(cls, data: Any) -> Any:
         return data
 
 
+class BulkDagRunBody(DAGRunPatchBody, StrictBaseModel):
+    """Request body for bulk update and delete Dag runs."""
+
+    dag_run_id: str
+    dag_id: str | None = None
+
+
+class DagRunIdentifier(StrictBaseModel):
+    """Identifier for a Dag run targeted by a bulk operation."""
+
+    dag_run_id: str
+    dag_id: str | None = None
+
+
+class BulkClearDagRunsBody(StrictBaseModel):
+    """Request body for the bulk clear Dag runs endpoint."""
+
+    runs: list[DagRunIdentifier]
+    only_failed: bool = False
+    only_new: bool = Field(
+        default=False,
+        description="Only queue newly added tasks in the latest Dag version 
without clearing existing tasks.",
+    )
+    run_on_latest_version: bool = Field(
+        default=False,
+        description="(Experimental) Run on the latest bundle version of the 
Dag after clearing the Dag Run.",
+    )
+    dry_run: bool = True
+    note: str | None = Field(
+        default=None,
+        max_length=1000,
+        description="Optional note applied to every Dag Run that is 
successfully cleared. Ignored on dry runs.",

Review Comment:
   Done.
   Dropped the description so codegen reuses the existing `Note` class.



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