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

fix(go/adbc/driver/snowflake): try to suppress stray logs #2608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lidavidm
Copy link
Member

@lidavidm lidavidm commented Mar 12, 2025

It turns out gosnowflake also exposes a log level control; set this to "warn".

I also filed snowflakedb/gosnowflake#1332. We need the fix to be upstream since ultimately the log message is triggered by constructing a global, so we're powerless to suppress it.

@lidavidm lidavidm requested a review from paleolimbot March 12, 2025 05:35
@lidavidm
Copy link
Member Author

It appears gosnowflake uses logrus which defaults to "info" so that would explain why we're seeing the stray info log.

@lidavidm
Copy link
Member Author

Ah...the log message comes from a constructor for a global object, so it runs before we can suppress the message. While this PR is still good to have, it can't fix the underlying issue; we need Snowflake to fix it.

@lidavidm lidavidm changed the title fix(go/adbc/driver/snowflake): suppress stray logs fix(go/adbc/driver/snowflake): try to suppress stray logs Mar 12, 2025
@lidavidm
Copy link
Member Author

The one thing I can do here is wire up the snowflake logger to the ADBC logger at least.

@paleolimbot
Copy link
Member

Thanks for looking into this!

A while back I patched gosnowflake specifically for a CRAN submission because it was creating files when initializing a global (maybe the same one). If useful, the patch is here: #1315 (comment)

@lidavidm
Copy link
Member Author

Ah, that's what I was vaguely remembering. That seems to be a different code path but I suppose the same line of thinking.

@lidavidm
Copy link
Member Author

Hmm, seems Snowflake has a global logger + it's pretty tied to the logrus interface; might not be good to bridge the two by default. Going to leave this PR as-is then

@lidavidm lidavidm marked this pull request as ready for review March 13, 2025 01:40
@lidavidm lidavidm requested a review from zeroshade as a code owner March 13, 2025 01:40
@github-actions github-actions bot modified the milestone: ADBC Libraries 18 Mar 13, 2025
@lidavidm
Copy link
Member Author

FWIW Dewey, it seems the PR where Snowflake is fixing this is primarily adding some file-based cache of auth tokens...so we might just be trading one problem for another (if stray files are a concern for CRAN)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants