Repository navigation
refactor(docker): move debug and localstack env into env/docker variants - #21827
devashish2203 wants to merge 9 commits into
Conversation
Move the debug GMS values and the LocalStack values out of the docker/profiles compose anchors into env/docker variant files: - The debug GMS cache, browse v2 and aspect size validation values go to env/docker/variants/debug/gms.env. The debug GMS services restate their env_file list with the debug variant in place. - The LocalStack endpoint, keys and executor role go to env/docker/variants/localstack/, read by the two debug aws services (variant order: datastore, graph, cloud, debug). - Dev template copies that repeat a value the service already gets with the same default are deleted, as are two anchor names nothing uses. The rendered compose config is unchanged in every scenario. Keys stay in environment: where an env file would change a value: DATAHUB_SERVER_TYPE (the base environment sets it), JAVA_TOOL_OPTIONS (tied to the debug port), AWS_REGION in the LocalStack anchor (it beats the bare pass-through only by merge order), the bare cloud pass-through names and AWS_SDK_LOAD_CONFIG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR SummaryOverview Debug GMS behavior (caches off, browse v2, aspect-size validation) moves to LocalStack AWS endpoint, keys, and executor role ARN move to Compose also drops redundant dev-only duplicates already set elsewhere (e.g. Reviewed by Cursor Bugbot for commit a940737. 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 (50 files or classes, 271 tests)
Add the Playwright E2E testsThis run:
Specs selected because of this PR (9)
Add the commit |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Stacked on #21825.
Moves the debug and dev
environment:values of the GMS-family compose services intoenv/docker/variants/debug, and the LocalStack values into a newenv/docker/variants/localstack. No effective value changes.Moved keys
SEARCH_SERVICE_ENABLE_CACHE=false,LINEAGE_SEARCH_CACHE_ENABLED=false,SHOW_BROWSE_V2=true&datahub-gms-dev-envvariants/debug/gms.envdatahub-gms-debug*servicesDATAHUB_VALIDATION_ASPECT_SIZE_{PRE,POST}_PATCH_*(opt-in, same defaults)&datahub-gms-dev-envvariants/debug/gms.envAWS_ENDPOINT_URL,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,DATAHUB_EXECUTOR_ROLE_ARNx-localstack-envvariants/localstack/{gms,system-update}.envdatahub-gms-debug-aws,system-update-debug-awsThe debug GMS services and the two aws services now restate their
env_filelist with the variants in place (order: datastore, graph, cloud, debug).env/README.mdnames the newlocalstackslot.Also deleted: dev template copies that repeat a value the same service already gets with the same default (
ENTITY_VERSIONING_ENABLED,METADATA_SERVICE_AUTH_ENABLED,MCP_SERVER_ENABLED,DEV_TOOLING_ENABLED, andREPROCESS_DEFAULT_BROWSE_PATHS_V2, which is already inenv/docker/system-update.env), and the unused anchor names&datahub-gms-env-filesand&datahub-system-update-env-files.Kept in
environment:DATAHUB_SERVER_TYPE: ${…:-dev}(GMS, MCE dev)environment:sets${…:-quickstart}. A later env file's${KEY:-default}cannot change a default an earlier layer setJAVA_TOOL_OPTIONS(system-update, GMS, MCE dev)AWS_REGIONinx-localstack-envAWS_REGION:pass-through only by merge order. In an env file, a shell value would win insteadAWS_PROFILEand the GCP, Vertex and Bedrock namesAWS_SDK_LOAD_CONFIGsystem-update-debug-postgres-cdcuses the aws anchor but does not readvariants/debug, and MCE dev has no aws anchor. Moving it would need a copy per serviceKept as is: the LocalStack
AWS_SECRET_ACCESS_KEYdefault reads${DATAHUB_AWS_ACCESS_KEY_ID:-test}(the access key variable). It probably should read a secret key variable, but this PR changes no values.Verification
The rendered compose model is unchanged in every scenario. It was compared with
.github/scripts/compose_env_snapshot.py(from the snapshot tool PR) on a clean copy of the base branch and on this branch:snapshot --only bare shell smoke ai zdu, thendiff: no differences (71 scenarios; the known-brokendebug-frontendfails on both sides).snapshot --only gradle: no differences in any of the 27 Gradlequickstart_configsscenarios. These ran on scratch copies of both trees with the snapshot tool'sdocker/build.gradleprint task; the only failure is the known-brokenquickstartDebugSearchSplit, on both sides../gradlew :docker:generateQuickstartComposeConfig, thengit diff --exit-code docker/quickstart/: clean.python3 smoke-test/check_env_parity.py: exit 0.No line changed in
env/docker/system-update.envorenv/docker/gms.env, the two files read outside the profiles (datahub-upgrade.shanddocker/mysql/docker-compose.mysql.yml).Checklist
env/README.md🤖 Generated with Claude Code
Summary by cubic
Moves the debug GMS and LocalStack
environment:values intoenv/docker/variants/files so debug services share config through the same env-file layer system as the regular profiles. The rendered compose model is unchanged in every scenario, so no values change.Refactors
variants/debug/gms.env; LocalStack endpoint, keys and executor role move tovariants/localstack/.env_filelists with the variants in order datastore, graph, cloud (localstack), debug.&datahub-gms-env-filesand&datahub-system-update-env-filesanchors.DATAHUB_SERVER_TYPEandJAVA_TOOL_OPTIONS(defaults set by an earlier layer or tied to the debug port),AWS_REGION(relies on merge order), bare cloud pass-throughs, andAWS_SDK_LOAD_CONFIG.env/README.mddocuments the newlocalstackvariant slot.Written for commit 758d515. Summary will update on new commits.