Skip to content

feat(docker): add an extension env slot for the debug variant - #21908

Merged
devashish2203 merged 1 commit into
env-extension-common-slotfrom
env-extension-debug-slot
Dec 4, 2026
Merged

devashish2203 merged 1 commit into
env-extension-common-slotfrom
env-extension-debug-slot

Conversation

@devashish2203

@devashish2203 devashish2203 commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

An extension (DATAHUB_ENV_EXTENSION_DIR) can set values for every Docker service through its docker/{all,<service>}.env, but had no place for values that should apply only to the debug services. This adds docker/variants/debug/{all,<service>}.env to the extension, read only by the debug services, right after the extension's docker/ files (mirroring the base order: service file, then variant file).

  • Every service that reads a base env/docker/variants/debug/<service>.env (debug system-update, GMS, MAE consumer and frontend) also reads the extension's debug files.
  • Debug services that share their env_file list with non-debug services (actions, AI service, MCE consumer, system-update-debug-postgres-cdc) are unchanged.
  • datahub-dev env list reports the new GMS layer.
  • env/README.md documents the slot; debug is the only variant with an extension folder.

Stacked on #21905.

Testing

  • Compose env snapshot with no extension set: no differences against the base.
  • Scratch extension: a key in docker/variants/debug/gms.env renders on datahub-gms-debug, wins over the same key in docker/gms.env, and does not render on datahub-gms-quickstart; same for frontend.
  • scripts/dev/tests pass.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly PR Title Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

🤖 Generated with Claude Code

https://claude.ai/code/session_014jwVYNVXbAnyBmNyhWCmxi


Summary by cubic

Adds a debug-only env slot to the Docker extension so debug services can receive values that don't apply to the normal stack.

Extensions could already set values for every Docker service through docker/{all,<service>}.env, but had no place for values meant only for debug services (system-update, GMS, MAE consumer, frontend). Those debug services now also read docker/variants/debug/{all,<service>}.env from the extension, right after its docker/ files, mirroring the base order. datahub-dev env list reports the new GMS layer, and env/README.md documents the slot. Debug services sharing their env files with non-debug services are unchanged, and with no extension set the rendered compose model is identical.

Written for commit 07db30a. Summary will update on new commits.

View guided diff Turn on auto-fix

An extension could set values for every Docker service through its
docker/ folder, but had no place for values meant only for the debug
services. The debug services now also read the extension's
docker/variants/debug/{all,<service>}.env, right after its docker/ files,
and `env list` shows the GMS file in that position. Only the debug variant
gets an extension slot. With no extension set, the rendered compose model
is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014jwVYNVXbAnyBmNyhWCmxi
@github-actions github-actions Bot added the devops PR or Issue related to DataHub backend & deployment label Dec 4, 2026
@cursor

cursor Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
Extensions (DATAHUB_ENV_EXTENSION_DIR) can already override Docker env via docker/{all,<service>}.env. This PR adds debug-only extension layers at ${DATAHUB_ENV_EXTENSION_DIR}/docker/variants/debug/{all,<service>}.env, loaded immediately after the extension's plain docker/ files—matching how base env/docker/variants/debug/ sits after the service file.

Debug compose services that already read base debug variant env (frontend, GMS, system-update, MAE consumer, and the shared env_file anchors for postgres/cassandra/neo4j/localstack debug stacks) now also pick up these optional extension paths. Quickstart and services that reuse non-debug env_file lists are unchanged.

datahub-dev's GMS layer ordering (_docker_layer_order) and env/README.md are updated so datahub-dev env list and docs reflect the new slot; tests assert the extra extension debug layer when an extension dir is set.

Reviewed by Cursor Bugbot for commit 07db30a. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Smart test selection

pytest smoke tests

Mode: active. Only the selection below runs for the pytest smoke tests on this PR (applied: p0).

  • Selection: p0: the p0 tier (fail-safe)
  • Size: 378 of 378 tests in 2 batches, predicted longest batch ~4 min
  • Tags: none
  • Confidence: LOW (5 changed files)
  • Classifier reasoning: The change adds debug-variant env file layers to docker compose and updates the dev env script, its test, and README, which fits no product feature tag, so confidence is low and the PR should run the p0 tier.
  • Fell back to the fail-safe because: the classifier had low confidence in its tags
Selected scopes (82 files or classes, 378 tests)
  • tests/e2e/assertions/assertions_test.py
  • tests/e2e/assertions/custom_assertions_test.py
  • tests/e2e/audit_events/audit_events_test.py
  • tests/e2e/authorization/test_aspect_write_auth.py
  • tests/e2e/authorization/test_credential_aspect_read_auth.py
  • tests/e2e/authorization/test_query_entity_read_auth.py
  • tests/e2e/cli/dataset_cmd/test_dataset_command.py
  • tests/e2e/cli/delete_cmd/test_timeseries_delete.py
  • tests/e2e/cli/domain_cmd/test_domain_cmd.py
  • tests/e2e/cli/graphql_cmd/test_graphql_cli_smoke.py::TestGraphQLCLIIntegration
  • tests/e2e/cli/ingest_cmd/test_timeseries_rollback.py
  • tests/e2e/cli/migrate_cmd/test_migrate_instance2instance_smoke.py
  • tests/e2e/cli/migrate_cmd/test_migrate_scenarios_smoke.py
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchBasic
  • tests/e2e/cli/user_cmd/test_user_add.py
  • tests/e2e/cli/user_groups_cmd/test_group_cmd.py
  • tests/e2e/cli/user_groups_cmd/test_user_cmd.py
  • tests/e2e/containers/container_entities_batching_test.py
  • tests/e2e/containers/containers_test.py
  • tests/e2e/database/test_database.py
  • tests/e2e/datapack/test_datapack_smoke.py::TestDatapackCLI
  • tests/e2e/dataproduct/test_dataproduct.py
  • tests/e2e/delete/delete_assertion_cascade_test.py
  • tests/e2e/delete/delete_test.py
  • tests/e2e/deprecation/deprecation_test.py
  • tests/e2e/domains/domains_test.py
  • tests/e2e/entity_graph_cache/test_entity_graph_cache.py::TestContainer
  • tests/e2e/entity_graph_cache/test_entity_graph_cache.py::TestDomain
  • tests/e2e/entity_graph_cache/test_entity_graph_cache.py::TestGlossary
  • tests/e2e/entity_versioning/test_effective_latest_versioning.py::TestEffectiveLatestVersioning
  • tests/e2e/entity_versioning/test_glossary_term_new_version.py
  • tests/e2e/entity_versioning/test_glossary_versioning.py
  • tests/e2e/forms/forms_test.py
  • tests/e2e/frontend/test_static_asset_encodings.py
  • tests/e2e/graph/test_graph_client.py
  • tests/e2e/incidents/health_batch_test.py
  • tests/e2e/incidents/incidents_test.py
  • tests/e2e/institutional_memory/institutional_memory_test.py
  • tests/e2e/knowledge/document_change_history_test.py
  • tests/e2e/knowledge/document_search_filter_test.py
  • tests/e2e/knowledge/test_document_crud.py::TestDocumentCrudAndMutations
  • tests/e2e/library_examples/test_library_examples.py
  • tests/e2e/lineage/test_lineage.py
  • tests/e2e/managed_ingestion/managed_ingestion_test.py
  • tests/e2e/object_storage/test_object_storage.py
  • tests/e2e/openapi/test_openapi.py
  • tests/e2e/openapi/v1/test_tracking.py
  • tests/e2e/openapi/v2/test_timeseries_scroll.py
  • tests/e2e/openapi/v3/test_scroll_entities.py
  • tests/e2e/openapi/v3/test_scroll_lineage.py
  • tests/e2e/openapi/v3/test_scroll_relationships.py
  • tests/e2e/patch/test_datajob_patches.py
  • tests/e2e/patch/test_dataset_patches.py
  • tests/e2e/patch/test_domain_patches.py
  • tests/e2e/policies/test_policies.py
  • tests/e2e/privileges/test_privileges.py
  • tests/e2e/read_only/test_ingestion_list.py
  • tests/e2e/read_only/test_policies.py
  • tests/e2e/read_only/test_search.py
  • tests/e2e/read_only/test_services_up.py
  • tests/e2e/restli/test_restli_batch_ingestion.py
  • tests/e2e/search/test_search_projection.py::TestSearchProjection
  • tests/e2e/semantic/test_current_offset_api.py
  • tests/e2e/service_accounts/test_service_accounts.py
  • tests/e2e/status/test_glossary_lifecycle_stages.py::TestGlossaryTermLifecycleStages
  • tests/e2e/status/test_lifecycle_state.py::TestLifecycleStageAPIs
  • tests/e2e/structured_properties/test_structured_properties.py
  • tests/e2e/tags_and_terms/tags_and_terms_test.py
  • tests/e2e/test_authentication_e2e.py
  • tests/e2e/test_e2e.py
  • tests/e2e/test_kafka_default_sink.py
  • tests/e2e/test_stateful_ingestion.py
  • tests/e2e/test_system_info.py
  • tests/e2e/timeline/timeline_change_history_test.py::TestDatasetTimeline
  • tests/e2e/timeline/timeline_change_history_test.py::TestGlossaryTermTimeline
  • tests/e2e/timeline/timeline_test.py
  • tests/e2e/timeseries/test_dataset_profiles_graphql.py
  • tests/e2e/timeseries/test_stats_summary_graphql.py
  • tests/e2e/tokens/revokable_access_token_test.py
  • tests/e2e/tokens/session_access_token_test.py
  • tests/e2e/trace/test_api_trace.py
  • tests/e2e/views/views_test.py

Add the run-all-tests:pytest label to run the full pytest suite on this PR.

Playwright E2E tests

This run: p0

  • Selection: p0: P0 tests plus the tests the change affects
  • Size: 145 tests in 79 spec files, ~32 min predicted on 4 shard(s)
  • Baseline: 79 spec files run for every PR (@p0)
  • No spec was selected because of this PR's changes.

Add the run-all-tests:playwright label to run the full Playwright suite on this PR.

commit 07db30a · workflow run

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@devashish2203
devashish2203 merged commit 2cec39e into env-extension-common-slot Dec 4, 2026
54 checks passed
@devashish2203
devashish2203 deleted the env-extension-debug-slot branch December 4, 2026 14:51

This branch was successfully deployed

1 active deployment
Preview — 07db30a9 Deployed Dec 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops PR or Issue related to DataHub backend & deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant