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-1418500: Add side effect to _resolve_packages #2174

Merged

Conversation

sfc-gh-aalam
Copy link
Contributor

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

    Fixes SNOW-1418500

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
  3. Please describe how your code solves the related issue.

    We rely on side effect of _resolve_pacakges to add update attribute _packages to add packages https://github.com/snowflakedb/snowflake/blob/main/ExecPlatform/src/coprocessor/python/PythonStoredProcSession.cpp#L106-L111.

In this change, we apply the side effect i.e. update existing_packages_dict or _packages once the packages have been resolved.

@sfc-gh-aalam sfc-gh-aalam added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Aug 27, 2024
@sfc-gh-aalam
Copy link
Contributor Author

sfc-gh-aalam commented Aug 27, 2024

@sfc-gh-aalam sfc-gh-aalam marked this pull request as ready for review August 27, 2024 23:19
@sfc-gh-aalam sfc-gh-aalam requested a review from a team as a code owner August 27, 2024 23:19
Copy link
Contributor

@sfc-gh-jrose sfc-gh-jrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this more or less a reversion of your previous change?

@sfc-gh-aalam
Copy link
Contributor Author

Is this more or less a reversion of your previous change?

It not a complete reversion. In this PR we are only reverting part which was remove side effects from _resolve_packages. We still make a copy of _packages dict that was passed into and update it in a single step instead of updating it all throughout the function.

@sfc-gh-aalam sfc-gh-aalam merged commit f11f6ee into main Aug 28, 2024
32 checks passed
@sfc-gh-aalam sfc-gh-aalam deleted the aalam-SNOW-1418500-add-side-effect-to-resolve_packages branch August 28, 2024 21:26
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2024
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.

4 participants