Skip to content
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

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

sfc-gh-aalam
Copy link
Contributor

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #SNOW-903907

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
  3. 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

@sfc-gh-aalam sfc-gh-aalam added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Sep 21, 2023
@sfc-gh-aalam sfc-gh-aalam marked this pull request as ready for review September 21, 2023 01:34
@sfc-gh-aalam sfc-gh-aalam requested a review from a team as a code owner September 21, 2023 01:34
f"Cannot add dependency package '{name}=={version}' "
f"because {result_dict[name]} is already added."
)
else:
Copy link
Collaborator

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):
Copy link
Collaborator

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 🤔

Copy link
Contributor Author

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

@sfc-gh-aalam sfc-gh-aalam merged commit f88ff12 into main Sep 22, 2023
50 checks passed
@sfc-gh-aalam sfc-gh-aalam deleted the aalam-SNOW-903907-fix-custom-package-upload branch September 22, 2023 22:33
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants