bugraoz93 commented on PR #54597: URL: https://github.com/apache/airflow/pull/54597#issuecomment-3321399491
> > Thanks a lot for the PR! I have small nit. it is a bit at later stage I know but it is not mandatory to provide feature but not creating an object one more time since we have it below the method `Bulk..Service` :) > > Thanks for the feedback! I understand we could optimize by not re-creating the object in bulk since it’s already available. I structured `update_orm_from_pydantic` this way so that both the single PATCH route and bulk update can reuse the same `validation + patching logic`, avoiding duplication. > > For the bulk case, I see the nit about not re-querying the Pool again. To keep this PR focused, I’ll leave it as is for now, but I can follow up in a future change to allow `update_orm_from_pydantic` to optionally accept an existing Pool instance to avoid redundant queries. If it is a static method (`update_orm_from_pydantic` in this case, which is already static on file level), you can just call with `ObjectName.method()` name rather than `method_name()` and `self.method_name()` within class, I couldn't see why it prevents usage in patch methods like in the first case :thinking: No strong opinion though, it is not impacting much since they are still singleton -- 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]
