fix: name the cluster in the context a network context reconciles in - #397
Merged
Conversation
resolveProjectOrCluster falls back to naming a project's own control plane from the cluster the object was read from, because a project plane's namespace carries no upstream-cluster-name label. It reads that name from the context, and this reconciler never put it there — it took ClusterName from the request for the logger only. So the log line said the cluster while the fallback saw nothing, and every project-plane context failed to resolve. NetworkReconciler already does this, which is why networks reconcile against project control planes today and contexts did not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scotwells
marked this pull request as ready for review
August 21, 2026 16:31
scotwells
enabled auto-merge
August 21, 2026 16:43
privateip
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every network context in the staging project control plane is stuck at
ProjectUnresolvedsince #396, so no location gets a subnet and the chain behind it stays blocked.resolveProjectOrClusterexists for exactly this case — a project's own control plane has no such label on its namespace, so the project is named by the cluster instead. It reads that name from the context.NetworkContextReconcilertookreq.ClusterNamefor its logger and never put it in the context, so the log line reported"cluster": "datum-cloud"while the fallback saw nothing and returned the original error.NetworkReconcileralready does this, one file over, which is why networks reconcile against project control planes today and contexts did not.Verified on
us-central-1-staging-lab: the context is in the project plane with the right labels and owner, and the reconcile runs — only the resolution fails.Related
Fixes the project-plane path added in #396. Unblocks datum-cloud/compute#244, which waits on
Prepared, and the VPC controller in datum-cloud/cloud that needs a subnet to give a location its address space.