Skip to content

Conversation

@ivergara
Copy link
Collaborator

Snowflake is changing the auth flow. Until now, we were using a regular user account, however, those account types will require MFA which is not feasible for CI work.

The alternative I'm using here is to use a key pair.

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.28%. Comparing base (73c9e9a) to head (707f672).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #305   +/-   ##
=======================================
  Coverage   91.28%   91.28%           
=======================================
  Files          18       18           
  Lines        2066     2066           
=======================================
  Hits         1886     1886           
  Misses        180      180           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ivergara ivergara requested a review from kklein December 17, 2025 14:22
@ivergara
Copy link
Collaborator Author

@kklein I'm surprised it worked almost out of the box!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates Snowflake authentication from password-based to key pair authentication for CI environments, addressing Snowflake's upcoming requirement for MFA on regular user accounts which is not feasible for automated CI workflows.

Key Changes:

  • Implemented private key authentication using cryptography library to load and serialize PEM keys
  • Updated connection string to remove password parameter and added connect_args for private key
  • Replaced SNOWFLAKE_PASSWORD with SNOWFLAKE_PRIVATE_KEY secret in CI workflow

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/integration/conftest.py Added private key loading and serialization logic, removed password authentication, and updated connection creation to use key pair auth
.github/workflows/ci.yaml Updated environment variable from SNOWFLAKE_PASSWORD to SNOWFLAKE_PRIVATE_KEY

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@kklein kklein left a comment

Choose a reason for hiding this comment

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

LGTM - thanks! :)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kklein
Copy link
Collaborator

kklein commented Dec 17, 2025

@ivergara Would you mind rerunning the pre-commit hooks?

@ivergara ivergara merged commit c770c9f into main Dec 17, 2025
34 checks passed
@ivergara ivergara deleted the snowflake-auth-update branch December 17, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants