generated from astronomer/airflow-provider-sample
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify the project structure and debugging (#93)
This PR flattens the provider folder structure to improve troubleshooting DAGs created with this provider and the provider's developer experience. It contains **breaking changes**, which is fine since the provider has not reached a stable state yet (we're under the 1.0 release). As part of this PR, we are changing 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 | Previously, there were four modules within the `ray_provider` named `ray.py`. Not only was the project structure more nested and complex than it had to be, making the overall project maintainability harder without a benefit, but this caused many problems when troubleshooting the actual ray provider. The following logs illustrate the problem from a debugging perspective: ![Screenshot 2024-11-26 at 15 10 22](https://github.com/user-attachments/assets/1cd87019-af9f-4c36-942e-e75983b2fada) Different lines mentioning `ray.py` referenced different modules. It was time-consuming and frustrating for developers to troubleshoot and identify which `ray.py` the logs referred to: was it the `hooks/ray.py`, `operators/ray.py`, `trigerrer/ray.py`, or `deocrators/ray.py`? This sort of ambiguity significantly delayed the development of #81. We aim to reduce development time by introducing this change.
- Loading branch information
Showing
27 changed files
with
188 additions
and
166 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Hook | ||
----- | ||
|
||
.. automodule:: ray_provider.hooks.ray | ||
.. automodule:: ray_provider.hooks | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Operators | ||
--------- | ||
|
||
.. automodule:: ray_provider.operators.ray | ||
.. automodule:: ray_provider.operators | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Trigger | ||
-------- | ||
|
||
.. automodule:: ray_provider.triggers.ray | ||
.. automodule:: ray_provider.triggers | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
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
Empty file.
File renamed without changes.
Empty file.
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
Empty file.
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
Empty file.
Empty file.
Empty file.
Empty file.
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
Oops, something went wrong.