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

Fixed import from context bug #1412

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Fixed import from context bug #1412

merged 1 commit into from
Apr 23, 2024

Conversation

sfc-gh-bdufour
Copy link
Contributor

@sfc-gh-bdufour sfc-gh-bdufour commented Apr 23, 2024

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.

There is no open Github issue for this PR as it is initiated internally within Snowflake.

  1. 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
  2. Please describe how your code solves the related issue.

A bug was identified in PR #1397 whereby the first time the udf_utils module is loaded, the callback value is read and never updated. This is because of the semantics of from ... import in Python (vs import <module>). The bug was not detected by the existing tests because they incorrectly mocked the state. The tests have been updated now, and the behaviour was verified manually through an end-to-end example. I verified that the tests fail without the associated code change.

Copy link

github-actions bot commented Apr 23, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@sfc-gh-bdufour
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@sfc-gh-bdufour sfc-gh-bdufour added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Apr 23, 2024
@sfc-gh-stan sfc-gh-stan merged commit 9467502 into main Apr 23, 2024
21 of 22 checks passed
@sfc-gh-stan sfc-gh-stan deleted the bdufour-fix-callback branch April 23, 2024 20:13
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 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.

3 participants