-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
airbyte-lib: Add pip_url option and enforce source versions in a more consistent manner #33967
airbyte-lib: Add pip_url option and enforce source versions in a more consistent manner #33967
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
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.
One comment/suggestion below, non-blocking.
Apart from that though, what do you think of adding an "uninstall()" action on the venv executor which would simply remove the venv directory? This would be as an inverse of install()
or ensure_installation()
. In my testing on the jupyter notebook, there were cases where the install action failed, but the venv was already (partially) created. In that case, I was left in an unusable state - not able to run the connector, but auto-detection inferred I already had installed the connector because the venv existed.
if installed_version != self.target_version: | ||
# If the version doesn't match, reinstall | ||
self.install() |
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.
Only a suggestion, but I seem to run into a lot of python cases where I get '0.0.0' back - such as when installing from a local path. This might not be necessary, but I think it's worth considering. We can always implement as you've written and just keep an eye out for edge cases. It may already be solved in the latest handling (ignoring when a specific version is not requested), but I want to mention anyway while I'm here.
if installed_version != self.target_version: | |
# If the version doesn't match, reinstall | |
self.install() | |
if installed_version == '0.0.0': | |
# pass or warn; version is either not declared or not detectable | |
pass | |
elif installed_version != self.target_version: | |
# If the version doesn't match, reinstall | |
self.install() |
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.
I considered this in the interim, but I'm hoping that we don't need to hardcode this with the current scheme - if you are working with local / pip-url installed connectors you would just not worry about the version (and thus not specify it) and airbyte-lib won't worry either, so it won't hit this.
I'll go ahead and merge and we can add the 0.0.0 exception if it keeps coming up in some scenarios.
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.
Makes sense! Thanks!
… consistent manner (airbytehq#33967)
… consistent manner (airbytehq#33967)
… consistent manner (airbytehq#33967)
This PR does two things:
pip_url
from https://github.com/airbytehq/airbyte/pull/33878/files