ashb commented on a change in pull request #20272:
URL: https://github.com/apache/airflow/pull/20272#discussion_r768610862



##########
File path: airflow/models/baseoperator.py
##########
@@ -578,6 +585,25 @@ def __init__(
         if end_date:
             self.end_date = timezone.convert_to_utc(end_date)
 
+        if retries is not None and not isinstance(retries, int):
+            try:
+                parsed_retries = int(retries)
+            except (TypeError, ValueError):
+                raise AirflowException(f"'retries' type must be int, not 
{type(retries).__name__}")
+            self.log.warning("Implicitly converting 'retries' for %s from %r 
to int", self, retries)

Review comment:
       Ah yeah, could be.👍🏻 




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