-
Notifications
You must be signed in to change notification settings - Fork 117
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-903907: Fix custom package uplaod bug #1054
SNOW-903907: Fix custom package uplaod bug #1054
Conversation
src/snowflake/snowpark/session.py
Outdated
f"Cannot add dependency package '{name}=={version}' " | ||
f"because {result_dict[name]} is already added." | ||
) | ||
else: |
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.
nit: this else
can be removed
) | ||
if version is not None: | ||
added_package_has_version = "==" in result_dict[name] | ||
if added_package_has_version and result_dict[name] != str(package): |
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.
Can we add a comment about what an entry of result_dict
looks like and what package
looks like? It's not obvious to me why result_dict[name] != str(package)
is correct 🤔
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.
added a comment to explain how things look
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes #SNOW-903907
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
The test is already present in
test_packaging::test_add_requirements_unsupported_with_cache_path
which is failing on merge gates on 3.9/3.10 runtimes. The fix is to get merge-gates back