ferruzzi commented on a change in pull request #20806:
URL: https://github.com/apache/airflow/pull/20806#discussion_r782594456



##########
File path: airflow/executors/kubernetes_executor.py
##########
@@ -50,8 +50,17 @@
 from airflow.utils.session import provide_session
 from airflow.utils.state import State
 
-# TaskInstance key, command, configuration, pod_template_file
-KubernetesJobType = Tuple[TaskInstanceKey, CommandType, Any, Optional[str]]
+
+class KubernetesJobType(NamedTuple):
+    key: TaskInstanceKey
+    command: CommandType
+    config: Any
+    pod_template_file: Optional[str]
+    next_allowed_retry: datetime
+    retry_count: int
+
+
+RETRY_BACKOFF_SECONDS = [1, 2, 5, 10, 10, 30, 60, 60]

Review comment:
       As a counterpoint, perhaps a formula for the backoff (exponential 
backoff? doubling?) and set a limit to the number of retries instead of 
defining the exact times like this?




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