SameerMesiah97 commented on code in PR #62731:
URL: https://github.com/apache/airflow/pull/62731#discussion_r2902202324


##########
providers/openfaas/src/airflow/providers/openfaas/hooks/openfaas.py:
##########
@@ -106,7 +109,8 @@ def update_function(self, body: dict[str, Any]) -> None:
         """Update OpenFaaS function."""
         url = self.get_conn().host + self.UPDATE_FUNCTION
         self.log.info("Updating function %s", url)
-        response = requests.put(url, body)
+        timeout = int(self.get_conn().extra_dejson.get("timeout", 60))

Review Comment:
   > Thanks for the feedback and for pointing that out, @SameerMesiah97. I 
completely agree - fetching it multiple times and relying on hidden UI 
variables was definitely not ideal.
   > 
   > I have updated the PR to use a top-level REQUEST_TIMEOUT = 60 constant 
near OK_STATUS_CODE and passed it directly to all the requests calls within the 
hook as requested.
   > 
   > Please let me know if there's anything else!
   
   Let’s wait for CI to run. In the meantime, I would check if any of the unit 
tests assert the request calls with params. And modify them if necessary.



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