Repository navigation
refactor(docker): move frontend, actions and ai-service env into env/docker - #21828
devashish2203 wants to merge 10 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 (11 files or classes, 47 tests)
Add the Playwright E2E testsThis run:
Specs selected because of this PR (1)
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
|
✅ Meticulous evaluated 220 user flows and determined via code coverage that none of them exercise the code changed in this PR, so no replays were executed. View results. Last updated for commit |
|
Meticulous agent swarm testing found no browser-testable changes on
|
Initial JS bundle size ➡️
|
Boot web vitals (no backend)Unauthenticated /login against the two dist/ trees from this job. No GMS — this is eager JS, not search/dataset payload. Lantern, desktop, 1x CPU. Does not forecast fleet p75; do not gate on LCP. Web-vitals A/B — base (758d515) (A) vs pr (e429692) (B)Lighthouse 12.8.2, throttling simulate (cpu 1x, rtt 40 ms, 10240 kbps). Form factor: desktop. Cache: cold (fresh incognito context per run). target n=3/build, 1 warm-up discarded, alternating A,B. Boot-only (no GMS). Unauthenticated login route — eager JS/CSS/font transfer and parse, not search/dataset payload. Do not treat as a fleet p75.
|
| metric | A p50 | B p50 | Δ p50 | Δ% | A p95 | B p95 |
|---|---|---|---|---|---|---|
| fcp | 858 ms | 854 ms | -4 ms | -0.5% | 860 ms | 856 ms |
| lcp | 1317 ms | 1307 ms | -10 ms | -0.8% | 1325 ms | 1312 ms |
| cls | 0.0000 | 0.0000 | 0.0000 | — | 0.0000 | 0.0000 |
| tbt | 18 ms | 12 ms | -6 ms | -31.4% | 21 ms | 15 ms |
| tti | 1318 ms | 1308 ms | -10 ms | -0.8% | 1326 ms | 1313 ms |
| ttfb | 1 ms | 1 ms | 0 ms | +0.4% | 1 ms | 1 ms |
| transferredBytes | 1077.1 KB | 1077.1 KB | 0.0 KB | +0.0% | 1077.1 KB | 1077.1 KB |
| mainThread | 293 ms | 293 ms | 0 ms | -0.2% | 323 ms | 317 ms |
| bootup | 163 ms | 153 ms | -10 ms | -6.2% | 180 ms | 158 ms |
Resource transfer by type (p50):
| type | A bytes | B bytes | Δ bytes | A requests | B requests |
|---|---|---|---|---|---|
| document | 1.3 KB | 1.3 KB | 0.0 KB | 1 | 1 |
| script | 645.3 KB | 645.3 KB | 0.0 KB | 8 | 8 |
| stylesheet | 3.0 KB | 3.0 KB | 0.0 KB | 2 | 2 |
| image | 48.7 KB | 48.7 KB | 0.0 KB | 1 | 1 |
| media | 257.3 KB | 257.3 KB | 0.0 KB | 1 | 1 |
| font | 106.6 KB | 106.6 KB | 0.0 KB | 3 | 3 |
| other | 0.0 KB | 0.0 KB | 0.0 KB | 0 | 0 |
LCP element A: div > div.sc-fpAkvV > div.sc-pRPz > p.sc-pNWdM — Welcome to DataHub
LCP element B: div > div.sc-fpAkvV > div.sc-pRPz > p.sc-pNWdM — Welcome to DataHub
These numbers rank changes and gate regressions against the measured origin(s). They do not sum across PRs and do not forecast any fleet-wide production number.

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, leaving the rendered compose config unchanged in every scenario.env/docker/frontend.env; ai-service values to a new requiredenv/docker/ai-service.env; actions values 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.Written for commit e429692. Summary will update on new commits.