amoghrajesh commented on code in PR #44536:
URL: https://github.com/apache/airflow/pull/44536#discussion_r1901676497


##########
providers/src/airflow/providers/edge/cli/api_client.py:
##########
@@ -47,29 +47,30 @@
 logger = logging.getLogger(__name__)
 
 
-def _is_retryable_exception(exception: BaseException) -> bool:
-    """
-    Evaluate which exception types to retry.
+# Hidden config options for Edge Worker how retries on HTTP requests should be 
handled
+# Note: Given defaults make attempts after 1, 3, 7, 15, 31seconds, 1:03, 2:07, 
3:37 and fails after 5:07min
+# So far there is no other config facility in Task SDK we use ENV for the 
moment
+# TODO: Consider these env variables jointly in task sdk together with 
task_sdk/src/airflow/sdk/api/client.py
+API_RETRIES = int(os.getenv("AIRFLOW__EDGE__API_RETRIES", 
os.getenv("AIRFLOW__WORKERS__API_RETRIES", 10)))
+API_RETRY_WAIT_MIN = float(
+    os.getenv("AIRFLOW__EDGE__API_RETRY_WAIT_MIN", 
os.getenv("AIRFLOW__WORKERS__API_RETRY_WAIT_MIN", 1.0))
+)
+API_RETRY_WAIT_MAX = float(
+    os.getenv("AIRFLOW__EDGE__API_RETRY_WAIT_MAX", 
os.getenv("AIRFLOW__WORKERS__API_RETRY_WAIT_MAX", 90.0))
+)

Review Comment:
   Yeah, i think this is a fair set of values, it is configurable in any case 
and shouldn't have a need for people to scream.



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