Skip to content

refactor(smoke): read the smoke job layer through the compose job slot - #21831

Open
devashish2203 wants to merge 15 commits into
pfp-8942-env-common-sharedfrom
pfp-8943-smoke-job-layer
Open

devashish2203 wants to merge 15 commits into
pfp-8942-env-common-sharedfrom
pfp-8943-smoke-job-layer

Conversation

@devashish2203

@devashish2203 devashish2203 commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #21830.

Docker smoke runs now read the smoke job layer (smoke-test/env) through the compose job slot, instead of inline flags in run-quickstart.sh and smoke.common.env. The AI smoke leg gets its own job folder. No effective value changes.

What changed

  • smoke-test/run-quickstart.sh exports DATAHUB_ENV_JOB_DIR (absolute smoke-test/env) and DATAHUB_ENV_MODE (ci when CI is set, otherwise local, the same rule the Docker-free launcher uses). It drops 10 inline flags and the smoke.common.env slot. Compose skips a missing job or extension folder silently (required: false), so the script fails before installDev and compose start if DATAHUB_ENV_JOB_DIR, or a set DATAHUB_ENV_EXTENSION_DIR, does not exist; the AI leg checks its job folder the same way.
  • Values only Docker reads go in smoke-test/env/docker/, which compose reads and the Docker-free launcher does not.
  • Five opt-in keys move from compose environment: to env/docker/{gms,system-update}.env with the same ${KEY:-default}, so a job file can set them: GMS MCP_SERVER_ENABLED, POLICY_CACHE_REFRESH_INTERVAL_SECONDS and ELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS; system-update ELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDS and ELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS. Every GMS and system-update service already had them. An ad-hoc env file (DATAHUB_LOCAL_*_ENV, datahub-dev env set) now overrides these keys, where compose environment: used to win. No ad-hoc file in the repo sets them.
  • AI smoke leg (docker-unified.yml): its settings are in smoke-test/env/gen-ai/, selected with DATAHUB_ENV_JOB_DIR/DATAHUB_ENV_MODE. The two provider env files are committed under providers/{local,classical}.env and passed through the same DATAHUB_LOCAL_COMMON_ENV slot as before. CI no longer writes /tmp/ai-gms.env. gms-lite-local-stack.yml excludes smoke-test/env/gen-ai/** from its smoke-test/env/** path filter, because the Docker-free stack never reads that folder.
  • smoke-test/check_env_parity.py: removes ci_overlay_drift() and the CI GMS overlay. The workflow keeps no copy that could drift. The Docker side still renders through quickstart_compose(), now in CI mode to match the Docker-free side.
  • Docs: env/README.md (Docker reads the job folder; what the parity check still guards) and smoke-test/README.md.
  • scripts/dev test: the expected env list layers for the smoke job now include smoke-test/env/docker/all.env and smoke-test/env/docker/gms.env.
Key Before After Services
THEME_V2_DEFAULT=false inline smoke-test/env/gms.env, smoke-test/env/docker/frontend.env gms, frontend
SHOW_HAS_SIBLINGS_FILTER, SHOW_SEARCH_BAR_AUTOCOMPLETE_REDESIGN, SHOW_HOME_PAGE_REDESIGN, SEARCH_BAR_API_VARIANT, DEV_TOOLING_ENABLED inline smoke-test/env/gms.env gms
MCP_SERVER_ENABLED=true, POLICY_CACHE_REFRESH_INTERVAL_SECONDS=2 inline smoke-test/env/gms.env gms
ELASTICSEARCH_INDEX_REFRESH_INTERVAL_TIMESERIES_SECONDS=1 inline smoke-test/env/docker/{gms,system-update}.env gms, system-update
ELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDS=1 inline smoke-test/env/docker/system-update.env system-update
SPRING_KAFKA_CONSUMER_PROPERTIES_AUTO_COMMIT_INTERVAL_MS=500, ES_BULK_ACK_AFTER_TRANSFER=true smoke.common.env smoke-test/env/docker/all.env all services
AI: index builder 1, timeseries 1, policy cache 10 workflow inline smoke-test/env/gen-ai/{gms,system-update}.env gms, system-update
AI: embedding provider values CI-written temp file smoke-test/env/gen-ai/providers/<provider>.env all services

What stays inline, and why

  • DATAHUB_TELEMETRY_ENABLED=false (smoke and AI): a shell value reaches only the services that name the key. Some system-update and MAE services do not, and a job file would add it to them.
  • KAFKA_LISTENER_CONCURRENCY=3: four postgres MAE/MCE consumers do not name the key, and a job file would add it to them.
  • export USAGE_AGGREGATION_FLUSH_INTERVAL_SECONDS: compose resolves a later file's ${KEY:-default} against the value an earlier file set (env/common/gms.env sets 30), so only the shell delivers 5.
  • Image, version, secret, search and path variables.

Cleaning these up needs a named value change, so it is left for a later PR.

Verification

Each item compares this branch with its base, without starting a stack:

  • Smoke: ran the script's own code through quickstart_compose config for all 32 compose profiles, with CI unset and with CI=true. Every service's environment is identical. debug-frontend fails to render on both sides, a known issue.
  • AI leg: rendered the workflow step's env for both providers across all profiles. Identical.
  • Compose env snapshot (bare, shell overrides, ZDU, smoke, AI): no differences. 27 Gradle quickstart scenarios: no differences.
  • Docker-free gms-lite-stack.py --print-env for each job (none, smoke-test, playwright) × mode (local, ci): identical.
  • check_env_parity.py: exit 0, report unchanged. :docker:generateQuickstartComposeConfig: no diff. actionlint, shellcheck, :smoke-test:pythonLint: clean.

No stack was started locally. This PR's CI smoke and AI legs are the runtime proof.

  • PR conforms to the Contributing Guideline (PR title format)
  • Links to related issues (not applicable)
  • Tests updated (parity check)
  • Docs updated
  • Breaking changes (not applicable: no effective value change)

🤖 Generated with Claude Code


Summary by cubic

Docker smoke runs now read the smoke job layer (smoke-test/env) through the compose job slot, instead of the inline flags in run-quickstart.sh and the smoke.common.env slot. The AI smoke leg gets its own job folder (smoke-test/env/gen-ai) with committed provider env files instead of a CI-written temp file. The parity check drops its CI overlay drift check. Rendered env is identical across all compose profiles, both AI providers, and the Docker-free launcher.

Note

  • run-quickstart.sh and the AI leg fail fast when an env layer folder is missing, because compose skips missing job folders silently; the quickstart check now runs before the background installDev starts, and an extension without a docker/ folder is accepted.
  • Five opt-in keys moved from compose environment: to env/docker/{gms,system-update}.env, so an ad-hoc env file (DATAHUB_LOCAL_*_ENV, datahub-dev env set) now overrides them where compose environment: used to win. No repo ad-hoc file sets them.
  • The gms-lite workflow skips changes under smoke-test/env/gen-ai/** because the Docker-free stack never reads that job folder.

Written for commit 947f7a7. Summary will update on new commits.

View guided diff Turn on auto-fix

run-quickstart.sh exports DATAHUB_ENV_JOB_DIR (smoke-test/env) and
DATAHUB_ENV_MODE, so compose reads the smoke job layer instead of inline
flags and smoke.common.env. Docker-only smoke values go in
smoke-test/env/docker/. Five opt-in keys move from compose environment:
to env/docker/{gms,system-update}.env with the same defaults, so the job
layer can set them. The AI smoke leg reads its own job folder and
committed provider files instead of a CI-written temp file. The parity
check drops its CI overlay drift check.

Rendered env is unchanged for every smoke profile (with and without CI),
both AI providers, bare/shell/zdu/Gradle scenarios and the Docker-free
launcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added devops PR or Issue related to DataHub backend & deployment smoke_test Contains changes related to smoke tests labels Dec 2, 2026
@cursor

cursor Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
Docker smoke and the AI embedding leg now load settings from committed job env layers (smoke-test/env and smoke-test/env/gen-ai) via DATAHUB_ENV_JOB_DIR / DATAHUB_ENV_MODE, instead of inline quickstart_compose() flags, smoke.common.env, or workflow-written /tmp/ai-gms.env. run-quickstart.sh exports the job path and fails fast if the job (or extension) folder is missing, since compose would skip missing layers silently.

Docker-only smoke tweaks live under smoke-test/env/docker/; shared values stay in smoke-test/env/. Five GMS/system-update keys move from compose environment: into env/docker/*.env with ${KEY:-default} so job files can override them—ad-hoc DATAHUB_LOCAL_*_ENV files can now win on those keys where inline compose used to. AI provider config is smoke-test/env/gen-ai/providers/{local,classical}.env via DATAHUB_LOCAL_COMMON_ENV.

check_env_parity.py drops the CI GMS overlay drift check and renders the Docker side in CI mode through quickstart_compose(). gms-lite-local-stack.yml ignores smoke-test/env/gen-ai/**. Docs and a dev env test reflect the new layering.

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

…ge tree

check_python_package.py treats every folder under smoke-test/tests
without an __init__.py as a stray namespace package. Move the AI smoke
leg's job folder to smoke-test/test_resources/semantic/env, beside the
actions env file the same workflow step reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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: 343 of 861 tests in 2 batches, predicted longest batch ~5 min
  • Tags: change-type: ci, docs, pytest-plumbing, test-infra; feature-dev: search-indexing, semantic-search; feature-user: authorization, search; technical-layer: elasticsearch, spring-config
  • Confidence: MEDIUM (20 changed files)
  • Classifier reasoning: Mostly smoke env layering and CI wiring, but it also changes runtime GMS and system-update settings for ES refresh intervals, policy cache refresh, and embedding providers.

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

Selected scopes (59 files or classes, 343 tests)
  • tests/e2e/audit_events/audit_events_test.py
  • tests/e2e/authorization/test_aspect_write_auth.py
  • tests/e2e/authorization/test_container_view_auth.py
  • tests/e2e/authorization/test_credential_aspect_read_auth.py
  • tests/e2e/authorization/test_domain_scoped_create_entity_auth.py
  • tests/e2e/authorization/test_domain_scoped_create_entity_auth.py::TestDomainScopedCreateEntityAuth
  • tests/e2e/authorization/test_privilege_constraints_writes.py
  • tests/e2e/authorization/test_privilege_grant_auth.py
  • tests/e2e/authorization/test_query_entity_read_auth.py
  • tests/e2e/authorization/test_self_entity_auth.py
  • tests/e2e/authorization/test_view_entity_queries_privilege.py
  • tests/e2e/browse/browse_test.py
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchBasic
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchDiagnose
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchDryRun
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchErrorHandling
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchFilterCombinations
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchFiltersByEntityType
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchFiltersByPlatform
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchPagination
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchProjectionLive
  • tests/e2e/cli/search_cmd/test_search_cmd.py::TestSearchWhereFilter
  • tests/e2e/cli/user_groups_cmd/test_user_cmd.py
  • tests/e2e/delete/delete_assertion_cascade_test.py
  • tests/e2e/delete/delete_test.py
  • tests/e2e/domains/domain_entities_batching_test.py
  • tests/e2e/entity_versioning/test_versioning_ingest.py
  • tests/e2e/frontend/test_static_asset_encodings.py
  • tests/e2e/glossary/glossary_children_count_test.py
  • tests/e2e/lineage/test_lineage_sdk.py
  • tests/e2e/managed_ingestion/ingestion_source_run_events_test.py
  • tests/e2e/mcp/mcp_test.py
  • tests/e2e/openapi/v3/test_scroll_entities.py
  • tests/e2e/patch/test_domain_patches.py
  • tests/e2e/policies/test_policies.py
  • tests/e2e/policies/test_policy_eval_perf.py
  • tests/e2e/privileges/test_privileges.py
  • tests/e2e/query_projection/test_query_projection_smoke.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/schema_fields/test_schemafields.py
  • tests/e2e/search/test_lineage_search_index_fields.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
  • tests/e2e/siblings/siblings_search_batching_test.py
  • tests/e2e/test_authentication_e2e.py
  • tests/e2e/test_e2e.py
  • tests/e2e/test_system_info.py
  • tests/e2e/timeline/timeline_change_history_auth_test.py

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

Playwright E2E tests

This run: smart

  • Selection: smart: specs tagged authorization, search, search-indexing, semantic-search plus the tests the change affects
  • Size: 58 tests in 10 spec files, ~12 min predicted on 2 shard(s)
Specs selected because of this PR (10)
Spec Tests Why
autocomplete-v2/autocomplete.spec.ts 2/2 tagged search
browse-v2/browse-v2.spec.ts 10/10 tagged search
logical-models/physical-children-view.spec.ts 2/2 tagged search
mutations/manage-ingestion-secret-privilege.spec.ts 3/3 tagged authorization
search/query-and-filter-search.spec.ts 10/10 tagged search
search/search-filters.spec.ts 5/5 tagged search
search/search-within-operator.spec.ts 1/1 tagged search
search/search.spec.ts 7/7 tagged search
search/searchv2.spec.ts 15/15 tagged search
settings-v2/v2-manage-policies.spec.ts 3/3 tagged authorization

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

commit 947f7a7 · 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 20 files

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

@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!

# Conflicts:
#	env/docker/system-update.env
devashish2203 and others added 2 commits December 3, 2026 18:56
…/env/gen-ai

Keeps every smoke job env folder under smoke-test/env. The existing
gitignore exceptions for smoke-test/env cover the new folder, so the
two semantic-folder exceptions go. No effective value change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Docker-free stack never reads smoke-test/env/gen-ai, so the
smoke-test/env/** path filter now excludes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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.

LGTM

Compose lists the job and extension env files as required: false, so a
mistyped folder was skipped without an error. run-quickstart.sh now
checks DATAHUB_ENV_JOB_DIR and, when set, DATAHUB_ENV_EXTENSION_DIR/docker
(relative paths resolve from docker/profiles/) before starting compose.
The AI smoke leg, which calls compose directly, checks its job folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

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

Comment thread smoke-test/run-quickstart.sh Resolved
Comment thread smoke-test/run-quickstart.sh Resolved
devashish2203 and others added 2 commits December 4, 2026 15:05
…n extension without docker/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 947f7a70 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 smoke_test Contains changes related to smoke tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants