From 66bb80c77433c8c9ea064da8df2239f8bd0fdb9c Mon Sep 17 00:00:00 2001 From: Jason Vigil Date: Tue, 10 Dec 2024 23:55:06 +0000 Subject: [PATCH] feat: Add capability to replace proto contents in patch-proto Use this new capability to codify the Apigee proto hack that was originally made (manually) in https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/3183. This addresses the suggested change in https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/3183#pullrequestreview-2447281185. --- mockgcp/apply-proto-patches.sh | 11 +++ mockgcp/tools/patch-proto/go.mod | 2 + mockgcp/tools/patch-proto/go.sum | 4 + mockgcp/tools/patch-proto/main.go | 136 +++++++++++++++++++++++++----- 4 files changed, 130 insertions(+), 23 deletions(-) diff --git a/mockgcp/apply-proto-patches.sh b/mockgcp/apply-proto-patches.sh index 8773da7530..d571295ff0 100755 --- a/mockgcp/apply-proto-patches.sh +++ b/mockgcp/apply-proto-patches.sh @@ -67,3 +67,14 @@ cd tools/patch-proto # // Optional. The configuration for Private Service Connect (PSC) for the cluster. # PscConfig psc_config = 31 [(google.api.field_behavior) = OPTIONAL]; # EOF + +go run . --file ${REPO_ROOT}/mockgcp/apis/mockgcp/cloud/apigee/v1/service.proto --service "ProjectsServer" --mode "replace" <