refactor(docker): move ONNX override env into env/docker/variants/onnx

DE
5h ago
+39-20

Stacked on #21828.

Moves the ONNX semantic-search values of datahub-gms-debug and system-update-debug out of docker-compose.onnx-override.yml into env/docker/variants/onnx/{gms,system-update}.env. The rendered compose config is unchanged in every scenario.

Moved

EMBEDDING_PROVIDER_TYPE, ELASTICSEARCH_SEMANTIC_SEARCH_ENABLED, SEARCH_SERVICE_SEMANTIC_SEARCH_ENABLED, ONNX_EMBEDDING_MODEL_NAME, ELASTICSEARCH_ENTITY_INDEX_SEMANTIC_SEARCH_MODELS_SNOWFLAKE_ARCTIC_EMBED_S_VECTORDIMENSION, ONNX_EMBEDDING_POOLING, ONNX_EMBEDDING_QUERY_INSTRUCTION. The query instruction ends with a space, so it is double-quoted in the env file; compose strips the quotes and keeps the space.

Kept in environment:

ONNX_EMBEDDING_MODEL_DIR: the path is tied to the /datahub/models mount of the same service. Volumes are unchanged.

env_file merge

Compose appends the override's env_file list to the base service's list, so the ONNX file comes after the extension, job and ad-hoc slots. This matches today: the override's environment: already beat ad-hoc files, so no rendered value changes.

Verification

Rendered with compose_env_snapshot.py (from #21820) on a clean copy of the base and on this branch, then diffed:

  • gradle (all 27 quickstart_configs keys, including quickstartDebugBuiltinEmbedding, with the print task's docker/build.gradle copied over scratch copies only): no differences (quickstartDebugSearchSplit is known-broken on the base too).
  • bare, shell, smoke, ai, zdu: no differences (71 scenarios; debug-frontend is known-broken on the base too).
  • docker compose -f docker-compose.yml -f docker-compose.onnx-override.yml --profile debug config: environment of both services identical on base and head.
  • ./gradlew :docker:generateQuickstartComposeConfig then git diff --exit-code docker/quickstart/: clean.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (PR title format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable): rendered-config snapshot diff, no new tests
  • Docs related to the changes have been added/updated (if applicable): env/README.md
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Breaking Changes: not a breaking change

🤖 Generated with Claude Code


Summary by cubic

Moves the ONNX semantic-search environment for the debug GMS and system-update services out of docker-compose.onnx-override.yml into env/docker/variants/onnx/{gms,system-update}.env. The rendered compose config is unchanged in every scenario.

Refactors

  • Adds the new env files to the services' env_file lists; Compose appends them after each service's own list, matching the previous precedence of the override's environment:.
  • Keeps ONNX_EMBEDDING_MODEL_DIR inline because it is tied to the /datahub/models volume mount.
  • Double-quotes ONNX_EMBEDDING_QUERY_INSTRUCTION so its trailing space is preserved.
  • Documents the new onnx variant's env_file precedence in env/README.md and in comments next to each env_file in the override.
  • Verified no rendered-config differences across all Gradle quickstart scenarios plus bare, shell, smoke, ai, and zdu.