fix(envtest): default NLBTargetType to ip in suite reconciler#373
Conversation
PR #372 moved SEI_NLB_TARGET_TYPE default-resolution to cmd/main.go so the reconciler treats Spec.NLBTargetType as canonical. The envtest suite_test.go is a parallel "main" that constructs its own reconciler and never reads the env var — it was left with NLBTargetType="" after the rebase, which stamped an empty target-type annotation on the generated Service and broke TestP2PEndpointP2P_CreateWithTCP_ChildHasAddressAndServiceExists. Apply the same default in the envtest suite so it mirrors cmd/main.go's construction-site invariant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview The change sets Reviewed by Cursor Bugbot for commit eef22f3. Bugbot is set up for automated code reviews on this repo. Configure here. |
Summary
PR #372 introduced
SEI_NLB_TARGET_TYPEwith default-resolution centralised incmd/main.go— the reconciler'sNLBTargetTypefield is canonical, no per-reconcile fallback. The envtest suite (internal/controller/nodedeployment/envtest/suite_test.go) is a parallel "main" that constructs its ownSeiNodeDeploymentReconcilerand doesn't read the env var, so it landed withNLBTargetType: "".Result:
generateP2PEndpointServicestamped the target-type annotation with the empty string, andTestP2PEndpointP2P_CreateWithTCP_ChildHasAddressAndServiceExistsfailed assertingaws-load-balancer-nlb-target-type=ip.Fix
One-line: set
NLBTargetType: nodedeploymentcontroller.DefaultNLBTargetTypein the envtest suite, mirroring the cmd/main.go invariant.Verification
make test-integrationpasses locally with this change.Note on the ECR image at 6a4334e (PR #372 merge commit)
The ECR workflow built successfully despite the CI failure (separate workflow, doesn't gate on tests). The production code path is unaffected — cmd/main.go correctly defaults to
ip. Only the envtest scaffolding was missing the same default. The image6a4334e184ddbd34f183611b8824ad29559c19e3is safe to deploy as-is.🤖 Generated with Claude Code