Skip to content

Conversation

@adrian-adikteev
Copy link
Contributor

@adrian-adikteev adrian-adikteev commented Nov 15, 2024


Currently, when using wait_for_complition=True it will trigger the node to only wait until the cluster is successfully launched.
I added the option wait_policy so that one can chose what waiter will be used.

Possible values:

  • None: No wait (default)
  • WaitPolicy.WAIT_FOR_COMPLETION: Previous behaviour when wait_for_completion was True
  • WaitPolicy.WAIT_FOR_STEPS_COMPLETION: New behaviour - wait for the cluster to terminate.

This is useful because it will eliminate the need to have an extra node in your DAG.

@boring-cyborg
Copy link

boring-cyborg bot commented Nov 15, 2024

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)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you cover this new use case in a unit test?

@adrian-adikteev adrian-adikteev changed the title Add wait_for_steps_completion option to EmrCreateJobFlowOperator. Add wait_policy option to EmrCreateJobFlowOperator. Nov 18, 2024
@vincbeck
Copy link
Contributor

Good job! I like that version

@adrian-adikteev
Copy link
Contributor Author

I'm not sure what's the next step here but from my side everything is ready.

Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good! Just one nit and you do not a newsfragment for this change

Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@adrian-adikteev
Copy link
Contributor Author

adrian-adikteev commented Nov 25, 2024

Should be ready for merge

Possible values:

- None: No wait (default)
- WaitPolicy.WAIT_FOR_COMPLETION: Previous behaviour when wait_for_completion was True
- WaitPolicy.WAIT_FOR_STEPS_COMPLETION: New behaviour - wait for the cluster to terminate.
@vincbeck vincbeck merged commit b4c4806 into apache:main Nov 25, 2024
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 25, 2024

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants