Skip to content

Conversation

@sfc-gh-turbaszek
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 #NNNN

  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 modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

  4. (Optional) PR for stored-proc connector:

Comment on lines 53 to 57
# Load the core library - failures are captured in core_loader and don't prevent module loading
try:
core_loader.load()
except Exception:
# Silently continue if core loading fails - the error is already captured in core_loader
# This ensures the connector module loads even if the minicore library is unavailable
pass

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably redundant because load method is already big try / except

Copy link
Collaborator

@sfc-gh-pczajka sfc-gh-pczajka left a comment

Choose a reason for hiding this comment

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

Approved with small non-blocking comments

if self._is_core_disabled():
self._error = "mini-core-disabled"
return
self._error = "still-loading"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we wrap it into an error / change class definition to Exception | str | None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you add more context why? _is_core_disabled is imo safe on its own. All getters should be safe to use. The only one potentially causing the issue is get_core_version but bytes decoding is in try/except already.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just keeping types clean, it won't cause problems now as all reads are later casted to str anyway.
The field definition promises Error, not Error or str, I'd expect that content is raiseable if exists.

def load(self):
"""Spawn a separate thread to load the minicore library (non-blocking)."""
if self._is_core_disabled():
self._error = "mini-core-disabled"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we wrap it into an error / change class definition to Exception | str | None?

@sfc-gh-turbaszek sfc-gh-turbaszek force-pushed the turbaszek-add-core-import branch from 027ac5a to 86bf408 Compare December 9, 2025 09:34
@sfc-gh-turbaszek sfc-gh-turbaszek changed the title NO-SNOW: Add core library import SNOW-2465273: Add core library import Dec 9, 2025
@sfc-gh-turbaszek sfc-gh-turbaszek marked this pull request as ready for review December 9, 2025 13:59
@sfc-gh-turbaszek sfc-gh-turbaszek requested a review from a team as a code owner December 9, 2025 13:59
@sfc-gh-turbaszek sfc-gh-turbaszek force-pushed the turbaszek-add-core-import branch from 39d7e7e to 4cff143 Compare December 11, 2025 12:40
Move telemetry from auth request to in-band

Add option to disable core loading

Fetch binary before building distribution

Include the binary in repo

Add audit wheel
@sfc-gh-turbaszek sfc-gh-turbaszek force-pushed the turbaszek-add-core-import branch from 5d4d8ca to 408f7c2 Compare December 12, 2025 15:16
@sfc-gh-pczajka sfc-gh-pczajka merged commit 1184c51 into main Dec 15, 2025
135 of 141 checks passed
@sfc-gh-pczajka sfc-gh-pczajka deleted the turbaszek-add-core-import branch December 15, 2025 18:15
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants