Skip to content

Greenfield: Implement direct controller, E2E fixtures, and fuzzer for DialogflowConversationDataset - #13629

Open
ada-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
ada-coder-bot:issue-13603-1790893875
Open

ada-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
ada-coder-bot:issue-13603-1790893875

Conversation

@ada-coder-bot

Copy link
Copy Markdown
Collaborator

Description

This PR implements the direct controller, E2E fixtures, and fuzzer for the greenfield resource DialogflowConversationDataset (dialogflow.cnrm.cloud.google.com/v1alpha1).

Key Changes

  • Implemented DialogflowConversationDataset direct controller adapter in pkg/controller/direct/dialogflow/conversationdataset/dialogflowconversationdataset_controller.go supporting Find, Create, Update, Delete, and Export operations using the GAPIC REST client (cloud.google.com/go/dialogflow/apiv2).
  • Followed service-generated ID conventions and handled Dialogflow v2 dataset immutability in Update.
  • Implemented KRM fuzzer pkg/controller/direct/dialogflow/conversationdataset/dialogflowconversationdataset_fuzzer.go covering all Spec and Status/ObservedState fields.
  • Registered DialogflowConversationDataset in pkg/controller/resourceconfig/static_config.go and pkg/controller/direct/register/register.go.
  • Added minimal and maximal E2E test fixtures under pkg/test/resourcefixture/testdata/basic/dialogflow/v1alpha1/dialogflowconversationdataset/.
  • Successfully recorded and verified E2E golden files against real GCP using hack/record-gcp in project cnrm-barni-4.
  • Added ${conversationDatasetID} dynamic ID normalization in mockgcp/mockdialogflow/normalize.go.
  • Updated alpha-missingfields.txt to reflect 100% field coverage in tests for DialogflowConversationDataset.

Fixes #13603

NONE

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

@ada-coder-bot ada-coder-bot added overseer greenfield Indicates implementation of a new resource (vs migration) step/controller 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 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 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

@ada-coder-bot

Copy link
Copy Markdown
Collaborator Author

Real GCP Audit Log Verification

Audit verification records confirming live GCP testing and actuation for DialogflowConversationDataset in project cnrm-barni-4:

[
  {
    "insertId": "6ozamxf87rzgq",
    "jsonPayload": {
      "event": "RESOURCE_ACTUATED_AND_VERIFIED",
      "gvk": "dialogflow.cnrm.cloud.google.com/v1alpha1, Kind=DialogflowConversationDataset",
      "namespace": "h3t4whcovuk465q",
      "probedUrls": [
        "https://dialogflow.googleapis.com/v2/projects/cnrm-barni-4/locations/global/conversationDatasets/3848585641210150912-fbd243c02f054df8?%24alt=json%3Benum-encoding%3Dint"
      ],
      "resourceName": "dialogflowconversationdataset-max-h3t4whcovuk465q",
      "testKey": "basic/dialogflow/v1alpha1/dialogflowconversationdataset/dialogflowconversationdataset-maximal",
      "timestamp": "2026-10-01T23:48:36Z"
    },
    "logName": "projects/cnrm-barni-4/logs/kcc-e2e-actuation-audit",
    "timestamp": "2026-10-01T23:48:36.332716843Z"
  },
  {
    "insertId": "y4wrfae56c2d",
    "jsonPayload": {
      "event": "RESOURCE_ACTUATED_AND_VERIFIED",
      "gvk": "dialogflow.cnrm.cloud.google.com/v1alpha1, Kind=DialogflowConversationDataset",
      "namespace": "kmb3ytpvqrmwvfq",
      "probedUrls": [
        "https://dialogflow.googleapis.com/v2/projects/cnrm-barni-4/locations/global/conversationDatasets/6154428650423844864-fbd243c02f054df8?%24alt=json%3Benum-encoding%3Dint"
      ],
      "resourceName": "dialogflowconversationdataset-min-kmb3ytpvqrmwvfq",
      "testKey": "basic/dialogflow/v1alpha1/dialogflowconversationdataset/dialogflowconversationdataset-minimal",
      "timestamp": "2026-10-01T23:42:48Z"
    },
    "logName": "projects/cnrm-barni-4/logs/kcc-e2e-actuation-audit",
    "timestamp": "2026-10-01T23:42:48.406177511Z"
  }
]
@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
  • Client Creation: Pass
  • Default Reconciler Kept: Pass
  • Proto Diffs & Update Mask: Pass
  • Structured Reporting: Pass
  • KRM Status Updates: Pass
  • LRO Wait: Pass
  • Test Coverage: Pass

Detailed Findings / Actions Required:

None. The direct controller implementation for DialogflowConversationDataset follows all KCC greenfield controller conventions and design principles:

  1. GAPIC REST client (NewConversationDatasetsRESTClient) is properly used.
  2. Correctly registers the direct model in static_config.go and register.go.
  3. Handles service-generated resource IDs correctly across Find, Create, Delete, and Export.
  4. Enforces resource immutability on update while invoking structuredreporting.ReportDiff to report diffs before returning.
  5. Consistently updates KRM status on Create and no-op Update.
  6. Waits for LRO completion on Create and Delete, and gracefully handles empty LRO delete responses.
  7. Includes minimal and maximal test fixtures with golden files recorded against real GCP, achieving full field coverage.
  8. Implements complete KRM fuzzer covering all spec and status fields.
@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

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

@ada-coder-bot

Copy link
Copy Markdown
Collaborator Author

Thank you for the review! All criteria passed with no actions required. Validations and tests continue to pass 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/controller

3 participants