diff --git a/.gitignore b/.gitignore index 5127cca69a1eb..13611619b1c58 100644 --- a/.gitignore +++ b/.gitignore @@ -132,6 +132,7 @@ skills-lock.json !/env/**/*.env !/smoke-test/env/**/*.env !/e2e-test/ui/playwright/env/**/*.env +!/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/**/*.env # Exception: ZDU test compose override (no secrets — only authz bypass flags) !docker/profiles/zdu-test.env diff --git a/docker/build.gradle b/docker/build.gradle index 1e30e61f81c8f..3c88638f9d003 100644 --- a/docker/build.gradle +++ b/docker/build.gradle @@ -321,8 +321,7 @@ ext { ':datahub-actions', ], additionalEnv: [ - 'DATAHUB_LOCAL_COMMON_ENV': "${rootProject.project(':metadata-integration:java:acryl-spark-lineage').projectDir}/spark-smoke-test/smoke-gms.env", - 'METADATA_SERVICE_AUTH_ENABLED': 'false' + 'DATAHUB_ENV_JOB_DIR': "${rootProject.project(':metadata-integration:java:acryl-spark-lineage').projectDir}/spark-smoke-test/env", ] ], 'quickstartStorage': [ @@ -510,7 +509,6 @@ dockerCompose { environment.put 'DATAHUB_VERSION', System.getenv("DATAHUB_VERSION") ?: "v${version}" environment.put 'DATAHUB_APP_VERSION', System.getenv("DATAHUB_APP_VERSION") ?: "v${version}" environment.put 'DATAHUB_TELEMETRY_ENABLED', 'false' - environment.put "METADATA_TESTS_ENABLED", "true" // Debug bind-mount stacks only. Image quickstarts keep compose's default // (false) unless a task sets DEV_TOOLING_ENABLED via additionalEnv (e.g. CI OS3). if (config.isDebug) { @@ -1065,7 +1063,6 @@ tasks.register("reloadEnv", Exec) { environment.put 'DATAHUB_VERSION', System.getenv("DATAHUB_VERSION") ?: "v${version}" environment.put 'DATAHUB_APP_VERSION', System.getenv("DATAHUB_APP_VERSION") ?: "v${version}" environment.put 'DATAHUB_TELEMETRY_ENABLED', 'false' - environment.put "METADATA_TESTS_ENABLED", "true" if (matchingConfig.isDebug) { environment.put "DEV_TOOLING_ENABLED", "true" } diff --git a/docker/profiles/docker-compose.gms.yml b/docker/profiles/docker-compose.gms.yml index cd0dcbfc2f189..9c3082b94c8b0 100644 --- a/docker/profiles/docker-compose.gms.yml +++ b/docker/profiles/docker-compose.gms.yml @@ -228,7 +228,6 @@ x-datahub-gms-service: &datahub-gms-service <<: [*kafka-env, *datahub-common-env, *datahub-authentication-env] # The server type stays here: a later env file's ${KEY:-default} sees the value an earlier file set. DATAHUB_SERVER_TYPE: ${DATAHUB_SERVER_TYPE:-quickstart} - METADATA_SERVICE_AUTH_ENABLED: ${METADATA_SERVICE_AUTH_ENABLED:-true} DATAHUB_OBJECT_STORAGE_URI: ${DATAHUB_OBJECT_STORAGE_URI:-file:///tmp/datahub-object-storage} MCP_CONSUMER_BATCH_ENABLED: ${MCP_CONSUMER_BATCH_ENABLED:-true} # Same value as system-update, which writes it onto the index. Unset, it stays at 3s instead of diff --git a/env/README.md b/env/README.md index fa02a27e2da5c..4045cfc90848b 100644 --- a/env/README.md +++ b/env/README.md @@ -4,7 +4,8 @@ Env files for GMS, system-update and optional services in DataHub's local stacks (`metadata-service/gms-lite/bin/gms-lite-stack.py`, started by `scripts/dev/datahub-dev.sh start --local`) reads `common/` and `docker-free/`. The Docker compose profiles read `common/` for GMS, the files in `docker/`, and the job folder that `DATAHUB_ENV_JOB_DIR` selects (`smoke-test/run-quickstart.sh` -selects `smoke-test/env`); the rest of their env still lives in `docker/profiles/*`. +selects `smoke-test/env`, Gradle `quickstartSpark` the spark smoke folder); the rest of their env still +lives in `docker/profiles/*`. ## Layout @@ -19,6 +20,9 @@ env/ smoke-test/env/ job layer for the pytest smoke tests (--job smoke-test) smoke-test/env/gen-ai/ job layer for the AI embedding smoke leg (docker-unified.yml), compose only e2e-test/ui/playwright/env/ job layer for Playwright (--job playwright) +metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/ + job layer for the spark lineage smoke test (Docker only, + selected by Gradle `quickstartSpark`) ``` Each layer folder can hold `all.env` (every service) and one file per service: `gms.env`, diff --git a/env/docker/gms.env b/env/docker/gms.env index 48b19cd4380ba..c3832fd9f812b 100644 --- a/env/docker/gms.env +++ b/env/docker/gms.env @@ -36,8 +36,9 @@ PE_CONSUMER_ENABLED=true # This should match the DATAHUB_BASE_PATH setting in the frontend service # DATAHUB_BASE_PATH=${DATAHUB_BASE_PATH} -# Uncomment to disable Metadata Service Authentication -# METADATA_SERVICE_AUTH_ENABLED=false +# Metadata Service Authentication. Job folders (spark, ZDU) turn it off; an `environment:` entry +# would mask them. +METADATA_SERVICE_AUTH_ENABLED=${METADATA_SERVICE_AUTH_ENABLED:-true} # Uncomment to disable persistence of client-side analytics events # DATAHUB_ANALYTICS_ENABLED=false diff --git a/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/all.env b/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/all.env new file mode 100644 index 0000000000000..cd10b655059cb --- /dev/null +++ b/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/all.env @@ -0,0 +1 @@ +REST_API_AUTHORIZATION_ENABLED=false diff --git a/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/gms.env b/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/gms.env new file mode 100644 index 0000000000000..9daebe7fe550e --- /dev/null +++ b/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/env/gms.env @@ -0,0 +1 @@ +METADATA_SERVICE_AUTH_ENABLED=false diff --git a/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/smoke-gms.env b/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/smoke-gms.env deleted file mode 100644 index 00ff37b8e8dd8..0000000000000 --- a/metadata-integration/java/acryl-spark-lineage/spark-smoke-test/smoke-gms.env +++ /dev/null @@ -1,4 +0,0 @@ -REST_API_AUTHORIZATION_ENABLED=false -# This does not work from an env file since this is also defined in the environment list which takes precedence over env files. -# This environment variable must be set to disable METADATA_SERVICE_AUTH_ENABLED -# METADATA_SERVICE_AUTH_ENABLED=false \ No newline at end of file