Repository navigation
refactor(smoke): read the smoke job layer through the compose job slot - #21831
devashish2203 wants to merge 9 commits into
Conversation
run-quickstart.sh exports DATAHUB_ENV_JOB_DIR (smoke-test/env) and
DATAHUB_ENV_MODE, so compose reads the smoke job layer instead of inline
flags and smoke.common.env. Docker-only smoke values go in
smoke-test/env/docker/. Five opt-in keys move from compose environment:
to env/docker/{gms,system-update}.env with the same defaults, so the job
layer can set them. The AI smoke leg reads its own job folder and
committed provider files instead of a CI-written temp file. The parity
check drops its CI overlay drift check.
Rendered env is unchanged for every smoke profile (with and without CI),
both AI providers, bare/shell/zdu/Gradle scenarios and the Docker-free
launcher.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR SummaryOverview
Five Elasticsearch/MCP/policy keys shift from compose
No intentional runtime value changes; PR description claims rendered env is unchanged. Reviewed by Cursor Bugbot for commit a408acd. Bugbot is set up for automated code reviews on this repo. Configure here. |
…ge tree check_python_package.py treats every folder under smoke-test/tests without an __init__.py as a stray namespace package. Move the AI smoke leg's job folder to smoke-test/test_resources/semantic/env, beside the actions env file the same workflow step reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Smart test selectionpytest smoke testsMode: active. Only the selection below runs for the pytest smoke tests on this PR (applied:
Medium confidence: a wrong tag means tests are skipped, so check the tags above against what this PR touches. Selected scopes (64 files or classes, 349 tests)
Add the Playwright E2E testsThis run:
Specs selected because of this PR (16)
Add the commit |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
# Conflicts: # env/docker/system-update.env
…/env/gen-ai Keeps every smoke job env folder under smoke-test/env. The existing gitignore exceptions for smoke-test/env cover the new folder, so the two semantic-folder exceptions go. No effective value change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Docker-free stack never reads smoke-test/env/gen-ai, so the smoke-test/env/** path filter now excludes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compose lists the job and extension env files as required: false, so a mistyped folder was skipped without an error. run-quickstart.sh now checks DATAHUB_ENV_JOB_DIR and, when set, DATAHUB_ENV_EXTENSION_DIR/docker (relative paths resolve from docker/profiles/) before starting compose. The AI smoke leg, which calls compose directly, checks its job folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
2 issues found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="smoke-test/run-quickstart.sh">
<violation number="1" location="smoke-test/run-quickstart.sh:38">
P3: These checks run after the script has already launched `:smoke-test:installDev` in the background, so a missing folder still starts unnecessary Gradle work before failing. Move the checks before that launch.</violation>
<violation number="2" location="smoke-test/run-quickstart.sh:41">
P2: This check fails hard when an extension has no `docker/` subfolder, but compose and env/README.md treat that folder as optional. The launcher only needs the extension root to exist, so check `$ext_dir` itself instead of requiring `docker/`.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| [[ -d "$DATAHUB_ENV_JOB_DIR" ]] || { echo "ERROR: DATAHUB_ENV_JOB_DIR $DATAHUB_ENV_JOB_DIR does not exist" >&2; exit 1; } | ||
| if [[ -n "${DATAHUB_ENV_EXTENSION_DIR:-}" ]]; then | ||
| ext_dir="$DATAHUB_ENV_EXTENSION_DIR"; [[ "$ext_dir" == /* ]] || ext_dir="$DIR/../docker/profiles/$ext_dir" | ||
| [[ -d "$ext_dir/docker" ]] || { echo "ERROR: DATAHUB_ENV_EXTENSION_DIR has no docker/ folder: $ext_dir/docker" >&2; exit 1; } |
There was a problem hiding this comment.
P2: This check fails hard when an extension has no docker/ subfolder, but compose and env/README.md treat that folder as optional. The launcher only needs the extension root to exist, so check $ext_dir itself instead of requiring docker/.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At smoke-test/run-quickstart.sh, line 41:
<comment>This check fails hard when an extension has no `docker/` subfolder, but compose and env/README.md treat that folder as optional. The launcher only needs the extension root to exist, so check `$ext_dir` itself instead of requiring `docker/`.</comment>
<file context>
@@ -34,6 +34,12 @@ USE_AWS_ELASTICSEARCH="${USE_AWS_ELASTICSEARCH:=true}"
+[[ -d "$DATAHUB_ENV_JOB_DIR" ]] || { echo "ERROR: DATAHUB_ENV_JOB_DIR $DATAHUB_ENV_JOB_DIR does not exist" >&2; exit 1; }
+if [[ -n "${DATAHUB_ENV_EXTENSION_DIR:-}" ]]; then
+ ext_dir="$DATAHUB_ENV_EXTENSION_DIR"; [[ "$ext_dir" == /* ]] || ext_dir="$DIR/../docker/profiles/$ext_dir"
+ [[ -d "$ext_dir/docker" ]] || { echo "ERROR: DATAHUB_ENV_EXTENSION_DIR has no docker/ folder: $ext_dir/docker" >&2; exit 1; }
+fi
DATAHUB_ENV_MODE=local
</file context>
| [[ -d "$ext_dir/docker" ]] || { echo "ERROR: DATAHUB_ENV_EXTENSION_DIR has no docker/ folder: $ext_dir/docker" >&2; exit 1; } | |
| [[ -d "$ext_dir" ]] || { echo "ERROR: DATAHUB_ENV_EXTENSION_DIR does not exist: $ext_dir" >&2; exit 1; } |
| # is set. | ||
| export DATAHUB_ENV_JOB_DIR="$DIR/env" | ||
| # Compose skips a missing job or extension folder silently (required: false), so check them here. | ||
| [[ -d "$DATAHUB_ENV_JOB_DIR" ]] || { echo "ERROR: DATAHUB_ENV_JOB_DIR $DATAHUB_ENV_JOB_DIR does not exist" >&2; exit 1; } |
There was a problem hiding this comment.
P3: These checks run after the script has already launched :smoke-test:installDev in the background, so a missing folder still starts unnecessary Gradle work before failing. Move the checks before that launch.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At smoke-test/run-quickstart.sh, line 38:
<comment>These checks run after the script has already launched `:smoke-test:installDev` in the background, so a missing folder still starts unnecessary Gradle work before failing. Move the checks before that launch.</comment>
<file context>
@@ -34,6 +34,12 @@ USE_AWS_ELASTICSEARCH="${USE_AWS_ELASTICSEARCH:=true}"
# is set.
export DATAHUB_ENV_JOB_DIR="$DIR/env"
+# Compose skips a missing job or extension folder silently (required: false), so check them here.
+[[ -d "$DATAHUB_ENV_JOB_DIR" ]] || { echo "ERROR: DATAHUB_ENV_JOB_DIR $DATAHUB_ENV_JOB_DIR does not exist" >&2; exit 1; }
+if [[ -n "${DATAHUB_ENV_EXTENSION_DIR:-}" ]]; then
+ ext_dir="$DATAHUB_ENV_EXTENSION_DIR"; [[ "$ext_dir" == /* ]] || ext_dir="$DIR/../docker/profiles/$ext_dir"
</file context>
Stacked on #21830.
Docker smoke runs now read the smoke job layer (
smoke-test/env) through the compose job slot, instead of inline flags inrun-quickstart.shandsmoke.common.env. The AI smoke leg gets its own job folder. No effective value changes.What changed
smoke-test/run-quickstart.shexportsDATAHUB_ENV_JOB_DIR(absolutesmoke-test/env) andDATAHUB_ENV_MODE(ciwhenCIis set, otherwiselocal, the same rule the Docker-free launcher uses). It drops 10 inline flags and thesmoke.common.envslot. Compose skips a missing job or extension folder silently (required: false), so the script fails before compose ifDATAHUB_ENV_JOB_DIR, or thedocker/folder of a setDATAHUB_ENV_EXTENSION_DIR, does not exist; the AI leg checks its job folder the same way.smoke-test/env/docker/, which compose reads and the Docker-free launcher does not.environment:toenv/docker/{gms,system-update}.envwith the same${KEY:-default}, so a job file can set them: GMSMCP_SERVER_ENABLED,POLICY_CACHE_REFRESH_INTERVAL_SECONDSandELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS; system-updateELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDSandELASTICSEARCH_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 composeenvironment:used to win. No ad-hoc file in the repo sets them.docker-unified.yml): its settings are insmoke-test/env/gen-ai/, selected withDATAHUB_ENV_JOB_DIR/DATAHUB_ENV_MODE. The two provider env files are committed underproviders/{local,classical}.envand passed through the sameDATAHUB_LOCAL_COMMON_ENVslot as before. CI no longer writes/tmp/ai-gms.env.gms-lite-local-stack.ymlexcludessmoke-test/env/gen-ai/**from itssmoke-test/env/**path filter, because the Docker-free stack never reads that folder.smoke-test/check_env_parity.py: removesci_overlay_drift()and the CI GMS overlay. The workflow keeps no copy that could drift. The Docker side still renders throughquickstart_compose(), now in CI mode to match the Docker-free side.env/README.md(Docker reads the job folder; what the parity check still guards) andsmoke-test/README.md.scripts/devtest: the expectedenv listlayers for the smoke job now includesmoke-test/env/docker/all.envandsmoke-test/env/docker/gms.env.THEME_V2_DEFAULT=falsesmoke-test/env/gms.env,smoke-test/env/docker/frontend.envSHOW_HAS_SIBLINGS_FILTER,SHOW_SEARCH_BAR_AUTOCOMPLETE_REDESIGN,SHOW_HOME_PAGE_REDESIGN,SEARCH_BAR_API_VARIANT,DEV_TOOLING_ENABLEDsmoke-test/env/gms.envMCP_SERVER_ENABLED=true,POLICY_CACHE_REFRESH_INTERVAL_SECONDS=2smoke-test/env/gms.envELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS=1smoke-test/env/docker/{gms,system-update}.envELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDS=1smoke-test/env/docker/system-update.envSPRING_KAFKA_CONSUMER_PROPERTIES_AUTO_COMMIT_INTERVAL_MS=500,ES_BULK_ACK_AFTER_TRANSFER=truesmoke.common.envsmoke-test/env/docker/all.envsmoke-test/env/gen-ai/{gms,system-update}.envsmoke-test/env/gen-ai/providers/<provider>.envWhat 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.envsets 30), so only the shell delivers 5.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:
quickstart_compose configfor all 32 compose profiles, withCIunset and withCI=true. Every service's environment is identical.debug-frontendfails to render on both sides, a known issue.gms-lite-stack.py --print-envfor 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.
🤖 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 inrun-quickstart.shand thesmoke.common.envslot. 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.shand the AI leg now fail fast when an env layer folder is missing, because compose skips missing job folders silently.environment:toenv/docker/{gms,system-update}.env, so an ad-hoc env file (DATAHUB_LOCAL_*_ENV,datahub-dev env set) now overrides them where composeenvironment:used to win. No repo ad-hoc file sets them.smoke-test/env/gen-ai/**because the Docker-free stack never reads that job folder.Written for commit a408acd. Summary will update on new commits.