Skip to content

feat(pubsub): add clientless Google Cloud Pub/Sub emulator service - #157

Open
cofin wants to merge 1 commit into
feat/localstack-servicefrom
feat/pubsub-service
Open

cofin wants to merge 1 commit into
feat/localstack-servicefrom
feat/pubsub-service

Conversation

@cofin

@cofin cofin commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a clientless Google Cloud Pub/Sub emulator service (pubsub_service) that validates readiness and topic/subscription lifecycles via stdlib HTTP requests against the emulator v1 REST API without requiring google-cloud-pubsub.

Key Changes

Google Cloud Pub/Sub Emulator Service (pytest_databases.docker.pubsub)

  • Clientless REST Readiness: Validates emulator readiness and exercises topic, subscription, publish, pull, and acknowledge operations directly against the emulator HTTP API without Python client dependencies or sidecar containers.
  • Service Metadata: Exposes PubSubService (host, port, project, endpoint, emulator_host) for direct integration with PUBSUB_EMULATOR_HOST or REST clients.
  • Worker Isolation: Supports shared emulator execution with per-worker project/resource isolation (database) and dedicated per-worker emulator containers (server) via xdist_pubsub_isolation_level.

Testing, Documentation & CI

  • Unit & Integration Coverage: Adds unit and integration coverage for clientless module import, PubSubService metadata (endpoint, emulator_host), topic/subscription creation, message publish/pull/acknowledge lifecycles, and pytest-xdist worker isolation.
  • Documentation & Selective CI: Adds docs/supported-databases/pubsub.rst and registers pubsub in .github/ci/provider-groups.json.

Part of #150

@codecov-commenter

codecov-commenter commented Jul 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.58491% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 2.15%. Comparing base (e9a263f) to head (ade8d65).

Files with missing lines Patch % Lines
src/pytest_databases/docker/pubsub.py 73.58% 14 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           feat/localstack-service    #157      +/-   ##
==========================================================
- Coverage                     3.63%   2.15%   -1.48%     
==========================================================
  Files                           26      27       +1     
  Lines                         2918    2971      +53     
  Branches                       246     248       +2     
==========================================================
- Hits                           106      64      -42     
- Misses                        2809    2907      +98     
+ Partials                         3       0       -3     

☔ 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 force-pushed the feat/pubsub-service branch 2 times, most recently from 5cd699c to 69c8241 Compare July 22, 2026 17:05
@cofin cofin changed the title feat: add clientless Pub/Sub emulator service feat(pubsub): add clientless Google Cloud Pub/Sub emulator service Oct 22, 2026
@cofin
cofin force-pushed the feat/pubsub-service branch from 69c8241 to a4dba1a Compare October 22, 2026 02:24
@cofin
cofin changed the base branch from feat/podman-support to feat/localstack-service October 22, 2026 03:58
@cofin
cofin force-pushed the feat/pubsub-service branch from a4dba1a to 29a3fb7 Compare October 22, 2026 03:58
@cofin
cofin added this pull request to stack #173 October 22, 2026 05:10
@cofin
cofin force-pushed the feat/pubsub-service branch from 29a3fb7 to cebd3ad Compare October 22, 2026 17:13
@cofin
cofin force-pushed the feat/pubsub-service branch from cebd3ad to 50eb18c Compare October 22, 2026 20:01
@cofin
cofin force-pushed the feat/pubsub-service branch from 50eb18c to 12dfb79 Compare October 22, 2026 23:04
@cofin
cofin marked this pull request as ready for review October 22, 2026 23:29
@cofin
cofin force-pushed the feat/pubsub-service branch from 12dfb79 to 7c094b4 Compare October 23, 2026 20:11
@cofin
cofin force-pushed the feat/pubsub-service branch from 7c094b4 to ade8d65 Compare October 29, 2026 14:19

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.

2 participants