rawwar commented on code in PR #44121:
URL: https://github.com/apache/airflow/pull/44121#discussion_r1846569637


##########
airflow/api_fastapi/core_api/datamodels/pools.py:
##########
@@ -72,6 +72,25 @@ class PoolPatchBody(BaseModel):
 class PoolPostBody(BasePool):
     """Pool serializer for post bodies."""
 
-    pool: str = Field(alias="name")
+    pool: str = Field(alias="name", max_length=256)
     description: str | None = None
     include_deferred: bool = False
+
+
+class PoolPostBulkBody(BaseModel):
+    """Pools serializer for post bodies."""
+
+    pools: list[PoolPostBody]

Review Comment:
   If our primary goal is to ensure name to be unique, maybe we can modify 
PoolPostBody to include `__hash__`?
   
   ```
       def __hash__(self):
           return hash(self.pool)
   ```
   
   Maybe its simpler in the way you already implemented. Otherwise, we also 
need to make a note that the first unique pool name will be considered and rest 
will be discarded
   
   @pierrejeambrun , @amoghrajesh  wdyt?



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