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

Merged
DE
3h ago
+64-5

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.