uranusjr commented on code in PR #68702:
URL: https://github.com/apache/airflow/pull/68702#discussion_r3458482410


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py:
##########
@@ -59,6 +59,54 @@ class BulkDAGRunBody(StrictBaseModel):
     note: str | None = Field(None, max_length=1000)
 
 
+class PartitionSelectorMixin(StrictBaseModel):
+    """Partition filter fields shared by bulk-clear and clearPartitions 
bodies."""
+
+    partition_key: str | None = Field(
+        default=None,
+        description="Select runs by exact partition key match. Mutually 
exclusive with the other partition selectors.",
+    )
+    partition_date_start: datetime | None = Field(
+        default=None,
+        description="Inclusive start of the partition date window. The value 
is interpreted in the Dag's timetable timezone. Mutually exclusive with the 
other partition selectors.",
+    )
+    partition_date_end: datetime | None = Field(
+        default=None,
+        description="Inclusive end of the partition date window. The value is 
interpreted in the Dag's timetable timezone. Mutually exclusive with the other 
partition selectors.",
+    )
+
+    @property
+    def has_partition_selectors(self) -> bool:
+        return (
+            self.partition_key is not None
+            or self.partition_date_start is not None
+            or self.partition_date_end is not None
+        )
+
+    def validate_partition_date_window_order(self) -> None:

Review Comment:
   Why is the not underscore-prefixed? It is only called in an 
underscore-prefixed function, from what I can tell.



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