samhita-alla opened a new pull request #22643: URL: https://github.com/apache/airflow/pull/22643
Signed-off-by: Samhita Alla <[email protected]> <!-- Thank you for contributing! Please make sure that your code changes are covered with tests. And in case of new features or big changes remember to adjust the documentation. Feel free to ping committers for the review! In case of existing issue, reference it using one of the following: closes: #ISSUE related: #ISSUE How to write a good git commit message: http://chris.beams.io/posts/git-commit/ --> This PR adds a new community provider to allow Airflow users to interact with Flyte from within Airflow. A bit about Flyte: [Flyte](https://www.flyte.org/) is an open-source, container-native, structured programming and distributed processing platform that enables highly concurrent, scalable, and maintainable workflows for machine learning and data processing pipelines. As a more significant chunk of the users who are into _pipelines_ are using Airflow, it'd be really helpful to have a provider that bridges the gap between Airflow and Flyte, to help the Airflow users retain their existing pipelines and use Flyte from within the Airflow DAGs to run the machine learning jobs (say). We've had this operator in the back of our minds for a long time; here's the [issue](https://github.com/flyteorg/flyte/issues/544). Code Interface --------------- The provider defines a `hook`, an `operator`, and a `sensor`. When the user instantiates the `AirflowFlyteOperator`, it creates a `FlyteRemote` (Flyte's Python API) object, triggers the execution in the Flyte environment, waits for the execution to complete, and finally, returns the execution name. This implementation is carried out using the methods defined in the `hook`. The executions are triggered synchronously by default. One can set `asynchronous` to `True` if the execution needs to be polled asynchronously; the polling would be handled by the `sensor`. Tests ------ Unit tests have been added and tested. Also, I spun up an Airflow instance to validate the code in real-time. TODO ------ - [ ] Update the flytekit version from `0.32.0b0` to `0.32.0` after the latter release is out. --- **^ Add meaningful description above** Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information. In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed. In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md). -- 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]
