feat(config)!: standardize root-level mock flag for container services#61
Merged
Conversation
Give every service that launches Docker container sidecars a single, uniform root-level `mock` flag (default `false`) that keeps it metadata-only without Docker — the standard `FLOCI_GCP_SERVICES_<SVC>_MOCK` knob. Previously only Managed Kafka used this shape; Cloud SQL and Cloud Run each had their own. - Cloud SQL: rename `cloudsql.data-plane-enabled` (default true) to `cloudsql.mock` (default false), inverted. Behavior unchanged. - Cloud Run: move `cloudrun.execution.mock` to the service root as `cloudrun.mock`, and remove the separate `cloudrun.execution.enabled` opt-in. Docker-backed execution is now gated solely by `!mock()`. - Kafka already conformed (`kafka.mock`). - Test config sets `mock: true` for all three so the suite never starts containers; CI compat enables Cloud Run execution via `FLOCI_GCP_SERVICES_CLOUDRUN_MOCK=false`. - Document the convention in AGENTS.md so future sidecar services follow it. BREAKING CHANGE: Cloud SQL and Cloud Run config flags are renamed with no aliases. `FLOCI_GCP_SERVICES_CLOUDSQL_DATA_PLANE_ENABLED` becomes `FLOCI_GCP_SERVICES_CLOUDSQL_MOCK` (inverted value), and `FLOCI_GCP_SERVICES_CLOUDRUN_EXECUTION_MOCK` becomes `FLOCI_GCP_SERVICES_CLOUDRUN_MOCK`. `FLOCI_GCP_SERVICES_CLOUDRUN_EXECUTION_ENABLED` is removed; Cloud Run image-based execution is now controlled by `FLOCI_GCP_SERVICES_CLOUDRUN_MOCK` and runs by default (set it to `true` for control-plane-only behavior).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Standardizes a single root-level
mockflag (FLOCI_GCP_SERVICES_<SVC>_MOCK, defaultfalse) across all three container-sidecar services so they behave uniformly:cloudsql.data-plane-enabled(default true) →cloudsql.mock(default false, inverted). Behavior unchanged.cloudrun.execution.mockmoved to the service root ascloudrun.mock, and the separatecloudrun.execution.enabledopt-in removed — Docker-backed execution is now gated solely by!mock().kafka.mock.Test config sets
mock: truefor all three so the suite never starts containers; CI compat enables Cloud Run execution viaFLOCI_GCP_SERVICES_CLOUDRUN_MOCK=false. The convention is documented inAGENTS.mdfor future sidecar services.Type of change
fix:)feat:)feat!:orfix!:)GCP Compatibility
Config-only; no wire-protocol change. Cloud SQL behavior is identical (pure rename/inversion). Cloud Run image-based execution now defaults ON (gated by
cloudrun.mock, defaultfalse); setFLOCI_GCP_SERVICES_CLOUDRUN_MOCK=truefor control-plane-only behavior. CI compat setsFLOCI_GCP_SERVICES_CLOUDRUN_MOCK=false.Breaking changes (env vars renamed, no aliases)
FLOCI_GCP_SERVICES_CLOUDSQL_DATA_PLANE_ENABLED→FLOCI_GCP_SERVICES_CLOUDSQL_MOCK(inverted value)FLOCI_GCP_SERVICES_CLOUDRUN_EXECUTION_MOCK→FLOCI_GCP_SERVICES_CLOUDRUN_MOCKFLOCI_GCP_SERVICES_CLOUDRUN_EXECUTION_ENABLEDremoved — Cloud Run execution is now controlled byFLOCI_GCP_SERVICES_CLOUDRUN_MOCKChecklist
./mvnw testpasses locally (64 Cloud Run + Cloud SQL tests; Docker-backed*ExecutionRestIntegrationTest/*DataPlaneIntegrationTestneed Docker — pre-existing failures onmain)