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
SNOW-141545: Request - Reduce package dependencies chaos #284
Comments
Adding my two cents where many others already have as well, using |
Maybe it would be possible to reorganize the code a bit? For example, I see the azure package seems to be used only in the [https://github.com/snowflakedb/snowflake-connector-python/blob/dc31c582be713d73707331092a304928459f8411/file_transfer_agent.py[ file transfer agent., maybe we can remove the dependency and if someone wants to use azure then import it (or fail)? Also, the biggest pain seems to always be boto3 and botocore restrictive dependencies:
Is there a reason why such a restriction is mandatory? |
This is a major headache and we'd love it to be addressed 👍 |
urgh, there is a crapton of stuff pulled in here that should be optional. Why do I need to pull in boto, azure, s3transfer? I'm just firing off some Would you accept a PR to this effect? |
@akdor1154 that would be the solution i proposed indeed, if you do a PR i will check it (im not a maintainer but im sure this PR would be appreciated). While you are at that it would be good to do some cleanup, this package has basically no organization (c extensions and modules all over the root level of the repository) |
It's not that simple, testing infrastructure changes are necessary for this, which were ignored by all of the proposed PRs, or error handling of missing optional dependencies. |
Thanks for the update. My offer for a PR still stands - would this be accepted from the community? Or does it really need to come from a snowflake employee due to the infra requirements? |
Of course you can. I can do the infra changes, but please don't start a new one. See: #260 |
I want to second manuggari's critique. Dependencies which are this specific are inappropriate for a library—it's not a requirements.txt file :-). Moreover—it's the inclusion of "<" and "<=" in requirements which is so problematic. You should always be able to simply use "~=" (with a minor-version reference only) if the library correctly uses semantic versioning, and in the cases where there is an issue with a specific patch version—please use "!=" instead (presume updates will correct the issue), and raise an issue with the author of the library to make sure it is so... When I don't have complex dependencies in an application—this lib works excellent, and I appreciate attempts here to ensure compatibility—but you've got to relinquish a little control sometimes :-). |
Good morning, gentle reminder to try to address this issue, the package broke again today when the Azure dependencies got an update. |
Im not sure this is the right approach, but I just released a snowflake-connector package that is basically, this package but with the least amount of dependencies. https://pypi.org/project/snowflake-connector-python-lite/ Would love to hear everyone's thoughts. |
Guys please fix this, it broke again, can't even count the occurrences anymore. It's really a pain. |
What is the issue specifically? |
@jacopoch check this alternative package instead https://pypi.org/project/snowflake-connector-python-lite/ |
@manugarri we're now evaluating either forking this package and fixing it a bit or testing if we can use |
@jacopoch hey feel free to submit PRs to snowflake-connector-python-lite, i did the least amount of changes to reduce unnecessary package dependencies, but would love to get more eyes on it!. BTW, I also released snowflake-sqlalchemy-lite and snowconn-lite following the same principles. |
Hi There. Any progress in this case? |
@Alonreznik check this alternative package instead https://pypi.org/project/snowflake-connector-python-lite/ |
|
yeah , I will add it to the pypy page. https://github.com/manugarri/snowflake-connector-python-lite |
@manugarri Amazing! Do you know have any aim to update it to the latest connector version? I would love to see how to make it without breaking the original repo. Thanks! |
hmm yeah that is an issue, right now i ported things manually. You could definitely help doing a PR and i will redeploy |
It's nice to see the community helping each other out 😄 If I could make a recommendation @manugarri I'd encourage you to use GitHub actions to do build and releases, as building our C extensions for different OSes requires all 3 OSes to build separate wheels. And getting the right OS setups is also non-trivial. |
@sfc-gh-mkeller Thank you in advanced Alon |
@sfc-gh-mkeller, any update on this? We ran into a problem whit a project that only requires the dialect parts of the Please fix this mess. |
Hi @frsann |
Ok, I'm a bit offended by you response to be honest. You and I both know technical support wont be fixing the dependency mess in this project. |
Sorry in what sense? The package dependency chaos has been highlighted over a year ago by multiple customers at different times here and the connector hasn't been really refactored yet, are there any plans to make the situation better? We haven't been able to get any conclusive answer from our contacts at Snowflake in the past year and we're every now and then wondering what is being done to address this problem if anything at all :) It's one of the most complex dependencies we have currently |
@frsann Support is a integral part of triaging and investigation of issues. If they can't help you out on their own they will help you collect the necessary information. @jacopoch We understand that this is a major headache, but please be patient and understand that this is a non-trivial change and it has been actively worked on. We have been evaluating different ways to mitigate the SDK problems we have had (there were many). In the meantime we have relaxed our dependencies where possible. |
I think on our end it's naturally quite hard to understand what's being worked on and what are the plans (unfortunately your Jira is not reachable for customers) and I think part of the issue here is actually not referencing a work item with a breakdown of the scope/plan of work on this repository, this issue can be solved easily from your end (without overcommitting / overpromising). If #725 is supposed to fix this issue, it wasn't referenced here before even if the commits are already from the end of March 👍 |
@sfc-gh-mkeller good to know, really looking forward to leaving this issue behind after a year and a half advocating for it to be fixed :) As a side note, on #725 I dont see any mention to the package requirements being dropped in the commit description (only the name of the commit hints at it). Given how this was a major source of conflicts within snowflake customers it would have been good if it was addressed there. Also i dont see any change to setup.py on that PR (the cloud requirements still exist as required in master as of today). How does the pr reduces dependencies? |
@manugarri for 1 release we’ll keep around the old code path and the dependencies just in case something were to go wrong given the extent of these changes. Once we confirm all is working as expected, we will remove these dependencies completely. |
The plan in the short term is to keep reevaluating all the rest of our dependencies, but #845 has removed our largest dependencies for now |
@sfc-gh-mkeller , the PR looks great, thanks a ton! |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using (
python --version
)?python 3.7
What operating system and processor architecture are you using (
python -c 'import platform; print(platform.platform())'
)?Linux-5.3.0-40-generic-x86_64-with-debian-buster-sid
What are the component versions in the environment (
pip list
)?If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
i manage our etl and reporting frameworks so i maintain different snowflake-connector-python versions at all times
docker builds not failling every week because of snowflake-connector-python crazy and nonsensical requirements that should be set up as external optional dependencies
package errors when importing snowflake-connector-python
since when this happens i have to fix it i cant provide the logs, will do next time it breaks
Basically I think the chaotic behavior of snowflake connector package dependency could be mitigated if most dependencies are moved as optional, such as azure, crypto, etcetera.
The text was updated successfully, but these errors were encountered: