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

[ADAP-1049] [Bug] Snowflake SSO Token expiration not surfaced in logs #851

Closed
2 tasks done
colin-rogers-dbt opened this issue Nov 28, 2023 · 2 comments · Fixed by #1072
Closed
2 tasks done

[ADAP-1049] [Bug] Snowflake SSO Token expiration not surfaced in logs #851

colin-rogers-dbt opened this issue Nov 28, 2023 · 2 comments · Fixed by #1072
Assignees
Labels
bug Something isn't working

Comments

@colin-rogers-dbt
Copy link
Contributor

colin-rogers-dbt commented Nov 28, 2023

Is this a new bug in dbt-snowflake?

  • I believe this is a new bug in dbt-snowflake
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

SSO auth is silently failing after token expiration. This is due to the exception handling assuming that none is the only failure signal so when we go to return the access token (i.e. return result_json["access_token"]) it fails as the "access_token" isn't in the result_json.

Section of code:

if result_json is None:

Expected Behavior

If the access_token is not in result_json we return an auth failure exception with the exception message from snowflake.

Steps To Reproduce

See: https://dbtlabs.atlassian.net/browse/CC-860
On Version 1.5.9 ->
Token expired for Snowflake SSO ->
Run ‘dbt run’ command in the IDE

Relevant log output

No response

Environment

- OS:
- Python:
- dbt-core:
- dbt-snowflake:

Additional Context

No response

@colin-rogers-dbt colin-rogers-dbt added bug Something isn't working triage labels Nov 28, 2023
@github-actions github-actions bot changed the title [Bug] Snowflake SSO Token expiration not surfaced in logs [ADAP-1049] [Bug] Snowflake SSO Token expiration not surfaced in logs Nov 28, 2023
@dbeatty10 dbeatty10 removed the triage label Nov 28, 2023
@jtcohen6
Copy link
Contributor

jtcohen6 commented May 21, 2024

I think this could be a relatively simple addition within our exception_handler. An illustrative example: 382a890

To test this, I'd hope that we could extend TestSnowflakeOauth but with an invalid refresh token.

@colin-rogers-dbt
Copy link
Contributor Author

Use unit tests instead of functional test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants