dazza-codes commented on a change in pull request #6811: [RFC][AIRFLOW-6245] 
Add custom waiters for AWS batch jobs
URL: https://github.com/apache/airflow/pull/6811#discussion_r361805652
 
 

 ##########
 File path: tests/test_core_to_contrib.py
 ##########
 @@ -810,12 +812,21 @@
         "airflow.providers.amazon.aws.sensors.sqs.SQSSensor",
         "airflow.contrib.sensors.aws_sqs_sensor.SQSSensor",
     ),
+]
 
+PROTOCOLS = [
+    (
+        "airflow.providers.amazon.aws.hooks.batch_client.AwsBatchProtocol",
+        "airflow.contrib.operators.awsbatch_operator.BatchProtocol",
+    ),
 ]
-ALL = HOOK + OPERATOR + SENSOR
+
+
+ALL = HOOK + OPERATOR + SENSOR + PROTOCOLS
+
 RENAMED_HOOKS = [
     (old_class, new_class)
-    for old_class, new_class in ALL
+    for old_class, new_class in HOOK + OPERATOR + SENSOR
 
 Review comment:
   `ALL` now includes the new `PROTOCOLS` and it passes most of the tests for 
`ALL`, but the latter do not pass all the tests applied to the classes in 
`RENAMED_HOOKS`.  To fully get it, checkout the branch, use `ALL` and run this 
test to see that the `PROTOCOLS` do not pass the same set of tests because the 
`PROTOCOLS` are not instantiated and they do not call `super` from an init.  I 
tried various ways to "make" them conform, without success, so I decided they 
are a category all of their own and they need their own test for the deprecated 
warning.  Open to suggestions on how this could be improved, but obviously it 
wasn't the main focus of this PR to start with, so this is all ad-hoc 
improvements.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to