Skip to content

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

Open
devashish2203 wants to merge 11 commits into
pfp-8941-env-anchors-frontendfrom
pfp-8941-env-anchors-onnx
Open

devashish2203 wants to merge 11 commits into
pfp-8941-env-anchors-frontendfrom
pfp-8941-env-anchors-onnx

Conversation

@devashish2203

@devashish2203 devashish2203 commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

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.

Written for commit f35167d. Summary will update on new commits.

View guided diff Turn on auto-fix

Move the ONNX semantic-search values of the debug GMS and system-update
services out of docker-compose.onnx-override.yml into
env/docker/variants/onnx/{gms,system-update}.env. The override adds these
files to the service env_file lists; compose appends them after the
service's own list, so they come after the ad-hoc slots, as the override's
environment: already beat ad-hoc files.

ONNX_EMBEDDING_MODEL_DIR stays in environment: it is tied to the
/datahub/models mount of the same service.

The rendered compose config is unchanged in every scenario, including
the quickstartDebugBuiltinEmbedding Gradle scenario.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the devops PR or Issue related to DataHub backend & deployment label Dec 2, 2026
@cursor

cursor Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
Refactors the debug quickstart ONNX stack so semantic-search settings live in env/docker/variants/onnx/ instead of long inline environment: blocks in docker-compose.onnx-override.yml.

datahub-gms-debug and system-update-debug now pull ONNX config via env_file (gms.env / system-update.env), with Compose appending those entries after each service’s existing env list so they still override extension, job, and ad-hoc layers the same way the old inline vars did. ONNX_EMBEDDING_MODEL_DIR stays under environment: because it is coupled to the /datahub/models volume mount; mounts and WAR/JAR shadowing are untouched.

env/README.md documents this onnx variant as a special case in env precedence. Intended behavior and rendered compose env are meant to be unchanged; ONNX values should be edited in the variant files (or the override) rather than scattered in compose.

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

@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 4 files

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

@github-actions

github-actions Bot commented Dec 2, 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: smart).

  • Selection: smart: tests for the tagged features, plus always-run modules, this PR's changed tests, and the plumbing sample if the PR changes the pytest harness
  • Size: 54 of 861 tests in 1 batch, predicted longest batch ~0 min
  • Tags: change-type: docs; feature-dev: semantic-search
  • Confidence: MEDIUM (4 changed files)
  • Classifier reasoning: The change moves ONNX semantic-search environment settings for the debug quickstart into env files, which configures the semantic-search feature, while the README edit is documentation only.

Medium confidence: a wrong tag means tests are skipped, so check the tags above against what this PR touches.

Selected scopes (16 files or classes, 54 tests)
  • tests/e2e/authorization/test_self_entity_auth.py
  • tests/e2e/delete/delete_assertion_cascade_test.py
  • tests/e2e/frontend/test_static_asset_encodings.py
  • tests/e2e/managed_ingestion/ingestion_source_run_events_test.py
  • tests/e2e/mcp/mcp_test.py
  • tests/e2e/read_only/test_services_up.py
  • tests/e2e/search/test_search_projection.py::TestSearchProjection
  • tests/e2e/semantic/test_classical_embedding_provider.py::TestClassicalEmbeddingProvider
  • tests/e2e/semantic/test_config_fingerprint.py::TestConfigFingerprint
  • tests/e2e/semantic/test_current_offset_api.py
  • tests/e2e/semantic/test_event_driven_docs.py::TestEventDrivenDocumentIngestion
  • tests/e2e/semantic/test_event_mode_fallback.py::TestEventModeFallback
  • tests/e2e/semantic/test_local_embedding_provider.py::TestLocalEmbeddingProvider
  • tests/e2e/semantic/test_semantic_search.py::TestSemanticSearchWithIngestion
  • tests/e2e/semantic/test_source_type_filtering.py::TestSourceTypeFiltering
  • tests/e2e/semantic/test_stateful_ingestion.py::TestStatefulIngestion

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

Playwright E2E tests

This run: p0

  • Selection: p0: no spec is tagged semantic-search, so 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 f35167d · workflow run

@codecov

codecov Bot commented Dec 2, 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!

@david-leifker david-leifker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One precedence problem, otherwise this looks good.

services:
datahub-gms-debug:
env_file:
- ../../env/docker/variants/onnx/gms.env

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Compose appends an override file's env_file entries after the base service's list, so this ONNX file now wins over every layer in the base list: env/docker/gms.env, <mode>/all.env, the extension dir and the job dir. That is the reverse of the documented order, where variants sit below the extension and job layers. I confirmed it by rendering with an ad-hoc file that sets one of these keys: the ONNX value wins.

Before this PR the same values sat in the override's environment: block, which also outranks env_file, so an ad-hoc or job file could not override them then either. The change is not a regression. It does mean the new layering doc is wrong for this variant.

Either document that the ONNX variant is last, or add the variant to the base env_file list at its normal position. The same applies to system-update-debug below.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Confirmed: the override's env_file entries are appended after the service's whole list, so the ONNX variant beats the extension, job and ad-hoc layers. Kept the behaviour and documented it in env/README.md and next to each env_file in the override (fda3c07). Only environment: beats it.

devashish2203 and others added 2 commits December 4, 2026 14:39
The ONNX override file's env_file entries are appended after the service's
whole list, so the variant wins over the extension, job and ad-hoc layers.
Say so in env/README.md and next to each env_file in the override.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — f35167d1 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.

2 participants