Skip to content

Greenfield: Implement direct KRM types, identity, and generate.sh for SaaSServiceMgmtUnit - #13625

Open
neumann-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
neumann-coder-bot:issue-13605-1790893875
Open

neumann-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
neumann-coder-bot:issue-13605-1790893875

Conversation

@neumann-coder-bot

Copy link
Copy Markdown
Collaborator

Description

This PR implements direct KRM types, identity, reference, and generate.sh for the SaaSServiceMgmtUnit greenfield resource (saasservicemgmt.cnrm.cloud.google.com/v1alpha1).

Key Changes

  1. Types:
    • Added KRM Go types for SaaSServiceMgmtUnitSpec and SaaSServiceMgmtUnitObservedState in apis/saasservicemgmt/v1alpha1/saasservicemgmtunit_types.go.
    • Included all spec and output-only observed state fields based on the GCP google.cloud.saasplatform.saasservicemgmt.v1beta1.Unit proto.
    • Annotated immutable fields (location, unitKind, tenant, managementMode) with CEL rules.
  2. Identity & Reference:
    • Implemented SaaSServiceMgmtUnitIdentity adhering to identity.IdentityV2 and identity.Resource interfaces in apis/saasservicemgmt/v1alpha1/saasservicemgmtunit_identity.go.
    • Implemented SaaSServiceMgmtUnitRef adhering to refs.Ref using refs.Normalize in apis/saasservicemgmt/v1alpha1/saasservicemgmtunit_reference.go.
    • Added unit tests in apis/saasservicemgmt/v1alpha1/saasservicemgmtunit_identity_test.go.
  3. Scaffolding & Mapper:
    • Updated apis/saasservicemgmt/generate.sh to include --resource SaaSServiceMgmtUnit:Unit.
    • Generated CRD manifest, deepcopy functions, and proto-to-KRM mappers.

Fixes #13605

NONE

This PR was generated by the overseer,step/gen-types,greenfield,overseer/review agent (powered by the gemini-3.7-flash model).

@neumann-coder-bot neumann-coder-bot added overseer step/gen-types greenfield Indicates implementation of a new resource (vs migration) overseer/review labels Oct 2, 2026
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cheftako 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 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

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 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.

…ference

Implement direct KRM types, identity, reference, and generate.sh for SaaSServiceMgmtUnit.

Issue: 13605
@neumann-coder-bot

Copy link
Copy Markdown
Collaborator Author

Investigating unit-tests-2-of-4 failure

Run: 36947566188
Name: unit-tests-2-of-4
Cause: Test Failure
Details: The newly added SaaSServiceMgmtUnit alpha CRD introduced fields that are not yet covered by test fixtures (which are created in Phase 2). The missing field ratchet check TestCRDFieldPresenceInTestsForAlpha in tests/apichecks failed because tests/apichecks/testdata/exceptions/alpha-missingfields.txt needed to be updated with the newly added CRD's missing fields.
Action Taken: Updated tests/apichecks/testdata/exceptions/alpha-missingfields.txt to include SaaSServiceMgmtUnit missing field exceptions, verified all tests/apichecks and apis/saasservicemgmt unit tests pass cleanly, validated generated files, and pushed the updated commit.

(This report was generated by overseer)

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started reviewing this pull request in a sandbox.

@reviewbot-robot reviewbot-robot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KCC Auto-Review Results

  • Trigger criteria matched: Yes
  • API Version Check: Pass - (CRD and Go types correctly placed under apis/saasservicemgmt/v1alpha1/ as v1alpha1)
  • Go Type Pointers: Pass - (All Go scalar primitive fields including Location use pointers; collection types are non-pointer slices)
  • Completeness & Heuristics: Pass - (All fields from google.cloud.saasplatform.saasservicemgmt.v1beta1.Unit are 100% accounted for, with output-only fields properly mapped to ObservedState)
  • 1:1 Kind to Proto Mapping: Pass - (1:1 relationship between SaaSServiceMgmtUnit and Unit proto)
  • References/Identity: Pass - (Implemented IdentityV2 and refs.Ref using refs.Normalize and gcpurls.Template)
  • Exception Files: Pass - (Only updated tests/apichecks/testdata/exceptions/alpha-missingfields.txt)

Detailed Findings / Actions Required:

None. All review criteria and conventions for greenfield new types are met.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started addressing review feedback for this pull request.

@neumann-coder-bot

Copy link
Copy Markdown
Collaborator Author

All automated checks and review criteria have passed with no findings or required actions. The PR is clean and ready for review/merge.

(This comment was generated by overseer)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

greenfield Indicates implementation of a new resource (vs migration) overseer/ready-for-human overseer step/gen-types

3 participants