Implement direct controller for DataprocSession #8890
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 298 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.341
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8890"
general
weight: 0.35
codebot-robot
This PR implements the Phase 2 (Controller and E2E Tests) for
DataprocSessionby developing a package-isolated direct controller.Design Decisions & Rationale
1. Package Isolation:
Implemented all controller and mapping logic inside
pkg/controller/direct/dataproc/session/. This maintains perfect separation and prevents any naming or version symbol collisions in the sharedmapper.generated.go.2. Multi-Version Direct Mappers:
Generated
mapper.generated.gospecifically underpkg/controller/direct/dataproc/session/using the API versionv1alpha1. Added explicitint32toint64casting for shared nested types such asInstanceGroupAutoscalingPolicyConfigto prevent type-mismatch compilation errors.3. Reconciler Routing & Harness Registration:
- Registered
DataprocSessioninpkg/controller/resourceconfig/static_config.gowithk8s.ReconcilerTypeDirectso that KCC routes reconciling events to our direct controller.- Registered
DataprocSessionas a supported mock service inconfig/tests/samples/create/harness.go.4. MockGCP Support:
- Developed the mock implementation of the
SessionControllerAPI inmockgcp/mockdataproc/session.go, includingCreateSession,GetSession, andDeleteSession(with correct enum operations metadata).- Registered the mock
SessionControllerServerinsidemockgcp/mockdataproc/service.go.5. E2E Golden-File Fixtures:
- Created minimal and maximal
DataprocSessiontest fixtures.- Executed and recorded the HTTP traffic and Kubernetes objects to goldens.
- Discovered that the upstream Go SDK client's
DeleteSessionOperation.WaitexpectsSessionbut returns a protobuf LRO. We added an elegant workaround to handle the mismatched type parsing error, matching standard patterns found in other KCC direct controllers.6. Validation:
- All E2E tests against MockGCP successfully pass.
- CENTRAL fuzz-roundtrippers tests (
TestSomeMappers) successfully pass forDataprocSessionafter triaging the.environment_config.execution_config.authentication_configfields.---
This PR was generated by Overseer (powered by the gemini-3.5-flash model).
Chore file: .agents/greenfield-direct-controller.md
Fixes #8884