Skip to content

feat(config)!: standardize root-level mock flag for container services#61

Merged
hectorvent merged 1 commit into
mainfrom
feat/standardize-mock-flags
Jun 18, 2026
Merged

feat(config)!: standardize root-level mock flag for container services#61
hectorvent merged 1 commit into
mainfrom
feat/standardize-mock-flags

Conversation

@hectorvent

Copy link
Copy Markdown
Contributor

Summary

Standardizes a single root-level mock flag (FLOCI_GCP_SERVICES_<SVC>_MOCK, default false) across all three container-sidecar services so they behave uniformly:

  • Cloud SQL: cloudsql.data-plane-enabled (default true) → cloudsql.mock (default false, inverted). Behavior unchanged.
  • Cloud Run: cloudrun.execution.mock moved to the service root as cloudrun.mock, and the separate cloudrun.execution.enabled opt-in removed — Docker-backed execution is now gated solely by !mock().
  • Managed Kafka: already used 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. The convention is documented in AGENTS.md for future sidecar services.

Type of change

  • Bug fix (fix:)
  • New feature (feat:)
  • Breaking change (feat!: or fix!:)
  • Docs / chore

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, default false); set FLOCI_GCP_SERVICES_CLOUDRUN_MOCK=true for control-plane-only behavior. CI compat sets FLOCI_GCP_SERVICES_CLOUDRUN_MOCK=false.

Breaking changes (env vars renamed, no aliases)

  • FLOCI_GCP_SERVICES_CLOUDSQL_DATA_PLANE_ENABLEDFLOCI_GCP_SERVICES_CLOUDSQL_MOCK (inverted value)
  • FLOCI_GCP_SERVICES_CLOUDRUN_EXECUTION_MOCKFLOCI_GCP_SERVICES_CLOUDRUN_MOCK
  • FLOCI_GCP_SERVICES_CLOUDRUN_EXECUTION_ENABLED removed — Cloud Run execution is now controlled by FLOCI_GCP_SERVICES_CLOUDRUN_MOCK

Checklist

  • ./mvnw test passes locally (64 Cloud Run + Cloud SQL tests; Docker-backed *ExecutionRestIntegrationTest / *DataPlaneIntegrationTest need Docker — pre-existing failures on main)
  • New or updated integration test added (existing tests updated for the new flags)
  • Commit messages follow Conventional Commits

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).
@hectorvent hectorvent merged commit a708bfa into main Jun 18, 2026
10 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