OpenParable
Skip to content
← Back to skills

Update Client Library Version

Development
update-client-library-version

Update Client Library Version is an Agent Skill for development published in the GoogleCloudPlatform/k8s-config-connector repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Guides through updating a Google Cloud Go client library to the latest version across the Config Connector repository.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/HEAD/.gemini/skills/update-client-library-version/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/update-client-library-version, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Upgrading Google Cloud Client Libraries in Config Connector

This skill outlines the process for updating Google Cloud client libraries (e.g., cloud.google.com/go/alloydb or cloud.google.com/go/spanner) in Config Connector (KCC).

Workflow

1. Identify the Latest Version

Find the latest version of the target Go client library. You can run:

go list -m -versions cloud.google.com/go/<service>

2. Update the Root Module

Update the dependency in the root go.mod directory to the target version and tidy up.

go get cloud.google.com/go/<service>@<version>
go mod tidy

3. Update the MockGCP Module

Update the dependency in the mockgcp/go.mod directory to align version configuration and tidy up.

cd mockgcp
go get cloud.google.com/go/<service>@<version>
go mod tidy
cd ..

4. Verify Fuzzing & Identify Missing Fields

Run KRM mapping fuzz tests to ensure the updated types do not introduce serialization or validation regressions.

go test -v ./pkg/fuzztesting/fuzztests/

If any new fields are introduced in the updated library, the roundtrip verification might fail. The failure messages will output helpful recommendations such as: Add f.Unimplemented_NotYetTriaged(".new_field") to the fuzzer for the proto type <proto_type> to mark this field as not yet triaged.

5. Mark New Fields as Untriaged

Locate the corresponding fuzzer file for the service (typically under pkg/controller/direct/<service>/<kind>_fuzzer.go). Add the recommended field ignore using f.Unimplemented_NotYetTriaged(".new_field") in the initialization of the fuzzer.

6. Format and Validate

Run formatting and verify the entire package compiled without static analysis issues:

make fmt
go vet ./pkg/controller/direct/<service>/... ./pkg/fuzztesting/fuzztests/...

Run the fuzz tests again to ensure all tests pass:

go test -v ./pkg/fuzztesting/fuzztests/