Fix automatic termination issue in EmrOperator by ensuring waiter_max_attempts is set for deferrable triggers#38658
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
4e994ab to
d45f471
Compare
|
can you add unit tests to cover this change? |
|
@eladkal I have also added unit tests. Please review |
|
Tests need to pass after your rebase from main. Otherwise looks good to merge |
67c7eda to
bee2bb9
Compare
|
Running workflows again after recent commits |
|
@o-nikolas Previously, I was unable to properly test in my development environment because different dependency errors occurred. After solving the problem and running tests, I found that when deferrable is set to True, the |
CC @syedahsn |
bee2bb9 to
12e5369
Compare
syedahsn
left a comment
There was a problem hiding this comment.
Left a couple of comments. Thanks for looking into this!
9d48300 to
b992536
Compare
b992536 to
4fb4fbe
Compare
4fb4fbe to
23fad98
Compare
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
…max_attempts` is set for deferrable triggers (apache#38658)
When running EMR jobs that require a long duration, setting the
waiter_max_attemptsin EmrOperator to a high value does not prevent the "waiter error: max attempts" error from occurring after a certain period.An issue has been identified with the AWS provider code.
The
EmrOperatorthat calls this trigger does not allow users to inputwaiter_max_attempts, resulting in the application of the default value of 600.airflow/providers/amazon/aws/triggers/emr.pyIn other words, if the
poll_intervalis set to 60 seconds, the job will terminate after 10 hours (1 minute * 600) regardless of thewaiter_max_attemptsvalue specified by the user.To address this, modifications were made in
EmrOperatorto ensure that parameters provided by the user are also passed to theEmrContainerTrigger.