pankajkoti commented on code in PR #30945:
URL: https://github.com/apache/airflow/pull/30945#discussion_r1183679249
##########
airflow/providers/amazon/aws/waiters/emr-containers.json:
##########
@@ -0,0 +1,18 @@
+{
+ "version": 2,
+ "waiters": {
+ "container_job_complete": {
+ "operation": "DescribeJobRun",
+ "delay": 30,
+ "maxAttempts": 60,
+ "acceptors": [
+ {
+ "matcher": "path",
+ "argument": "jobRun.state",
+ "expected": "COMPLETED",
+ "state": "success"
+ }
Review Comment:
Can we also include here acceptors for the terminal states:`FAILED` and
`CANCELLED` here with `"state": "failure"`
I mean e.g.
```
{
"matcher": "path",
"argument": "jobRun.state",
"expected": "FAILED",
"state": "failure"
},
{
"matcher": "path",
"argument": "jobRun.state",
"expected": "CANCELLED",
"state": "failure"
},
```
ref:
https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_DescribeJobRun.html
https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks-jobs-states.html
Otherwise, the waiter will have to wait until `max_attempts` are done
although the Batch job might have failed already.
##########
airflow/providers/amazon/aws/waiters/emr-containers.json:
##########
@@ -0,0 +1,18 @@
+{
+ "version": 2,
+ "waiters": {
+ "container_job_complete": {
+ "operation": "DescribeJobRun",
+ "delay": 30,
+ "maxAttempts": 60,
+ "acceptors": [
+ {
+ "matcher": "path",
+ "argument": "jobRun.state",
+ "expected": "COMPLETED",
+ "state": "success"
+ }
Review Comment:
Can we also include here acceptors for the terminal states:`FAILED` and
`CANCELLED` here with `"state": "failure"`
I mean e.g.
```
{
"matcher": "path",
"argument": "jobRun.state",
"expected": "FAILED",
"state": "failure"
},
{
"matcher": "path",
"argument": "jobRun.state",
"expected": "CANCELLED",
"state": "failure"
},
```
ref:
https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_DescribeJobRun.html
https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks-jobs-states.html
Otherwise, the waiter will have to wait until `max_attempts` are done
although the Batch job might have failed/got cancelled already.
--
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]