generated from astronomer/airflow-provider-sample
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the local development environment and update documentation #92
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'll make the necessary changes so that the integration tests that use GCP GKE are functional again: |
pankajastro
previously approved these changes
Nov 27, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Previously, we were only able to run the example DAG , with a few tweaks. None of the remaining example DAGs would run in the local Kind cluster when using the local Astro CLI setup. There were multiple reasons for this, including network limitations, default Kind limitations and lack of configuration on the Docker and Kind side. This PR shares the pain points and the fixes, allowing anyone running the Ray Provider exmaple DAGs in MacOS (M1) to be able to run the example DAGs locally and successfully spin up Ray Clusters from Airflow.
tatiana
force-pushed
the
issue-81-local-setup
branch
from
November 27, 2024 14:10
bde4aee
to
d80e5dc
Compare
pankajastro
approved these changes
Nov 27, 2024
Merged
tatiana
added a commit
that referenced
this pull request
Nov 29, 2024
**Breaking changes** * Removal of ``SubmitRayJob.terminal_states``. The same values are now available at ``ray_provider.constants.TERMINAL_JOB_STATUSES``. * Simplify the project structure and debugging by @tatiana in #93 In order to improve the development and troubleshooting DAGs created with this provider, we introduced breaking changes to the folder structure. It was flattened and the import paths to existing decorators, hooks, operators and trigger changed, as documented in the table below: | Type | Previous import path | Current import path | |-----------|---------------------------------------------|-----------------------------------------| | Decorator | ray_provider.decorators.ray.ray | ray_provider.decorators.ray | | Hook | ray_provider.hooks.ray.RayHook | ray_provider.hooks.RayHook | | Operator | ray_provider.operators.ray.DeleteRayCluster | ray_provider.operators.DeleteRayCluster | | Operator | ray_provider.operators.ray.SetupRayCluster | ray_provider.operators.SetupRayCluster | | Operator | ray_provider.operators.ray.SubmitRayJob | ray_provider.operators.SubmitRayJob | | Trigger | ray_provider.triggers.ray.RayJobTrigger | ray_provider.triggers.RayJobTrigger | **Features** * Support using callable ``config`` in ``@ray.task`` by @tatiana in #103 * Support running Ray jobs indefinitely without timing out by @venkatajagannath and @tatiana in #74 **Bug fixes** * Fix integration test and bug in load balancer wait logic by @pankajastro in #85 * Bugfix: Better exception handling and cluster clean up by @venkatajagannath in #68 * Stop catching generic ``Exception`` in operators by @tatiana in #100 * Stop catching generic ``Exception`` in trigger by @tatiana in #99 **Docs** * Add docs to deploy project on Astro Cloud by @pankajastro in #90 * Fix dead reference in docs index page by @pankajastro in #87 * Cloud Auth documentation update by @venkatajagannath in #58 * Improve main docs page by @TJaniF in #71 **Others** Local development * Fix the local development environment and update documentation by @tatiana in #92 * Enable secret detection precommit check by @pankajastro in #91 * Add astro cli project + kind Raycluster setup instruction by @pankajastro in #83 * Remove pytest durations from tests by @tatiana in #102 * Fix running make docker-run when there is a new version by @tatiana in #99 and #101 * Improve Astro CLI DAGs test so running hatch test-cov locally doesn't fail by @tatiana in #97 CI * CI improvement by @venkatajagannath in #73 * CI fix related to broken coverage upload artifact by @pankajkoti in #60 * Allow tests to run for PRs from forked repos by @venkatajagannath in #72 * Update CODEOWNERS by @tatiana in #84 * Add Airflow 2.10 (released in August 2024) to tests by @tatiana in #96
This was referenced Dec 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the local development environment using Astro CLI and a Kind Kubernetes cluster, and update the documentation.
While implementing #81, I faced several issues in the local development environment. Unfortunately, the existing documentation and configuration did not allow developers to run the example DAGs locally.
One of the main issues was that Airflow (running in Docker via Astro CLI) could not connect to Kind properly. Once that was solved, another critical problem was that Airflow could not access the Ray clusters created in the Kind Kubernetes cluster.
Some of the issues faced include:
After applying all these changes, I was able to successfully run all the example DAGs locally:
As illustrated below:
With this PR, I hope to save other Ray provider developers time.