Repository navigation
refactor(docker): move frontend, actions and ai-service env into env/docker - #21828
devashish2203 wants to merge 5 commits into
Conversation
…docker Move the frontend, actions and ai-service values out of the docker/profiles compose anchors into env/docker layer and variant files: - Frontend values go to env/docker/frontend.env, replacing the stale DATAHUB_GMS_HOST and DATAHUB_SECRET lines it carried. The debug analytics default goes to env/docker/variants/debug/frontend.env, read by the debug frontend services through their own env_file list. - Actions values go to env/docker/actions.env, replacing the stale SCHEMA_REGISTRY_URL line. The pgQueue values of the non-CDC Postgres services go to env/docker/variants/postgres/actions.env. - ai-service values go to the new env/docker/ai-service.env, now a required entry like the other service files. The rendered compose config is unchanged in every scenario, and no ad-hoc env file sets a moved key. Keys stay in environment: where they are tied to a port or mount of the same service: JAVA_TOOL_OPTIONS (debug port), AWS_PROFILE and AWS_SDK_LOAD_CONFIG (~/.aws mounts), DATAHUB_AI_PORT and PYTHONPATH (source mounts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR SummaryOverview Frontend values such as Actions shared settings ( AI service gets a required
Reviewed by Cursor Bugbot for commit 4b3466e. Bugbot is set up for automated code reviews on this repo. Configure here. |
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 (15 files or classes, 126 tests)
Add the Playwright E2E testsThis run:
Specs selected because of this PR (6)
Add the commit |
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
# Conflicts: # docker/profiles/docker-compose.frontend.yml # env/docker/frontend.env
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b73214d. Configure here.
…ompose environment An env layer or ad-hoc env file could otherwise override them: a short legacy DATAHUB_SECRET stops Play 3 from starting, and a wider DATAHUB_AI_TRUSTED_PROXIES would trust forwarded hosts from other peers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic

Stacked on #21827.
Moves the
environment:values of the frontend, actions and ai-service compose services intoenv/dockerlayer and variant files. The rendered compose config is unchanged in every scenario.Moved keys
DATAHUB_GMS_HOST,THEME_V2_DEFAULT,PLAY_HTTP_CONTEXT,LOG_AGGREGATOR_ENDPOINT,DATAHUB_AI_SERVICE_URLenv/docker/frontend.env(replaces staleDATAHUB_GMS_HOSTline; staleDATAHUB_SECRETline removed)DATAHUB_ANALYTICS_ENABLEDenv/docker/variants/debug/frontend.envACTIONS_EXTRA_PACKAGES,ACTIONS_CONFIG,SCHEMA_REGISTRY_URLenv/docker/actions.env(replaces staleSCHEMA_REGISTRY_URL)DATAHUB_ACTIONS_SYSTEM_CONFIGS_PATH,PGQUEUE_HOST_PORT,PGQUEUE_DATABASE,PGQUEUE_USERNAME,PGQUEUE_PASSWORD,DATAHUB_PGQUEUE_SCHEMA,DATAHUB_PGQUEUE_TABLE_PREFIXenv/docker/variants/postgres/actions.envDATAHUB_GMS_URL,DATAHUB_AI_MCP_ENABLEDenv/docker/ai-service.env(now a required entry)The debug frontend services and the non-CDC Postgres actions services get their own anchored
env_filelists (x-env-files-frontend-debug,x-env-files-actions-postgres) with the variant in place. The postgres-cdc actions services never used pgQueue and keep the base list.Kept in
environment:JAVA_TOOL_OPTIONS(frontend debug): tied to debug port 5002.AWS_PROFILE(bare pass-through) andAWS_SDK_LOAD_CONFIG(actions): tied to the~/.awsmounts.DATAHUB_AI_PORT: tied to the container port mapping.PYTHONPATH(ai-service dev): tied to the source mounts.DATAHUB_BASE_PATH,DATAHUB_GMS_BASE_PATH,DATAHUB_SYSTEM_CLIENT_SECRET(frontend): the GMS-side services keep them inenvironment:too, so all read the same shell value.DATAHUB_SECRET(frontend): no env layer or ad-hoc file can replace it with a short legacy value, which stops Play 3 from starting.DATAHUB_AI_TRUSTED_PROXIES(ai-service): only the frontend is trusted to name the client host; no env layer can widen that.Interpolation:
PLAY_HTTP_CONTEXT=${DATAHUB_BASE_PATH:-/}(frontend),SCHEMA_REGISTRY_URL(actions) andDATAHUB_GMS_URL(ai-service) read the base paths, which no file in their lists sets, so they resolve from the shell as theenvironment:values did.Verification
Rendered with
compose_env_snapshot.py(from #21820) on a clean copy of the base and on this branch, then diffed:bareandshell(every profile),smoke,ai(both embedding variants),zdu: no differences (71 scenarios;debug-frontendis known-broken on the base too).gradle: all 27quickstart_configskeys, with the print task'sdocker/build.gradlecopied over scratch copies only: no differences (quickstartDebugSearchSplitis known-broken on the base too).smoke-test/test_resources/actions/actions.env, CIai-gms.env,smoke.common.env,zdu-test.env, sparksmoke-gms.env) set none of the moved keys, so no precedence change../gradlew :docker:generateQuickstartComposeConfigthengit diff --exit-code docker/quickstart/: clean, noenv_filekey.python3 smoke-test/check_env_parity.py: exit 0.Checklist
env/README.md🤖 Generated with Claude Code
Summary by cubic
Moves the
environment:values of the frontend, actions, and ai-service compose services intoenv/dockerlayer and variant files. The rendered compose config is unchanged in every scenario.Refactor details
env/docker/frontend.env, replacing its staleDATAHUB_GMS_HOSTandDATAHUB_SECRETlines; ai-service values move to the new requiredenv/docker/ai-service.env; actions values move toenv/docker/actions.env, with pgQueue values for non-CDC Postgres services inenv/docker/variants/postgres/actions.envand the debug analytics default inenv/docker/variants/debug/frontend.env.env_filelists; postgres-cdc actions services keep the base list.JAVA_TOOL_OPTIONS,AWS_PROFILE/AWS_SDK_LOAD_CONFIG,DATAHUB_AI_PORT,PYTHONPATH) stay inenvironment:, as doDATAHUB_SECRETandDATAHUB_AI_TRUSTED_PROXIES, which an env layer could otherwise override (a short legacy secret stops Play 3 from starting; a wider trusted-proxies list would trust forwarded hosts from other peers).Written for commit 3468bdb. Summary will update on new commits.