refactor(smoke): read the smoke job layer through the compose job slot

DE
14h ago
+130-127

Stacked on #21830.

Docker smoke runs now read the smoke job layer (smoke-test/env) through the compose job slot, instead of inline flags in run-quickstart.sh and smoke.common.env. The AI smoke leg gets its own job folder. No effective value changes.

What changed

  • smoke-test/run-quickstart.sh exports DATAHUB_ENV_JOB_DIR (absolute smoke-test/env) and DATAHUB_ENV_MODE (ci when CI is set, otherwise local, the same rule the Docker-free launcher uses). It drops 10 inline flags and the smoke.common.env slot. Compose skips a missing job or extension folder silently (required: false), so the script fails before compose if DATAHUB_ENV_JOB_DIR, or the docker/ folder of a set DATAHUB_ENV_EXTENSION_DIR, does not exist; the AI leg checks its job folder the same way.
  • Values only Docker reads go in smoke-test/env/docker/, which compose reads and the Docker-free launcher does not.
  • Five opt-in keys move from compose environment: to env/docker/{gms,system-update}.env with the same ${KEY:-default}, so a job file can set them: GMS MCP_SERVER_ENABLED, POLICY_CACHE_REFRESH_INTERVAL_SECONDS and ELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS; system-update ELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDS and ELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS. Every GMS and system-update service already had them. An ad-hoc env file (DATAHUB_LOCAL_*_ENV, datahub-dev env set) now overrides these keys, where compose environment: used to win. No ad-hoc file in the repo sets them.
  • AI smoke leg (docker-unified.yml): its settings are in smoke-test/env/gen-ai/, selected with DATAHUB_ENV_JOB_DIR/DATAHUB_ENV_MODE. The two provider env files are committed under providers/{local,classical}.env and passed through the same DATAHUB_LOCAL_COMMON_ENV slot as before. CI no longer writes /tmp/ai-gms.env. gms-lite-local-stack.yml excludes smoke-test/env/gen-ai/** from its smoke-test/env/** path filter, because the Docker-free stack never reads that folder.
  • smoke-test/check_env_parity.py: removes ci_overlay_drift() and the CI GMS overlay. The workflow keeps no copy that could drift. The Docker side still renders through quickstart_compose(), now in CI mode to match the Docker-free side.
  • Docs: env/README.md (Docker reads the job folder; what the parity check still guards) and smoke-test/README.md.
  • scripts/dev test: the expected env list layers for the smoke job now include smoke-test/env/docker/all.env and smoke-test/env/docker/gms.env.
KeyBeforeAfterServices
THEME_V2_DEFAULT=falseinlinesmoke-test/env/gms.env, smoke-test/env/docker/frontend.envgms, frontend
SHOW_HAS_SIBLINGS_FILTER, SHOW_SEARCH_BAR_AUTOCOMPLETE_REDESIGN, SHOW_HOME_PAGE_REDESIGN, SEARCH_BAR_API_VARIANT, DEV_TOOLING_ENABLEDinlinesmoke-test/env/gms.envgms
MCP_SERVER_ENABLED=true, POLICY_CACHE_REFRESH_INTERVAL_SECONDS=2inlinesmoke-test/env/gms.envgms
ELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS=1inlinesmoke-test/env/docker/{gms,system-update}.envgms, system-update
ELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDS=1inlinesmoke-test/env/docker/system-update.envsystem-update
SPRING_KAFKA_CONSUMER_PROPERTIES_AUTO_COMMIT_INTERVAL_MS=500, ES_BULK_ACK_AFTER_TRANSFER=truesmoke.common.envsmoke-test/env/docker/all.envall services
AI: index builder 1, timeseries 1, policy cache 10workflow inlinesmoke-test/env/gen-ai/{gms,system-update}.envgms, system-update
AI: embedding provider valuesCI-written temp filesmoke-test/env/gen-ai/providers/<provider>.envall services

What stays inline, and why

  • DATAHUB_TELEMETRY_ENABLED=false (smoke and AI): a shell value reaches only the services that name the key. Some system-update and MAE services do not, and a job file would add it to them.
  • KAFKA_LISTENER_CONCURRENCY=3: four postgres MAE/MCE consumers do not name the key, and a job file would add it to them.
  • export USAGE_AGGREGATION_FLUSH_INTERVAL_SECONDS: compose resolves a later file's ${KEY:-default} against the value an earlier file set (env/common/gms.env sets 30), so only the shell delivers 5.
  • Image, version, secret, search and path variables.

Cleaning these up needs a named value change, so it is left for a later PR.

Verification

Each item compares this branch with its base, without starting a stack:

  • Smoke: ran the script's own code through quickstart_compose config for all 32 compose profiles, with CI unset and with CI=true. Every service's environment is identical. debug-frontend fails to render on both sides, a known issue.
  • AI leg: rendered the workflow step's env for both providers across all profiles. Identical.
  • Compose env snapshot (bare, shell overrides, ZDU, smoke, AI): no differences. 27 Gradle quickstart scenarios: no differences.
  • Docker-free gms-lite-stack.py --print-env for each job (none, smoke-test, playwright) Ɨ mode (local, ci): identical.
  • check_env_parity.py: exit 0, report unchanged. :docker:generateQuickstartComposeConfig: no diff. actionlint, shellcheck, :smoke-test:pythonLint: clean.

No stack was started locally. This PR's CI smoke and AI legs are the runtime proof.

  • PR conforms to the Contributing Guideline (PR title format)
  • Links to related issues (not applicable)
  • Tests updated (parity check)
  • Docs updated
  • Breaking changes (not applicable: no effective value change)

šŸ¤– Generated with Claude Code


Summary by cubic

Docker smoke runs now read the smoke job layer (smoke-test/env) through the compose job slot, replacing the inline flags in run-quickstart.sh and the smoke.common.env slot. The AI smoke leg gets its own job folder (smoke-test/env/gen-ai) with committed provider env files instead of a workflow-written temp file. The parity check drops its CI overlay drift check. Rendered env is identical across all compose profiles, both AI providers, and the Docker-free launcher.

Note

  • run-quickstart.sh and the AI leg now fail fast when an env layer folder is missing, because compose skips missing job folders silently.
  • Five opt-in keys moved from compose environment: to env/docker/{gms,system-update}.env, so an ad-hoc env file (DATAHUB_LOCAL_*_ENV, datahub-dev env set) now overrides them where compose environment: used to win. No repo ad-hoc file sets them.
  • The gms-lite workflow skips changes under smoke-test/env/gen-ai/** because the Docker-free stack never reads that job folder.