Skip to content

fix(docker): give the postgres consumers MAE service the auth env - #21839

Open
devashish2203 wants to merge 13 commits into
pfp-8945-zdu-env-jobfrom
pfp-8979-mae-auth-layer
Open

devashish2203 wants to merge 13 commits into
pfp-8945-zdu-env-jobfrom
pfp-8979-mae-auth-layer

Conversation

@devashish2203

@devashish2203 devashish2203 commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #21833.

datahub-mae-consumer-quickstart-postgres-consumers omitted the token authentication anchor and DATAHUB_SYSTEM_CLIENT_SECRET that every other MAE consumer service gets. It looks like an oversight from when the env was split per service, not a choice: nothing says it was intentional. This adds the token authentication anchor, which carries DATAHUB_SYSTEM_CLIENT_SECRET too, matching datahub-mae-consumer-quickstart-postgres-cdc, and drops the comment that flagged the gap.

This changes rendered env on purpose. The container gains three keys (snapshot diff, bare and shell scenarios):

datahub-mae-consumer-quickstart-postgres-consumers | environment.DATAHUB_SYSTEM_CLIENT_SECRET: <absent> -> "JohnSnowKnowsNothing"
datahub-mae-consumer-quickstart-postgres-consumers | environment.DATAHUB_TOKEN_SERVICE_SALT: <absent> -> "<salt>"
datahub-mae-consumer-quickstart-postgres-consumers | environment.DATAHUB_TOKEN_SERVICE_SIGNING_KEY: <absent> -> "<signing-key>"

No other container changes, and no generated quickstart file changes.

Verification:

  • Snapshot diff base vs head: 6 differences, one service, three added keys.

  • docker compose --profile quickstart-postgres-consumers config renders.

  • ./gradlew :docker:generateQuickstartComposeConfig leaves docker/quickstart/ unchanged.

  • The PR conforms to DataHub's Contributing Guideline (PR title format)

  • Tests/docs: not applicable (compose env change)

  • No breaking change

🤖 Generated with Claude Code


Summary by cubic

Fixes the datahub-mae-consumer-quickstart-postgres-consumers service in the Docker compose profile so it receives the same token authentication environment and DATAHUB_SYSTEM_CLIENT_SECRET as every other MAE consumer service. It was the only one missing these, an oversight from when the env was split per service.

The container gains DATAHUB_SYSTEM_CLIENT_SECRET, DATAHUB_TOKEN_SERVICE_SALT, and DATAHUB_TOKEN_SERVICE_SIGNING_KEY; no other service changes. The change also drops the stale comment that flagged the gap.

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

View guided diff Turn on auto-fix

datahub-mae-consumer-quickstart-postgres-consumers omitted the token
authentication anchor and DATAHUB_SYSTEM_CLIENT_SECRET that every other
MAE consumer service gets. Add both, matching the postgres-cdc service.
The container gains DATAHUB_SYSTEM_CLIENT_SECRET,
DATAHUB_TOKEN_SERVICE_SALT and DATAHUB_TOKEN_SERVICE_SIGNING_KEY; no other
service changes. Also reword the stale comment on the shared MAE anchor.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@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
@cursor

cursor Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
The quickstart-postgres-consumers profile’s datahub-mae-consumer-quickstart-postgres-consumers service now merges *datahub-authentication-env into its environment block, alongside the existing telemetry, Kafka, and common anchors.

That aligns this variant with other MAE consumer services (including datahub-mae-consumer-quickstart-postgres-cdc), which already expose DATAHUB_SYSTEM_CLIENT_SECRET, DATAHUB_TOKEN_SERVICE_SALT, and DATAHUB_TOKEN_SERVICE_SIGNING_KEY. A stale inline comment about missing client secrets on this service is removed.

Only this one service definition changes; no other compose services are touched.

Reviewed by Cursor Bugbot for commit 1483972. 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 1 file

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

@github-actions

github-actions Bot commented Dec 3, 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: feature-dev: authentication
  • Confidence: MEDIUM (1 changed files)
  • Classifier reasoning: The MAE consumer postgres service now receives the datahub-authentication-env block, so the compose config changes which authentication settings the consumer gets, which maps to the authentication feature.

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 4636885 · workflow run

@codecov

codecov Bot commented Dec 3, 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:
#	docker/profiles/docker-compose.gms.yml

@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 — 4636885a 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

env-change-intended The PR changes rendered Docker compose env on purpose; lets the env snapshot diff check pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants