Skip to content

Greenfield: Implement direct KRM types, identity, and generate.sh for StorageInsightsReportConfig - #13621

Open
neumann-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
neumann-coder-bot:issue-13598-1790893877
Open

neumann-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
neumann-coder-bot:issue-13598-1790893877

Conversation

@neumann-coder-bot

Copy link
Copy Markdown
Collaborator

Description

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

Key Changes

  1. Types & References:
    • Added KRM types for StorageInsightsReportConfigSpec and StorageInsightsReportConfigObservedState in apis/storageinsights/v1alpha1/storageinsightsreportconfig_types.go.
    • Added CloudStorageFilters and CloudStorageDestinationOptions structs with BucketRef (storagev1beta1.StorageBucketRef).
  2. Identity & Reference:
    • Implemented StorageInsightsReportConfigIdentity matching the CAIS URL format projects/{project}/locations/{location}/reportConfigs/{reportConfig} in apis/storageinsights/v1alpha1/storageinsightsreportconfig_identity.go.
    • Implemented StorageInsightsReportConfigRef in apis/storageinsights/v1alpha1/storageinsightsreportconfig_reference.go delegating Normalize directly to refs.Normalize.
    • Added unit tests in apis/storageinsights/v1alpha1/storageinsightsreportconfig_identity_test.go.
  3. Scaffolding & Mapper:
    • Updated apis/storageinsights/generate.sh to include StorageInsightsReportConfig:ReportConfig.
    • Added Date_FromProto and Date_ToProto helper functions in pkg/controller/direct/storageinsights/mapper.go.
    • Generated CRD YAML, deepcopy functions, and mappers.

Fixes #13598

KCC Auto-Review Results

  • Trigger criteria matched: Yes
  • API Version Check: Pass - v1alpha1 in apis/storageinsights/v1alpha1/
  • Go Type Pointers: Pass - All scalar primitive types (including Location *string) are pointers
  • Completeness & Heuristics: Pass - 100% field mapping from ReportConfig proto to Spec and ObservedState
  • 1:1 Kind to Proto Mapping: Pass - StorageInsightsReportConfig maps 1:1 to google.cloud.storageinsights.v1.ReportConfig
  • References/Identity: Pass - Resource references and identity implemented per standards
  • Exception Files: Pass - No exception files were modified
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 ldanielmadariaga 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.

@neumann-coder-bot

Copy link
Copy Markdown
Collaborator Author

Investigating unit-tests-2-of-4 failure

Run: 36946205289 (https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/36946205289/job/110648806670)
Name: unit-tests-2-of-4
Cause: Test Failure
Details:

  1. TestCRDObjectTypes/storageinsightsreportconfigs.storageinsights.cnrm.cloud.google.com failed with schema validation error (v1alpha1.spec.parquetOptions is missing properties, additionalProperties, or x-kubernetes-preserve-unknown-fields) because empty proto struct ParquetOptions was missing // +kubebuilder:pruning:PreserveUnknownFields and // +kubebuilder:validation:Schemaless annotations.
  2. TestCRDFieldPresenceInTestsForAlpha failed because newly introduced StorageInsightsReportConfig fields were not yet present in tests/apichecks/testdata/exceptions/alpha-missingfields.txt.
    Action Taken: Fix applied. Added // +kubebuilder:pruning:PreserveUnknownFields and // +kubebuilder:validation:Schemaless to ParquetOptions, regenerated CRD manifests with x-kubernetes-preserve-unknown-fields: true, and updated tests/apichecks/testdata/exceptions/alpha-missingfields.txt. Verified all tests in tests/apichecks and apis/storageinsights/v1alpha1 pass cleanly, amended commit, and pushed updates to the PR branch.

(This report was generated by overseer)

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

@neumann-coder-bot

Copy link
Copy Markdown
Collaborator Author

Investigating tests-preview failure

Run: 36959137329 (https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/36959137329/job/110688684852)
Name: tests-preview
Cause: Flake
Details: The failure in TestPreview was caused by a manager shutdown timeout (failed waiting for all runnables to end within grace period of 30s: context deadline exceeded) under heavy CI load while stopping controller-runtime watchers across registered CRDs. This is an asynchronous shutdown timing issue and is unrelated to the changes in this PR. All other presubmit checks (including manifests validation, generated types, unit tests, fuzz tests, and e2e fixture tests) passed successfully.
Action Taken: Rerun triggered via gh run rerun 36959137329 --failed.

(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 - v1alpha1 correctly configured in apis/storageinsights/v1alpha1/ and CRD definition
  • Go Type Pointers: Pass - All scalar primitives (including Location *string) are pointers, and collection fields (slices, maps) correctly remain non-pointers
  • Completeness & Heuristics: Pass - 100% field coverage between google.cloud.storageinsights.v1.ReportConfig proto and KRM types with correct Spec vs ObservedState separation
  • 1:1 Kind to Proto Mapping: Pass - StorageInsightsReportConfig maps 1:1 to google.cloud.storageinsights.v1.ReportConfig
  • References/Identity: Pass - Resource references (ProjectRef, BucketRef) and Identity/Reference implementations follow KCC standards using refs.Normalize
  • Exception Files: Pass - Only allowed exception file tests/apichecks/testdata/exceptions/alpha-missingfields.txt was updated

Detailed Findings / Actions Required:

No blocking issues found. The types, identity, reference, and mapping scaffolding are complete and adhere to Greenfield guidelines.

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

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

… StorageInsightsReportConfig

This commit implements direct KRM types, identity, reference, and generate.sh for StorageInsightsReportConfig (storageinsights.cnrm.cloud.google.com/v1alpha1).

Key Changes:
- Added StorageInsightsReportConfig types in apis/storageinsights/v1alpha1/storageinsightsreportconfig_types.go.
- Implemented StorageInsightsReportConfigIdentity and StorageInsightsReportConfigRef in apis/storageinsights/v1alpha1/.
- Updated apis/storageinsights/generate.sh with StorageInsightsReportConfig.
- Added helper Date_FromProto and Date_ToProto in pkg/controller/direct/storageinsights/mapper.go.
- Generated CRD YAML, deepcopy, and mappers.

Fix: 13598
@neumann-coder-bot

Copy link
Copy Markdown
Collaborator Author

Thank you for the review! All auto-review checks and validation suites (API versioning, Go type pointer conventions, field mappings, identity/reference implementations, CRD schema validation, and unit tests) are passing cleanly. Rebased the branch onto the latest master.

(This comment was generated by overseer)

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

@neumann-coder-bot

Copy link
Copy Markdown
Collaborator Author

Investigating tests-e2e-direct-iam failure

Run: 36965556825 (https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/36965556825/job/110709351454)
Name: tests-e2e-direct-iam
Cause: Flake
Details: The failure in pkg/test/resourcefixture/testdata/iammemberreferences/bigqueryconnectionconnectionref was caused by a transient envtest control plane startup error (error starting test environment: unable to start control plane itself: failed to start the controlplane. retried 5 times: fork/exec /home/runner/work/k8s-config-connector/k8s-config-connector/.build/envtest-bin/etcd: text file busy) during parallel test execution. The failure is completely unrelated to the Greenfield StorageInsightsReportConfig changes in this PR. All other presubmit checks (including manifests validation, generated types, unit tests, fuzz tests, priority e2e fixtures, and linters) passed cleanly.
Action Taken: Rerun triggered via gh run rerun 36965556825 --failed.

(This report was generated by overseer)

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

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

2 similar comments
@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

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

@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 - v1alpha1 in apis/storageinsights/v1alpha1/
  • Go Type Pointers: Pass - All scalar primitive types (including Location *string and DisplayName *string) are pointers
  • Completeness & Heuristics: Pass - 100% field coverage from ReportConfig proto to Spec and ObservedState
  • 1:1 Kind to Proto Mapping: Pass - StorageInsightsReportConfig maps 1:1 to google.cloud.storageinsights.v1.ReportConfig
  • References/Identity: Pass - Resource references (BucketRef, ProjectRef) and identity format follow standard conventions
  • Exception Files: Pass - Only tests/apichecks/testdata/exceptions/alpha-missingfields.txt modified
@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

Thank you for the review! All auto-review criteria (API version check, Go type pointer conventions, field mappings, 1:1 Kind to proto mapping, resource references/identity, and exception file validation) and all CI presubmit checks have passed cleanly.

(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