8000 feat(components): 3p custom wrapper reconciliation and coordinate injection by VLukiantsev · Pull Request #583 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(components): 3p custom wrapper reconciliation and coordinate injection - #583

Closed
VLukiantsev wants to merge 0 commit into
feat/components-health-prober-b548435805from
feat/components-3p-reconciler-sync-b548435805
Closed

VLukiantsev wants to merge 0 commit into
feat/components-health-prober-b548435805from
feat/components-3p-reconciler-sync-b548435805

Conversation

@VLukiantsev
@VLukiantsev VLukiantsev commented Aug 24, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

Implements third-party wrapper reconciliation, active status synchronization, access coordinate publishing, and daemon prober wiring for the XMC GitOps Bridge subsystem (pkg/components/bridge, cmd/xmc_bridge).

Motivation & Context

Completes the 3P CRD integration in the GitOps Bridge controller, allowing external Kubernetes operators and CRDs (e.g., Ray, ClickHouse, Kueue) to be managed declaratively as XMC Components with dynamic status detection, health verification, and access routing.

Key Changes

  • pkg/components/bridge/reconciler.go: Implements reconcile3PWrapper, verifyEndpointHealth, handle3PReadyStatus, handle3PUnreadyStatus, populateAccessEnvVars, BridgeProber, and ParseWrapperRefOptions.
  • pkg/components/bridge/reconciler_test.go: Comprehensive unit and scenario tests for 3P wrapper reconciliation and prober composition.
  • cmd/xmc_bridge/main.go: Instantiates and wires BridgeProber with dynamic client and network health prober.

Verification & Testing

  • Commands Executed: bazel test //pkg/components/... //cmd/xmc_bridge/...
  • Coverage & Test Status: All tests pass cleanly with high statement coverage.

TAG=agy
CONV=e193ad6b-8b84-49bd-b734-9ebe92b1d7c5

@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 support for reconciling third-party custom wrappers (COMPONENT_TYPE_CUSTOM_3P_WRAPPER) by implementing a new BridgeProber that combines status detection and health probing. It also adds corresponding reconciliation logic, environment variable population, and comprehensive unit tests. The review feedback focuses on defensive programming, suggesting nil checks on status detection and health probe results to prevent potential nil pointer dereference panics, and highlights a hardcoded timeout that overrides user configuration.

Comment thread pkg/components/bridge/reconciler.go 10000 Resolved
Comment thread pkg/components/bridge/reconciler.go Resolved
Comment thread pkg/components/bridge/reconciler.go Resolved
Comment thread pkg/components/bridge/reconciler.go Resolved
Comment thread pkg/components/bridge/reconciler.go Resolved
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 0dc5901 to 20da945 Compare August 24, 2026 17:51
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from b20bedc to 445b7b5 Compare August 24, 2026 17:57
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 7596ff9 to fa6ee15 Compare August 25, 2026 15:42
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 12c6418 to 48ffb57 Compare August 25, 2026 15:42
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from fa6ee15 to b23fa40 Compare August 25, 2026 16:10
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 48ffb57 to d8b1d8f Compare August 25, 2026 16:16
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from b23fa40 to 8a4b7f9 Compare August 26, 2026 07:31
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from d8b1d8f to 379d6ea Compare August 26, 2026 07:32
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 8a4b7f9 to b8a12e8 Compare August 26, 2026 07:44
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch 2 times, most recently from 1337502 to fad2b65 Compare August 26, 2026 08:20
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from b8a12e8 to d318819 Compare August 26, 2026 08:20
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from fad2b65 to a7f627b Compare August 26, 2026 08:48
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch 2 times, most recently from 89b4103 to 8c26820 Compare August 26, 2026 09:18
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch 2 times, most recently from 4d8c841 to 2fca052 Compare August 26, 2026 11:51
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 8c26820 to 16ba51f Compare August 26, 2026 11:51
@VLukiantsev
Copy link
Copy Markdown
Collaborator Author

/gemini review

@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 support for reconciling third-party (3P) wrappers in the xmc-bridge service by adding a BridgeProber for status detection and health probing, implementing 3P wrapper reconciliation logic, and parsing wrapper reference options. The review feedback highlights three key issues: first, overwriting the observed generation with the target resource's generation violates Kubernetes API conventions; second, ParseWrapperRefOptions should support both camelCase and snake_case keys to prevent parsing failures; and third, the reconciler should distinguish between a missing CRD and a missing resource instance instead of hardcoding 'CRDNotFound'.

Comment thread pkg/components/bridge/reconciler.go Resolved
Comment thread pkg/components/bridge/reconciler.go Resolved
Comment thread pkg/components/bridge/reconciler.go Resolved
@VLukiantsev
Copy link
Copy Markdown
Collaborator Author

/gemini review

@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 support for reconciling third-party wrappers (COMPONENT_TYPE_CUSTOM_3P_WRAPPER) in the bridge reconciler. It adds the BridgeProber to combine status detection and health probing, parses wrapper reference options from the custom resource spec, and populates access environment variables upon successful reconciliation. The review feedback highlights two important issues: first, when status detection fails, the reconciler should update the resource conditions to preserve observability and prevent existing conditions from being wiped out; second, the ProbeHealth signature should be updated to accept a default namespace to correctly resolve namespace-scoped third-party resources when the namespace is omitted in the spec.

Comment thread pkg/components/bridge/reconciler.go Resolved
Comment thread pkg/components/bridge/reconciler.go Resolved
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from dd10524 to 683cf41 Compare August 26, 2026 13:18
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 2e605cc to 474dc29 Compare August 26, 2026 13:18
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 683cf41 to 454e69e Compare August 26, 2026 13:37
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 474dc29 to 1b2405c Compare August 26, 2026 13:39
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 454e69e to 1918657 Compare August 26, 2026 13:57
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 979cb2f to 4c09372 Compare August 27, 2026 10:06
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 46afdf1 to 96b7cae Compare August 27, 2026 10:06
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 4c09372 to 5d3323c Compare August 27, 2026 10:59
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 96b7cae to 4daed72 Compare August 27, 2026 10:59
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 5d3323c to 2d3fe5d Compare August 27, 2026 15:18
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 4daed72 to abf57fb Compare August 27, 2026 15:19
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 2d3fe5d to b7a5eba Compare August 27, 2026 15:46
@VLukiantsev
VLukiantsev 10000 force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from abf57fb to 9bcb583 Compare August 27, 2026 15:46
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from b7a5eba to e9ae72a Compare August 27, 2026 16:27
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 9bcb583 to 8f4c135 Compare August 27, 2026 16:27
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from e9ae72a to 6884a5a Compare August 27, 2026 16:29
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 8f4c135 to b9952f5 Compare August 27, 2026 16:29
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 6884a5a to feb8c4f Compare August 27, 2026 16:32
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from b9952f5 to ad5d860 Compare August 27, 2026 16:32
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from feb8c4f to 1d95d2f Compare August 28, 2026 08:34
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from ad5d860 to 82bb8bc Compare August 28, 2026 08:34
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 1d95d2f to 3b05b66 Compare August 28, 2026 10:31
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 82bb8bc to 4bac60e Compare August 28, 2026 10:31
@VLukiantsev VLukiantsev changed the title feat(components): 3p custom wrapper reconciliation and bridge wiring feat(components): 3p custom wrapper reconciliation and coordinate injection Aug 28, 2026
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 4bac60e to 8c64264 Compare August 28, 2026 13:06
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch 2 times, most recently from 1409391 to 944de33 Compare August 31, 2026 08:31
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 8c64264 to 821d029 Compare August 31, 2026 08:31
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 944de33 to 86bdb5a Compare August 31, 2026 09:45
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 821d029 to 9164552 Compare August 31, 2026 09:46
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from 86bdb5a to f9c29f0 Compare August 31, 2026 10:58
@VLukiantsev
VLukiantsev force-pushed the feat/components-3p-reconciler-sync-b548435805 branch from 9164552 to 787f2d6 Compare August 31, 2026 10:58
@VLukiantsev
VLukiantsev force-pushed the feat/components-health-prober-b548435805 branch from f9c29f0 to d4296d4 Compare August 31, 2026 13:51
@VLukiantsev
Copy link
Copy Markdown
Collaborator Author

Closing PR #583 as its reconciliation flow, coordinate parsing, and active health probing logic have been vertically consolidated into PR #581 (Passive CRD Status Detection & Reconciler Wiring) and PR #582 (Active Network Health Probing & Access Coordinate Publishing) to eliminate dead code across intermediate PRs.

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.

1 participant

0