You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/28 20:06:42 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #25971: Athena and EMR operator max_retries mix-up fix

uranusjr commented on code in PR #25971:
URL: https://github.com/apache/airflow/pull/25971#discussion_r956775475


##########
airflow/providers/amazon/aws/hooks/athena.py:
##########
@@ -188,17 +189,35 @@ def get_query_results_paginator(
         paginator = self.get_conn().get_paginator('get_query_results')
         return paginator.paginate(**result_params)
 
-    def poll_query_status(self, query_execution_id: str, max_tries: Optional[int] = None) -> Optional[str]:
+    def poll_query_status(
+        self,
+        query_execution_id: str,
+        max_polling_attempts: Optional[int] = None,
+        max_tries: Optional[int] = None,
+    ) -> Optional[str]:
         """
         Poll the status of submitted athena query until query state reaches final state.
         Returns one of the final states
 
         :param query_execution_id: Id of submitted athena query
-        :param max_tries: Number of times to poll for query state before function exits
+        :param max_tries: Deprecated - Use max_polling_attempts instead
+        :param max_polling_attempts: Number of times to poll for query state before function exits
         :return: str
         """
+        if max_tries:
+            warnings.warn(
+                f"Method `{self.__class__.__name__}.max_tries` is deprecated and will be removed "
+                "in a future release.  Please use method `max_polling_attempts` instead.",

Review Comment:
   This message does not read right. [Method](https://en.wikipedia.org/wiki/Method_(computer_programming)) is a function on an instance, but these are not.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org