Skip to content

feat(snowflake): add clientless Embucket Snowflake-compatible container service - #170

Open
cofin wants to merge 1 commit into
feat/floci-emulatorsfrom
feat/snowflake-embucket-service
Open

cofin wants to merge 1 commit into
feat/floci-emulatorsfrom
feat/snowflake-embucket-service

Conversation

@cofin

@cofin cofin commented Oct 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds a clientless Snowflake-compatible container service (snowflake_service, embucket_service, SnowflakeService) backed by embucket/embucket:latest on HTTP port 3000, using stdlib urllib.request for readiness probing and /queries/v1/query-request SQL execution without requiring snowflake-connector-python in the base package.

Key Changes

Snowflake-Compatible Emulator (pytest_databases.docker.snowflake)

  • Embucket Service (snowflake_service, embucket_service, SnowflakeService): Starts embucket/embucket:latest on port 3000 and exposes endpoint, connection_kwargs (for snowflake.connector.connect), and query().
  • Stdlib HTTP Readiness & SQL REST Execution: Adds check_snowflake_health (probing /health with fallback to /v1/metastore/databases) and query_snowflake_emulator (executing SQL over /queries/v1/query-request via urllib.request).
  • Worker Isolation: Supports database (worker-scoped snowflake_schema) and server (per-worker container) isolation modes via xdist_snowflake_isolation_level.

Testing, Documentation & CI

  • Unit & Contract Coverage: Adds tests/test_snowflake.py verifying clientless module imports, health probing, REST SQL execution, and fixture defaults.
  • Documentation & Selective CI: Adds docs/supported-databases/snowflake.rst and registers snowflake in .github/ci/provider-groups.json.

Closes #159

@codecov-commenter

codecov-commenter commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.36364% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.00%. Comparing base (2857485) to head (f04436d).

Files with missing lines Patch % Lines
src/pytest_databases/docker/snowflake.py 76.36% 21 Missing and 5 partials ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##           feat/floci-emulators    #170      +/-   ##
=======================================================
- Coverage                  4.54%   3.00%   -1.55%     
=======================================================
  Files                        30      31       +1     
  Lines                      3519    3629     +110     
  Branches                    287     293       +6     
=======================================================
- Hits                        160     109      -51     
- Misses                     3354    3515     +161     
  Partials                      5       5              

☔ 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.

@cofin
cofin marked this pull request as draft October 22, 2026 02:52
@cofin
cofin changed the base branch from feat/podman-support to feat/floci-emulators October 22, 2026 03:59
@cofin
cofin force-pushed the feat/snowflake-embucket-service branch from 3a7adb0 to 74fdeb2 Compare October 22, 2026 03:59
@cofin
cofin added this pull request to stack #173 October 22, 2026 05:10
@cofin
cofin force-pushed the feat/snowflake-embucket-service branch from 74fdeb2 to 9f907a8 Compare October 22, 2026 17:40
@cofin
cofin force-pushed the feat/snowflake-embucket-service branch from 9f907a8 to bc5eb05 Compare October 22, 2026 20:10
@cofin
cofin force-pushed the feat/snowflake-embucket-service branch from bc5eb05 to b5fb8de Compare October 22, 2026 23:08
@cofin
cofin marked this pull request as ready for review October 22, 2026 23:29
@cofin
cofin force-pushed the feat/snowflake-embucket-service branch from b5fb8de to b8efcda Compare October 23, 2026 20:35
@cofin
cofin force-pushed the feat/snowflake-embucket-service branch from b8efcda to f04436d Compare October 29, 2026 14:20

This branch has not been deployed

No deployments
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.

Enhancement: support Snowflake emulation via embucket

2 participants