Skip to content

refactor(docker): move Gradle spark settings into a job folder - #21832

Open
devashish2203 wants to merge 12 commits into
pfp-8943-smoke-job-layerfrom
pfp-8945-gradle-zdu-env
Open

devashish2203 wants to merge 12 commits into
pfp-8943-smoke-job-layerfrom
pfp-8945-gradle-zdu-env

Conversation

@devashish2203

@devashish2203 devashish2203 commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #21831.

Moves the setting-type env that Gradle passes to compose into env layers, where a layer can express it without changing any rendered value.

  • quickstartSpark reads a new job folder, metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/, through DATAHUB_ENV_JOB_DIR. Its all.env holds REST_API_AUTHORIZATION_ENABLED=false for every service, as smoke-gms.env did through the common ad-hoc slot. Its gms.env holds METADATA_SERVICE_AUTH_ENABLED=false for GMS only, as the Gradle value did. smoke-gms.env is deleted.
  • METADATA_SERVICE_AUTH_ENABLED moves from the GMS compose environment: block to env/docker/gms.env, with the same ${METADATA_SERVICE_AUTH_ENABLED:-true} form, so that a job file can set it.
  • The METADATA_TESTS_ENABLED=true puts are deleted from docker/build.gradle. No compose file, env file or entrypoint names the key, so no container ever received it.
  • env/README.md lists the new job folder, and .gitignore gets a negation for it.

Gradle entries

Key Config Result
DATAHUB_LOCAL_ACTIONS_ENV debug configs Left: a path
DEV_TOOLING_ENABLED=true quickstartOS3 Left: there is no opensearch3 variant folder, and adding one would change plain-compose quickstart-opensearch3
DATAHUB_LOCAL_COMMON_ENV (smoke-gms.env) quickstartSpark Replaced by DATAHUB_ENV_JOB_DIR and the spark job folder
METADATA_SERVICE_AUTH_ENABLED=false quickstartSpark Moved to spark-smoke-test/env/gms.env
DATAHUB_VERSION, DATAHUB_APP_VERSION, DATAHUB_REPO all Left: version or image
DATAHUB_TELEMETRY_ENABLED=false all Left: the services that name this key are irregular, so no layer is exactly equivalent
METADATA_TESTS_ENABLED=true all Deleted: no container ever received it
DEV_TOOLING_ENABLED=true all debug configs Left: moving it to the debug variant would change plain-compose debug stacks
DATAHUB_SYSTEM_CLIENT_SECRET, token signing key and salt all Left: secrets

Behaviour change

An ad-hoc env file can now set METADATA_SERVICE_AUTH_ENABLED for GMS. Before, compose environment: masked the file. This is the precedence change planned for the env layers: ad-hoc files beat compose defaults.

Key Services Scenario Before After File
METADATA_SERVICE_AUTH_ENABLED every GMS service plain compose with an ad-hoc file that sets the key and no shell value, e.g. DATAHUB_LOCAL_COMMON_ENV=zdu-test.env alone, or a datahub-dev env set file true the file's value (false for zdu-test.env) docker/profiles/zdu-test.env or any DATAHUB_LOCAL_*_ENV file

The ZDU framework's own compose calls are unchanged: they also export METADATA_SERVICE_AUTH_ENABLED=false from the shell, so they rendered false before and still do.

One more edge case for quickstartSpark: before, its additionalEnv replaced any DATAHUB_LOCAL_COMMON_ENV set in the shell. Now a shell DATAHUB_LOCAL_COMMON_ENV file is also applied, as the ad-hoc layer on top of the job folder. CI sets no such variable.

Verification

Each check compared the base branch with this branch, using docker compose config renders. No stack was started.

  • Every Gradle quickstart_configs key, rendered with the env and arguments the compose plugin passes: 27 configs, no differences. quickstartDebugSearchSplit fails to render on both sides because its override file is not in the repo.
  • Every profile, bare and with shell overrides, plus the smoke and AI smoke invocations: no differences.
  • ZDU, both topologies (debug, debug-consumers), rendered with the framework's real compose files and env: the full service model is identical. That env includes the shell export, and the cleanup phase's env was rendered too. A ZDU render without the shell export shows only the behaviour change above.
  • ./gradlew :docker:generateQuickstartComposeConfig: docker/quickstart/ unchanged.
  • python3 smoke-test/check_env_parity.py: passes.

Moving zdu-test.env into a ZDU job folder follows in a separate PR. That change reworks several framework phases and the daily ZDU workflow.

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 Breaking Changes

🤖 Generated with Claude Code


Summary by cubic

Moves the setting-type env that Gradle passes to compose into env layers, so the spark smoke test can express it without changing any rendered value. quickstartSpark now selects the job folder metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/ through DATAHUB_ENV_JOB_DIR, replacing smoke-gms.env and the Gradle METADATA_SERVICE_AUTH_ENABLED=false value.

Behavior changes

  • An ad-hoc env file can now override METADATA_SERVICE_AUTH_ENABLED for GMS; before, the compose environment: entry masked env files.
  • Deletes METADATA_TESTS_ENABLED=true from docker/build.gradle; no compose file, env file, or entrypoint names the key, so no container ever received it.

Written for commit 9e8b404. Summary will update on new commits.

View guided diff Turn on auto-fix

quickstartSpark selects spark-smoke-test/env through DATAHUB_ENV_JOB_DIR
instead of smoke-gms.env and a METADATA_SERVICE_AUTH_ENABLED Gradle
value. METADATA_SERVICE_AUTH_ENABLED moves from GMS environment: to
env/docker/gms.env with the same default so a job file can set it. Drop
METADATA_TESTS_ENABLED, which no service received.

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

cursor Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
Moves Gradle quickstartSpark env from ad-hoc DATAHUB_LOCAL_COMMON_ENV / smoke-gms.env and inline Gradle flags into a standard job layer at spark-smoke-test/env/ via DATAHUB_ENV_JOB_DIR (all.env disables REST API auth; gms.env disables metadata service auth). smoke-gms.env is removed.

METADATA_SERVICE_AUTH_ENABLED is dropped from the GMS compose environment: block and defined in env/docker/gms.env as ${METADATA_SERVICE_AUTH_ENABLED:-true} so job and ad-hoc env files can override it—intended env-layer precedence; ad-hoc files like zdu-test.env can now take effect without a shell export.

Gradle no longer sets METADATA_TESTS_ENABLED=true on quickstart tasks. Docs and .gitignore cover the new checked-in env folder.

Reviewed by Cursor Bugbot for commit 80f3b30. 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 8 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: 111 of 861 tests in 1 batch, predicted longest batch ~2 min
  • Tags: change-type: build, docs, test-infra, tooling; feature-dev: authentication
  • Confidence: MEDIUM (8 changed files)
  • Classifier reasoning: The GMS env default for METADATA_SERVICE_AUTH_ENABLED changes how authentication runs, while the Gradle, spark smoke-test env, .gitignore and README edits are build, test-infra, tooling and docs changes.

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

Selected scopes (12 files or classes, 111 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/service_accounts/test_service_accounts.py
  • tests/e2e/test_authentication_e2e.py
  • tests/e2e/test_e2e.py
  • tests/e2e/tokens/revokable_access_token_test.py
  • tests/e2e/tokens/session_access_token_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 authentication plus the tests the change affects
  • Size: 14 tests in 5 spec files, ~1 min predicted on 1 shard(s)
Specs selected because of this PR (5)
Spec Tests Why
auth/login-with-welcome-modal.spec.ts 3/3 tagged authentication
auth/login.spec.ts 6/6 tagged authentication
login-v2/v2-login.spec.ts 1/1 tagged authentication
settings-v2/v2-manage-access-tokens.spec.ts 1/1 tagged authentication
settings-v2/v2-manage-service-accounts.spec.ts 3/3 tagged authentication

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

commit 9e8b404 · 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!

@devashish2203 devashish2203 added the env-change-intended The PR changes rendered Docker compose env on purpose; lets the env snapshot diff check pass label Dec 3, 2026
# Conflicts:
#	.gitignore

@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

This branch was successfully deployed

1 active deployment
Preview — 9e8b404d 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 env-change-intended The PR changes rendered Docker compose env on purpose; lets the env snapshot diff check pass ingestion PR or Issue related to the ingestion of metadata

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants