-
Notifications
You must be signed in to change notification settings - Fork 48
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
Get the file location based on path and conn_id #1478
Conversation
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.
do we need a test for this change?
Also, I think, we can add this quirk to docs as well. |
Codecov ReportBase: 93.65% // Head: 93.67% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1478 +/- ##
==========================================
+ Coverage 93.65% 93.67% +0.02%
==========================================
Files 84 84
Lines 4067 4082 +15
Branches 402 404 +2
==========================================
+ Hits 3809 3824 +15
Misses 177 177
Partials 81 81
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
test is failing:
|
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
# Description ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Currently `create_file_location` is picking module path based on `filetype.value` even tough the `conn_id` is passed. https://github.com/astronomer/astro-sdk/blob/main/python-sdk/src/astro/files/locations/__init__.py#L23 get_location_type doesn't take care of fetching the filelocation based on `conn_type` as per `conn_id` at all. It just picks up from the path. <!-- Issues are required for both bug fixes and features. Reference it using one of the following: closes: #ISSUE related: #ISSUE --> closes: #1471 ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Add `validate_conn()` in BaseFilelocation class to match file path and connection type ## Does this introduce a breaking change? No ### Checklist - [x] Created tests which fail without the change (if possible) - [x] Extended the README / documentation, if necessary Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
# Description ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Currently `create_file_location` is picking module path based on `filetype.value` even tough the `conn_id` is passed. https://github.com/astronomer/astro-sdk/blob/main/python-sdk/src/astro/files/locations/__init__.py#L23 get_location_type doesn't take care of fetching the filelocation based on `conn_type` as per `conn_id` at all. It just picks up from the path. <!-- Issues are required for both bug fixes and features. Reference it using one of the following: closes: #ISSUE related: #ISSUE --> closes: #1471 ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Add `validate_conn()` in BaseFilelocation class to match file path and connection type ## Does this introduce a breaking change? No ### Checklist - [x] Created tests which fail without the change (if possible) - [x] Extended the README / documentation, if necessary Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Description
What is the current behavior?
Currently
create_file_location
is picking module path based onfiletype.value
even tough theconn_id
is passed. https://github.com/astronomer/astro-sdk/blob/main/python-sdk/src/astro/files/locations/__init__.py#L23 get_location_type doesn't take care of fetching the filelocation based onconn_type
as perconn_id
at all. It just picks up from the path.closes: #1471
What is the new behavior?
validate_conn()
in BaseFilelocation class to match file path and connection typeDoes this introduce a breaking change?
No
Checklist