feat(docker): read an extension's common env folder for GMS

DE
4h ago
+106-3

Summary

An extension (DATAHUB_ENV_EXTENSION_DIR, laid out like env/) can already give the Docker-free launcher values from its common/ folder. Compose read only the extension's docker/ folder, so a value an extension wanted on GMS in both stacks had to be written twice.

  • The GMS services in docker/profiles/docker-compose.gms.yml now also list ${DATAHUB_ENV_EXTENSION_DIR}/common/all.env and .../common/gms.env (optional), right before the extension's docker/ entries. As with env/common, only GMS reads this folder in Docker.
  • datahub-dev env list shows the two files at the same position.
  • env/README.md documents the order.

Stacked on #21862.

Testing

  • No change when the variable is unset: the compose env snapshot of this change and of its base are identical ("No differences in the rendered compose model").
  • With a scratch extension folder: a key set in common/gms.env renders on GMS; the same key in the extension's docker/gms.env wins over it.
  • scripts/dev/tests pass; the layer-order test covers an extension with both folders.

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

Compose now reads an extension's common/ folder for GMS, so a value reaches GMS in both Docker and Docker-free stacks from a single copy. GMS services load ${DATAHUB_ENV_EXTENSION_DIR}/common/{all,gms}.env right before the extension's docker/ entries, and debug services can also load ${DATAHUB_ENV_EXTENSION_DIR}/docker/variants/debug/{all,<service>}.env after them. All files are optional, and datahub-dev env list plus env/README.md reflect the order.