jedcunningham commented on code in PR #30279:
URL: https://github.com/apache/airflow/pull/30279#discussion_r1223277359
##########
airflow/providers/amazon/aws/triggers/batch.py:
##########
Review Comment:
I don't see any test coverage for this trigger?
##########
airflow/providers/amazon/aws/triggers/batch.py:
##########
@@ -105,3 +105,92 @@ async def run(self):
yield TriggerEvent({"status": "failure", "message": "Job Failed -
max attempts reached."})
else:
yield TriggerEvent({"status": "success", "job_id": self.job_id})
+
+
+class BatchSensorTrigger(BaseTrigger):
+ """
+ Checks for the status of a submitted job_id to AWS Batch until it reaches
a failure or a success state.
+ BatchSensorTrigger is fired as deferred class with params to poll the job
state in Triggerer.
+
+ :param job_id: the job ID, to poll for job completion or not
+ :param aws_conn_id: connection id of AWS credentials / region name. If
None,
Review Comment:
These are out of order.
##########
airflow/providers/amazon/aws/sensors/batch.py:
##########
@@ -41,6 +43,7 @@ class BatchSensor(BaseSensorOperator):
:param job_id: Batch job_id to check the state for
:param aws_conn_id: aws connection to use, defaults to 'aws_default'
:param region_name: aws region name associated with the client
+ :param deferrable: Run sensor in the deferrable mode.
Review Comment:
Why aren't `poke_interval` and `max_retries` here?
--
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]