Miretpl commented on code in PR #73071:
URL: https://github.com/apache/airflow/pull/73071#discussion_r4672382057


##########
providers/microsoft/azure/tests/unit/microsoft/azure/triggers/test_batch.py:
##########
@@ -285,3 +288,30 @@ async def test_trigger_timeout(self, mock_to_thread, 
mock_time):
                 }
             )
         ]
+
+    @pytest.mark.asyncio
+    async def test_trigger_passes_retry_total_to_hook(self):
+        completed_task = mock.MagicMock()

Review Comment:
   Could you specify `spec`/`autospec` here? Otherwise, it will mock everything.



##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/batch.py:
##########
@@ -67,8 +67,8 @@ class AzureBatchOperator(BaseOperator):
     :param batch_start_task: A Task specified to run on each Compute Node as 
it joins the Pool.
         The Task runs when the Compute Node is added to the Pool or
         when the Compute Node is restarted.
-    :param batch_max_retries: The number of times to retry this batch 
operation before it's
-        considered a failed operation. Default is 3
+    :param batch_max_retries: The maximum number of retries for the batch 
operation.

Review Comment:
   ```suggestion
       :param batch_max_retries: The maximum number of retries for the Azure 
Batch requests.
   ```



##########
providers/microsoft/azure/tests/unit/microsoft/azure/operators/test_batch.py:
##########
@@ -218,6 +219,27 @@ def setup_test_cases(self, mocked_batch_client, 
create_mock_connections):
             timeout=2,
         )
 

Review Comment:
   Could you modify the `test_execute_defers` test to include verification of 
the operator -> trigger value set?



##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/batch.py:
##########
@@ -44,13 +46,15 @@ def __init__(
         azure_batch_conn_id: str,
         end_time: float,
         poll_interval: int = 30,
+        retry_total: int | None = None,
     ):

Review Comment:
   ```suggestion
       ) -> None:
   ```
   line not changed here, but I noticed that we don't have here type annotation.



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