8000 feat(dashboard): support live Component/bigquery config hot-reload by AntonTyb · Pull Request #1409 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(dashboard): support live Component/bigquery config hot-reload - #1409

Merged
AntonTyb merged 5 commits into
feat/dashboard-bigquery-corefrom
feat/dashboard-bigquery-component-reload
Oct 27, 2026
Merged

AntonTyb merged 5 commits into
feat/dashboard-bigquery-corefrom
feat/dashboard-bigquery-component-reload

Conversation

@AntonTyb
@AntonTyb AntonTyb commented Oct 25, 2026 •
Copy link
Copy Markdown
Collaborator

Stack (5/6): main ← #1405 ← #1406 ← #1407 ← #1408 ← #1409 (this PR) ← #1410 — review and merge bottom-up.

Summary

Adds pkg/bigquery/componentconfig and wires dynamic Component/bigquery Custom Resource discovery and live configuration hot-reload into cmd/dashboard_service, updating docs/architecture/components.md.

Motivation & Context

Deployments running with the XMC Component Management System (enable_components=true) manage infrastructure endpoints via Kubernetes Component Custom Resources (xmc.dev/v1alpha1) rather than static pod environment variables alone. Supporting Component/bigquery with SHA-256 coordinate fingerprinting allows dashboard_service to discover BigQuery coordinates dynamically and swap its cached DataEngine on /readyz probes without restarting pods, matching pkg/clickhouse/componentconfig.

Key Changes

  • Add pkg/bigquery/componentconfig (Source, ResolveOptions, OptionsFingerprint) resolving Component/bigquery coordinates with precedence status.access.envVars (PROJECT_ID, DATASET, TABLE) -> spec.parameters (projectId, dataset, table) -> static environment / fallback defaults.
  • Upgrade cmd/dashboard_service BigQuery initialization to dataengine.NewDynamicEngineProvider with buildBigQueryResolver and isBigQueryExpected CR inspection.
  • Synchronize docs/architecture/components.md (### 2.4 Dashboard Service) to document pkg/bigquery alongside pkg/clickhouse.

Assumptions

  • Component/bigquery exposes uppercase PROJECT_ID, DATASET, and TABLE keys under status.access.envVars and camelCase projectId, dataset, and table keys under spec.parameters — chosen to match pkg/components/bridge/wrapper_reconciler.go (camelToUpperSnake) and pkg/clickhouse/componentconfig — Phase 3's deploy/profiles/stable-2026a/components/bigquery profile will use these exact parameter names.

Verification & Testing

  • Commands Executed: bazel test --build_tests_only --runs_per_test=10 //pkg/bigquery/... //cmd/dashboard_service/..., bazel coverage --build_tests_only --combined_report=lcov //pkg/bigquery/... //cmd/dashboard_service/..., ./.githooks/pre-commit
  • Coverage & Test Status: All unit tests pass across 10 runs (pkg/bigquery/componentconfig/resolver.go 100.0% statement coverage, plus live Component/bigquery hot-reload verification in cmd/dashboard_service/main_test.go); pre-commit hooks and affected test suite pass.

Related Issues / Bugs

N/A

TAG=agy
CONV=0fafd02b-f3b1-4563-a73d-49ec0845afbd

Enable `dashboard_service` to discover `Component/bigquery` Custom Resources
when `enable_components=true` and dynamically swap the cached BigQuery
`DataEngine` on readiness probes whenever resolved table coordinates change.

- Add `pkg/bigquery/componentconfig` (`Source`, `ResolveOptions`,
  `OptionsFingerprint`) resolving `status.access.envVars` (`PROJECT_ID`,
  `DATASET`, `TABLE`) -> `spec.parameters` (`projectId`, `dataset`, `table`)
  -> static environment fallback.
- Wire `NewDynamicEngineProvider` and `isBigQueryExpected` in
  `cmd/dashboard_service` to rebuild the BigQuery engine on fingerprint changes
  without pod restarts.
- Update `docs/architecture/components.md` (`2.4 Dashboard Service`) to
  document BigQuery support alongside ClickHouse.

TAG=agy
CONV=0fafd02b-f3b1-4563-a73d-49ec0845afbd

Change-Id: I54548185a4277eb006923b50097ae5a2fce98f24
@gemini-code-assist gemini-code-assist Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces dynamic BigQuery configuration resolution for the dashboard service by reading from a Kubernetes Component Custom Resource (CR) or falling back to static environment variables. It adds a new componentconfig package under pkg/bigquery to handle option resolution and fingerprinting, integrates this dynamic resolver into the dashboard service initialization, and updates the corresponding tests and architectural documentation. There are no review comments to address, and the implementation looks solid.

…ery-component-reload

Change-Id: I27c6c3e75881d8a5270703d1405470ffaccc298a
@AntonTyb
AntonTyb marked this pull request as ready for review October 26, 2026 06:55
@github-actions
github-actions Bot requested a review from andrzejfudro October 26, 2026 06:55
@VLukiantsev
VLukiantsev added this pull request to stack #1412 October 26, 2026 09:37
andrzejfudro
andrzejfudro previously approved these changes Oct 26, 2026
…ard-bigquery-component-reload

Sync downstream stack branch with upstream stack ancestry.

TAG=agy
CONV=0fafd02b-f3b1-4563-a73d-49ec0845afbd

Change-Id: I7e5c67492169a9e3fae98f052cf14b88079ebdc3
github-actions[bot]
github-actions Bot previously approved these changes Oct 26, 2026
@github-actions github-actions Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Incremental PR Approval

Clean rebase detected with zero semantic patch lines changed.

Preserving prior approval by @andrzejfudro on commit ef690c0.

…ard-bigquery-component-reload

Change-Id: I9d292465acb3179285e87591fd2214005f128600
github-actions[bot]
github-actions Bot previously approved these changes Oct 26, 2026
< 8000 div data-view-component="true" class="TimelineItem-body">
@github-actions github-actions Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Incremental PR Approval

Clean rebase detected with zero semantic patch lines changed.

Preserving prior approval by @andrzejfudro on commit ef690c0.

…ard-bigquery-component-reload

Change-Id: I086a5766984f6d668cd3b1495ba4cd304325d300
@github-actions github-actions Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Incremental PR Approval

Clean rebase detected with zero semantic patch lines changed.

Preserving prior approval by @andrzejfudro on commit ef690c0.

@AntonTyb
AntonTyb added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 1791d15 Oct 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0