Skip to content

feat(experimentation): add a Snowflake statement client - #9008

Merged
Zaimwa9 merged 4 commits into
mainfrom
feat/snowflake-statement-client
Nov 27, 2026
Merged

Zaimwa9 merged 4 commits into
mainfrom
feat/snowflake-statement-client

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

  • Add a client for Snowflake's SQL API with key-pair (JWT) authentication, using requests and PyJWT (no new dependency).
  • It submits a statement with positional bindings, polls and cancels at the deadline, and decodes results by column type.
  • Existing SnowflakeWarehouse behaviour is unchanged; the provider follows in a later PR.

How did you test this code?

Unit tests with mocked HTTP (100% coverage of warehouses/snowflake.py), plus a real Snowflake account for every binding type, result type and error case; the poll-and-cancel path is unit-tested only.

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 27, 2026 9:00am UTC
flagsmith-frontend-preview Ignored Ignored Preview Nov 27, 2026 9:00am UTC
flagsmith-frontend-staging Ignored Ignored Preview Nov 27, 2026 9:00am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes add a SnowflakeCredentials type and a Snowflake warehouse session. The session validates configuration and credentials, creates key-pair JWT authentication, submits and polls statements, handles timeouts and request errors, and converts supported results. Unit tests cover configuration, authentication, bindings, execution, cancellation, errors, and result conversion.

Estimated code review effort: 4 (Complex) | ~35 minutes

Merge Risk: Moderate · up to c11c5

The client is not yet wired into the provider, so exposure is limited. Before merge, fix the single-token reuse during long polling and cancellation, reject incomplete 391908 results, and stop rewriting placeholder-like text inside SQL literals.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 9718af0d-5400-4c3e-a349-ac854bf8f911
Commits

Reviewing files that changed from the base of the PR and between d39dfc6 and c11c569.

Files selected for processing: 2

  • api/experimentation/warehouses/snowflake.py
  • api/tests/unit/experimentation/warehouses/test_snowflake.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@github-actions github-actions Bot added api Issue related to the REST API feature New feature or request labels Nov 18, 2026
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.93%. Comparing base (02dd781) to head (73458da).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #9008    +/-   ##
========================================
  Coverage   98.93%   98.93%            
========================================
  Files        1715     1716     +1     
  Lines       72779    73141   +362     
========================================
+ Hits        72002    72364   +362     
  Misses        777      777            

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Zaimwa9
Zaimwa9 marked this pull request as ready for review November 18, 2026 14:52
@Zaimwa9
Zaimwa9 requested a review from a team as a code owner November 18, 2026 14:52
@Zaimwa9
Zaimwa9 requested review from emyller and removed request for a team November 18, 2026 14:52
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-9008 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-9008 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-9008 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith:pr-9008 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-private-cloud:pr-9008 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-api:pr-9008 Finished ✅ Results ✅

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Nov 18, 2026
@Zaimwa9
Zaimwa9 removed the request for review from emyller November 18, 2026 14:55

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files

Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.

Turn on auto-fix | Re-trigger cubic

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23872 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 12 seconds
commit  73458da
info  🔄 Run: #23872 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-16 — run #23872 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  6 passed

Details

stats  6 tests across 5 suites
duration  3 seconds
commit  73458da
info  🔄 Run: #23872 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #23872 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.7 seconds
commit  73458da
info  🔄 Run: #23872 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #23872 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  32 seconds
commit  73458da
info  🔄 Run: #23872 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #23662 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  7 passed

Details

stats  7 tests across 5 suites
duration  37.7 seconds
commit  ed2a0c3
info  🔄 Run: #23662 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23662 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  8 passed

Details

stats  8 tests across 6 suites
duration  4.8 seconds
commit  ed2a0c3
info  🔄 Run: #23662 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #23662 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.6 seconds
commit  ed2a0c3
info  🔄 Run: #23662 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #23662 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  4 seconds
commit  ed2a0c3
info  🔄 Run: #23662 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #23431 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  26.7 seconds
commit  c11c569
info  🔄 Run: #23431 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23431 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  36.9 seconds
commit  c11c569
info  🔄 Run: #23431 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #23431 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  33 seconds
commit  c11c569
info  🔄 Run: #23431 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #23431 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  36.8 seconds
commit  c11c569
info  🔄 Run: #23431 (attempt 1)

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Visual Regression

29 screenshots compared. See report for details.
View full report

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8f600ab8-08d4-4d1b-9ea8-d0f006128a07
Commits

Reviewing files that changed from the base of the PR and between 15033bd and 90cefe3.

Files selected for processing: 4

  • api/experimentation/types.py
  • api/experimentation/warehouses/snowflake.py
  • api/tests/unit/experimentation/conftest.py
  • api/tests/unit/experimentation/warehouses/test_snowflake.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Nov 18, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

Turn on auto-fix | Re-trigger cubic

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Nov 18, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

Turn on auto-fix | Re-trigger cubic

@Zaimwa9
Zaimwa9 force-pushed the feat/snowflake-statement-client branch from c11c569 to ed2a0c3 Compare November 24, 2026 16:06
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Nov 24, 2026
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Nov 27, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

Turn on auto-fix | Re-trigger cubic

@Zaimwa9
Zaimwa9 merged commit add5187 into main Nov 27, 2026
34 checks passed
@Zaimwa9
Zaimwa9 deleted the feat/snowflake-statement-client branch November 27, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants