Move ComputeProjectMetadata to identity and refs pattern #13824
🤖 AI Factory started investigating CI check failures for this pull request.
Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored.
Investigating validate-generated-files failure
Run: 37825557128
Name:
validate-generated-filesCause:
Code ErrorDetails: The PR introduced
ComputeProjectMetadataRef in apis/compute/v1beta1/computeprojectmetadata_reference.go, but the corresponding deepcopy methods were missing from apis/compute/v1beta1/zz_generated.deepcopy.go. As a result, the validate-generated-files presubmit check detected out-of-date generated code after running make generate.Action Taken: Fix applied. Ran
make generate locally to generate the missing deepcopy methods in apis/compute/v1beta1/zz_generated.deepcopy.go, verified that ./dev/ci/presubmits/validate-generated-files passed cleanly, amended the commit, and pushed the updated commit upstream.(This report was generated by overseer)
🤖 AI Factory started reviewing this pull request in a sandbox.
apirefs.TrimComputeURIPrefix(ref) is redundant here because id.FromExternal(ref) already trims Compute URI prefixes internally. Consider passing ref directly to id.FromExternal(ref).
KCC Auto-Review Results
Trigger criteria matched: Yes
API Version Check: Pass -
apis/compute/v1beta1 matches the existing CRD version (v1beta1).Go Type Pointers: Pass - Type definitions and reference structs conform to pointer and field requirements.
Schema Compatibility: Pass -
diff-crds confirms no schema changes were introduced.ComputeProjectMetadataIdentity and ComputeProjectMetadataRef correctly implement identity.IdentityV2 and refs.Ref.Detailed Findings / Actions Required:
1.
apis/compute/v1beta1/computeprojectmetadata_reference.go:71: Pre-trimming via apirefs.TrimComputeURIPrefix(ref) in ValidateExternal is redundant since id.FromExternal already trims Compute URI prefixes.🤖 AI Factory started addressing review feedback for this pull request.
🤖 AI Factory started investigating CI check failures for this pull request.
Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored.
Investigating tests-e2e-fixtures-workstations failure
Run: 37846626924
Name:
tests-e2e-fixtures-workstationsCause:
FlakeDetails: Network error while downloading the Go toolchain from proxy.golang.org (
read "https://proxy.golang.org/golang.org/toolchain/@v/v0.0.1-go1.26.4.linux-amd64.zip": stream error: stream ID 1; INTERNAL_ERROR; received from peer). The failure is unrelated to the changes in this PR.Action Taken: Rerun triggered via
gh run rerun 37846626924 --failed.(This report was generated by overseer)
🤖 AI Factory started reviewing this pull request in a sandbox.
🤖 AI Factory started reviewing this pull request in a sandbox.
KCC Auto-Review Results
Trigger criteria matched: Yes
API Version Check: Pass - Checked
apis/compute/v1beta1/ matching existing v1beta1 CRD version.Go Type Pointers: Pass - No spec/status primitive modifications in
_types.go; reference struct fields follow canonical KCC reference conventions.Schema Compatibility: Pass - CRD schema is unchanged; no fields added or removed.
ComputeProjectMetadataIdentity correctly implements identity.IdentityV2 and identity.Resource using gcpurls.Template, and ComputeProjectMetadataRef implements refs.Ref with readiness-checked fallback for legacy resources.Detailed Findings / Actions Required:
None. All review criteria pass.
🤖 AI Factory started addressing review feedback for this pull request.
Thank you for the review. All automated checks and KCC review criteria have passed with no actions required. The pull request is clean, all CI presubmits have succeeded, and the PR is ready for human approver review.
(This comment was generated by overseer)
KCC Auto-Review Results
Trigger criteria matched: Yes
API Version Check: Pass - Implemented under
apis/compute/v1beta1/, matching baseline version (v1beta1).Copyright Year: Pass - All newly created files use
Copyright 2026 Google LLC.Schema Compatibility: Pass - Zero schema changes;
computeprojectmetadata_types.go is untouched.References/Identity: Pass - Implements
identity.IdentityV2 and refs.Ref via gcpurls.Template (projects/{project}) with compute URI prefix trimming and safe legacy fallback normalization.CI Presubmits: Pass - All 248 CI checks passed cleanly.
LGTM! Clean, high quality, and fully compliant with the kcc-identity-reference standards.
/lgtm
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: <a href="https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/13824#pullrequestreview-5476273435" title="LGTM">anhdle-sso</a>
Once this PR has been reviewed and has the lgtm label, please assign maqiuyujoyce for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
<details open>
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":["maqiuyujoyce"]} -->
anhdle-sso
ada-coder-bot
Description
Move
ComputeProjectMetadatato theidentityandrefspattern according to thekcc-identity-referenceskill.Summary of Changes
1. Identity (
apis/compute/v1beta1/computeprojectmetadata_identity.go):- Implemented
ComputeProjectMetadataIdentitywithidentity.IdentityV2andidentity.Resourceinterface compliance.- Defined
ComputeProjectMetadataIdentityFormatusinggcpurls.Template[ComputeProjectMetadataIdentity]("compute.googleapis.com", "projects/{project}").- Extracted project ID from KCC annotations or namespace via
refs.ResolveProjectID.- Implemented
GetIdentityreturning the resolved spec identity without altering the CRD schema.2. Reference (
apis/compute/v1beta1/computeprojectmetadata_reference.go):- Implemented
ComputeProjectMetadataRefwithrefs.Refinterface compliance.- Defined reference fields (
External,Name,Namespace).- Implemented
Normalizeusingrefs.NormalizeWithFallbackwhich validates readiness (isResourceReady) before deriving the external identity from spec.3. Tests & Fixtures (
apis/compute/v1beta1/computeprojectmetadata_identity_test.go,pkg/test/.../_identities.yaml):- Added unit tests covering identity parsing (
FromExternal), string formatting, parent string, host, and reference validation.- Updated golden fixture
_identities.yamlforComputeProjectMetadata, resolving CAIS URL to//compute.googleapis.com/projects/${TEST_DEPENDENT_ORG_PROJECT_ID}.4. Journal (
.gemini/skills/kcc-identity-reference/journal/ComputeProjectMetadata.md):- Documented observations regarding project-level compute resource URLs, CAIS template matching, and legacy fallback normalization.
Fixes #13818
``
release-note
``none
This PR was generated by the overseer agent (powered by the gemini-3.7-flash model).