Skip to content

feat(gcp): add the GCP module floci.gcp with FlociGcpContainer - #23

Merged
hectorvent merged 2 commits into
mainfrom
feat/gcp
Oct 14, 2026
Merged

hectorvent merged 2 commits into
mainfrom
feat/gcp

Conversation

@hectorvent

Copy link
Copy Markdown
Member

Summary

Adds floci.gcp. FlociGcpContainer starts floci/floci-gcp on the shared core: a config dataclass per emulator service (enabled, plus mock for the container-backed ones), Docker socket detection, TLS config, with_project_id, and the connection helpers get_endpoint, get_project_id, get_emulator_env, get_https_endpoint and get_tls_certificate.

The emulator-env helper returns the variables Google's client libraries read (PUBSUB_, FIRESTORE_, DATASTORE_, SECRET_MANAGER_, FIREBASE_AUTH_EMULATOR_HOST, STORAGE_EMULATOR_HOST, STORAGE_EMULATOR_HOST_GRPC, GOOGLE_CLOUD_PROJECT). It also carries LOGGING_EMULATOR_HOST and KMS_EMULATOR_HOST, which no client library reads; the README says so.

Cloud Functions is control plane only in this emulator release and needs no Docker socket; BigQuery needs none when an external DuckDB URL is set. No sibling-container service is exercised.

Integration tests run against the pinned floci/floci-gcp:0.10.0, including a Cloud Storage round trip with google-cloud-storage (a dev dependency only).

Related issue

No issue. This is the GCP step of the multi-cloud plan for the Testcontainers family: one repo per language, one module per cloud on a shared core. It follows the Azure module.

Type of change

  • Bug fix (fix: commit)
  • New feature (feat: commit)
  • Breaking change (feat!: commit or BREAKING CHANGE: footer)
  • Documentation or chore

Checklist

  • ruff check . && ruff format --check . && mypy floci && pytest -m "not integration" passes, and pytest -m integration if Docker is available
  • New or changed behaviour is covered by tests
  • All commit messages follow Conventional Commits (feat:, fix:, chore:, etc.)
  • Commits are signed off for the DCO (git commit -s)
  • I have no more than 2 open, non-draft pull requests and no more than 4 open pull requests in total (drafts included) in this repository (maintainers and dependency bots are exempt).

FlociGcpContainer starts floci/floci-gcp on the shared core: a config
dataclass per emulator service (enabled, plus mock for the
container-backed ones), Docker socket detection, TLS config, the project
ID, and get_emulator_env() with the *_EMULATOR_HOST variables Google's
SDKs read.

Integration tests run on floci/floci-gcp:0.10.0, pinned in
.github/docker-images.txt; google-cloud-storage is a dev dependency
only.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous finding is fixed and no new blocking issue remains.

Summary

Adds floci.gcp with FlociGcpContainer, service configs, connection helpers, and integration tests against a pinned emulator image.

  • Python tests can start and tune the GCP emulator.
  • Google client setup gets emulator addresses and project settings.

Reviews (2) · Last reviewed commit: "docs(gcp): restore the emulator variable..." · Reviewed by Greptile

Comment thread README.md Resolved
The GCP example put get_emulator_env() into os.environ and left it there,
so a later test creating a Google client would inherit the stopped
emulator's address and project. It now sets the variables with pytest's
monkeypatch, as the integration test does.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
@hectorvent
hectorvent merged commit aab62be into main Oct 14, 2026
9 checks passed
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.

1 participant