Skip to content

Greenfield: Implement direct KRM types, identity, and generate.sh for NetworkConnectivityServiceConnectionMap - #13340

Open
hopper-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
hopper-coder-bot:issue-13307-1789976053
Open

hopper-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
hopper-coder-bot:issue-13307-1789976053

Conversation

@hopper-coder-bot

Copy link
Copy Markdown
Collaborator

This PR implements the direct KRM types, identity, and reference registration for NetworkConnectivityServiceConnectionMap under apis/networkconnectivity/v1alpha1.

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

Fixes #13307

NONE
@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started resolving merge conflicts / rebasing this pull request in a sandbox.

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.

5 similar comments
@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started resolving merge conflicts / rebasing this pull request in a sandbox.

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.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started resolving merge conflicts / rebasing this pull request in a sandbox.

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.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started resolving merge conflicts / rebasing this pull request in a sandbox.

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.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started resolving merge conflicts / rebasing this pull request in a sandbox.

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.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started resolving merge conflicts / rebasing this pull request in a sandbox.

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.

@ldanielmadariaga

Copy link
Copy Markdown
Collaborator

Fix merge conflicts

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

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

@hopper-coder-bot

Copy link
Copy Markdown
Collaborator Author

Rebased branch onto latest upstream master and resolved merge conflicts in apis/networkconnectivity/generate.sh, generated types/mappers, and pkg/gcpurls/registry_test.go. Validated formatting and tests cleanly.

(This comment was generated by overseer)

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started resolving merge conflicts / rebasing this pull request in a sandbox.

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.

type ConsumerPSCConfig struct {
// Required. The project ID or project number of the consumer project. This project is the one that the consumer uses to interact with the producer instance. From the perspective of a consumer who's created a producer instance, this is the project of the producer instance. Format: 'projects/' Eg. 'projects/consumer-project' or 'projects/1234'
// +kcc:proto:field=mockgcp.cloud.networkconnectivity.v1.ConsumerPscConfig.consumer_instance_project
ConsumerInstanceProject *string `json:"consumerInstanceProject,omitempty"`

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.

Should be a projectRef


// Immutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.
// +kcc:proto:field=mockgcp.cloud.networkconnectivity.v1.ConsumerPscConfig.producer_instance_id
ProducerInstanceID *string `json:"producerInstanceID,omitempty"`

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.


// The consumer project where PSC connections are allowed to be created in.
// +kcc:proto:field=mockgcp.cloud.networkconnectivity.v1.ConsumerPscConfig.project
Project *string `json:"project,omitempty"`

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.

I think this also needs to be a projectRef unless project means something else in this context, given consumerInstanceProject I don't believe it does.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

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

… NetworkConnectivityServiceConnectionMap

This PR implements the direct KRM types, identity, and reference registration for NetworkConnectivityServiceConnectionMap.

Fixes GoogleCloudPlatform#13307

Generated-by: overseer,overseer,step/gen-types,greenfield,overseer/review (gemini-3.7-flash)

release-note:
```release-note
NONE
```
@hopper-coder-bot

Copy link
Copy Markdown
Collaborator Author

Thank you for the review! I have addressed the feedback:

  • automatedDNSCreationSpec on ProducerPSCConfig: The automated_dns_creation_spec field is present in the upstream google.cloud.networkconnectivity.v1 protobuf schema (which our proto models and code generators build from). The REST documentation pages occasionally omit newer proto additions, but this is an active v1 proto feature rather than a deprecated field.
  • consumerInstanceProject on ConsumerPSCConfig: Updated to consumerInstanceProjectRef of type *refsv1beta1.ProjectRef.
  • producerInstanceID on ConsumerPSCConfig: Removed the deprecated producerInstanceID field.
  • project on ConsumerPSCConfig: Updated to projectRef of type *refsv1beta1.ProjectRef.

Regenerated CRDs, deepcopy functions, direct mappers, and updated missing field exceptions.

(This comment was generated by overseer)

@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 ask for approval from ldanielmadariaga. 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.

@hopper-coder-bot

Copy link
Copy Markdown
Collaborator Author

Investigating tests-e2e-fixtures-containeranalysis failure

Run: 36649064450
Name: tests-e2e-fixtures-containeranalysis
Cause: Infrastructure
Details: The job failed during envtest asset download with unable fetch envtest-v1.37.0-linux-amd64.tar.gz (https://github.com/kubernetes-sigs/controller-tools/releases/download/envtest-v1.37.0/envtest-v1.37.0-linux-amd64.tar.gz) -- got status "500 Internal Server Error", which led to exec: "etcd": executable file not found in $PATH. This is an external infrastructure flake unrelated to the PR changes.
Action Taken: Rerun triggered

Investigating tests-e2e-fixtures-apihub failure

Run: 36649064450
Name: tests-e2e-fixtures-apihub
Cause: Infrastructure
Details: The job failed during envtest asset download with unable fetch envtest-v1.37.0-linux-amd64.tar.gz (https://github.com/kubernetes-sigs/controller-tools/releases/download/envtest-v1.37.0/envtest-v1.37.0-linux-amd64.tar.gz) -- got status "500 Internal Server Error". This is an external infrastructure flake unrelated to the PR changes.
Action Taken: Rerun triggered

Investigating tests-e2e-fixtures-developerconnect failure

Run: 36649064450
Name: tests-e2e-fixtures-developerconnect
Cause: Infrastructure
Details: The job failed during envtest asset download with unable fetch envtest-v1.37.0-linux-amd64.tar.gz (https://github.com/kubernetes-sigs/controller-tools/releases/download/envtest-v1.37.0/envtest-v1.37.0-linux-amd64.tar.gz) -- got status "500 Internal Server Error". This is an external infrastructure flake unrelated to the PR changes.
Action Taken: Rerun triggered

(This report was generated by overseer)

type NetworkConnectivityServiceConnectionMapObservedState struct {
// Output only. PSC connection details on consumer side.
// +optional
ConsumerPSCConnections []ConsumerPSCConnection `json:"consumerPSCConnections,omitempty"`

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.

Should we call these ConsumerPSCConnectionObservedState or given they are already contained in an *ObservedState object this is already fine as is?

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

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

@hopper-coder-bot

Copy link
Copy Markdown
Collaborator Author

Thanks for the feedback!

Regarding ConsumerPSCConnection:
Leaving it as ConsumerPSCConnection is standard and fine as is. In KCC and controllerbuilder, sub-structs that map 1:1 to a proto message (here mockgcp.cloud.networkconnectivity.v1.ConsumerPscConnection) are generated under their canonical Go type name ConsumerPSCConnection in types.generated.go. An *ObservedState suffix is typically only applied when a proto message is split between Spec and Status or for the top-level resource ObservedState struct (NetworkConnectivityServiceConnectionMapObservedState). Since ConsumerPSCConnection is already contained within NetworkConnectivityServiceConnectionMapObservedState, keeping ConsumerPSCConnection aligns with the generated code and repository conventions.

(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