reviewgen-legacy-feature

Reviews pull requests that add or modify features in legacy Terraform and DCL resources.

1.1k|377|Updated Apr 8, 2019
One-click install
npx skills add https://github.com/GoogleCloudPlatform/k8s-config-connector --skill reviewgen-legacy-feature
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reviewgen-legacy-feature
Source: https://github.com/GoogleCloudPlatform/k8s-config-connector/tree/main/.gemini/skills/reviewgen-legacy-feature
Command: npx skills add https://github.com/GoogleCloudPlatform/k8s-config-connector --skill reviewgen-legacy-feature

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewing PRs that patch legacy Terraform-based or DCL-based resources in Config Connector is error-prone: reviewers must verify schema, expander, and flattener changes, CRD regeneration, test fixture coverage, MockGCP alignment, and direct controller parity. This Skill codifies those mandatory review criteria into a repeatable checklist.

Core Features & Use Cases

  • Patch Verification: Checks TF patch files under third_party for schema, expand, and flatten logic, and DCL patches for multi-version schema and implementation updates.
  • MockGCP and Real GCP Alignment: Compares real HTTP logs against mock logs (including dual-controller _http_old_controller variants) and flags suspicious identical logs suggesting the real GCP test was never run.
  • Direct Controller Alignment: Verifies that new or modified fields are reflected in apis/ types, direct mappers, fuzzers, and Update() diffing logic, and flags legacy patches on already-migrated resources as yellow flags.
  • Use Case: A reviewer receives a PR adding a new field to a Terraform-based resource; the Skill walks through patch integrity, fixture test coverage, golden log diffs, and produces a standardized review summary with actionable findings.

Quick Start

Review this pull request that adds a new field to a legacy Terraform-based Config Connector resource and produce the standard review summary.

Frequently Asked Questions about reviewgen-legacy-feature

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a PR that adds a field to a Terraform-based Config Connector resource?▼

Verify the schema addition in the patch file under third_party, confirm expand and flatten logic is implemented, check CRD regeneration under config/crds/resources, and ensure fixture tests cover the new field in create.yaml or update.yaml.

How to verify MockGCP alignment for legacy resource changes?▼

Compare the real GCP HTTP log against the mock log for the resource, using _http_old_controller variants for unmigrated dual-controller resources. Diffs in newly added or modified fields indicate a MockGCP implementation gap.

When should a DCL patch be rejected in favor of a direct controller change?▼

When the resource's DefaultController in static_config.go is already Direct, legacy DCL or TF patches no longer make sense. The reviewer should flag this as a yellow flag and direct the contributor to implement the feature in pkg/controller/direct and apis instead.

How can I tell if the real GCP test was actually run for a PR?▼

Look for minor dynamic diffs between real and mock logs such as timestamps or generated IDs. If the logs are 100% identical, the mock logs may have been copied, so ask the contributor to confirm the hack/record-gcp run.

What must be updated in the direct controller when a legacy field becomes mutable?▼

Update the direct types in apis/, align mappers and fuzzers, and remove obsolete immutability validation in the controller's Update() logic so in-place updates are permitted for the newly mutable field.