From f1112f76c9a2beee5deacd853bc3925097b1dfee Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:11:51 -0400 Subject: [PATCH 01/18] spelling: that Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- crds/bigquery_v1alpha1_bigquerydatasetaccess.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crds/bigquery_v1alpha1_bigquerydatasetaccess.yaml b/crds/bigquery_v1alpha1_bigquerydatasetaccess.yaml index 8db183c236..c612c5a8eb 100644 --- a/crds/bigquery_v1alpha1_bigquerydatasetaccess.yaml +++ b/crds/bigquery_v1alpha1_bigquerydatasetaccess.yaml @@ -217,7 +217,7 @@ spec: status: properties: apiUpdatedMember: - description: If true, represents that that the iam_member in the config + description: If true, represents that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type. type: boolean From e5a54497c6a2f044396301744c90ffb312c31cee Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:12:01 -0400 Subject: [PATCH 02/18] spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- crds/cloudscheduler_v1beta1_cloudschedulerjob.yaml | 2 +- crds/monitoring_v1beta1_monitoringnotificationchannel.yaml | 2 +- crds/networkservices_v1beta1_networkservicesendpointpolicy.yaml | 2 +- pkg/cli/cmd/commonparams/commonparams.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crds/cloudscheduler_v1beta1_cloudschedulerjob.yaml b/crds/cloudscheduler_v1beta1_cloudschedulerjob.yaml index 9a940e0fee..ecb1d9ed4c 100644 --- a/crds/cloudscheduler_v1beta1_cloudschedulerjob.yaml +++ b/crds/cloudscheduler_v1beta1_cloudschedulerjob.yaml @@ -334,7 +334,7 @@ spec: and finally retries at intervals of max_backoff_duration up to retry_count times. For example, if min_backoff_duration is 10s, max_backoff_duration is 300s, and `max_doublings` is 3, - then the a job will first be retried in 10s. The retry interval + then the job will first be retried in 10s. The retry interval will double three times, and then increase linearly by 2^3 * 10s. Finally, the job will retry at intervals of max_backoff_duration until the job has been attempted retry_count times. Thus, the diff --git a/crds/monitoring_v1beta1_monitoringnotificationchannel.yaml b/crds/monitoring_v1beta1_monitoringnotificationchannel.yaml index dc77441d50..1d274a5db4 100644 --- a/crds/monitoring_v1beta1_monitoringnotificationchannel.yaml +++ b/crds/monitoring_v1beta1_monitoringnotificationchannel.yaml @@ -105,7 +105,7 @@ spec: type: string sensitiveLabels: description: |- - Different notification type behaviors are configured primarily using the the 'labels' field on this + Different notification type behaviors are configured primarily using the 'labels' field on this resource. This block contains the labels which contain secrets or passwords so that they can be marked sensitive and hidden from plan output. The name of the field, eg: password, will be the key in the 'labels' map in the api request. diff --git a/crds/networkservices_v1beta1_networkservicesendpointpolicy.yaml b/crds/networkservices_v1beta1_networkservicesendpointpolicy.yaml index 40eb97c7bb..a93d9ebdc6 100644 --- a/crds/networkservices_v1beta1_networkservicesendpointpolicy.yaml +++ b/crds/networkservices_v1beta1_networkservicesendpointpolicy.yaml @@ -149,7 +149,7 @@ spec: should contain all of the labels specified here. The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and - if P1 has a the matcher as MATCH_ANY , P2 has MATCH_ALL + if P1 has the matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client with label connects, the config from P1 will be selected. If a client with label connects, the config from P2 will be selected. If a client diff --git a/pkg/cli/cmd/commonparams/commonparams.go b/pkg/cli/cmd/commonparams/commonparams.go index 58e6a8d883..3b8b7f2dc0 100644 --- a/pkg/cli/cmd/commonparams/commonparams.go +++ b/pkg/cli/cmd/commonparams/commonparams.go @@ -84,7 +84,7 @@ func ValidateIAMFormat(value string) error { return fmt.Errorf("invalid %v value of '%v': must be one of {%v}", IAMFormatParamName, value, strings.Join(iamFormatOptions, ", ")) } -// Convert from the an IAMPolicyParam supplied on the command line to the stream type +// Convert from the IAMPolicyParam supplied on the command line to the stream type func IAMFormatParamToStreamIAMFormat(iamFormatParam string) (stream.IAMFormat, error) { switch iamFormatParam { case PartialPolicyFormatOption: From 9bd9ed05c1b85349cb1f3454f4a9e42de3293542 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:11:57 -0400 Subject: [PATCH 03/18] spelling: this Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- crds/tpu_v1alpha1_tpunode.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crds/tpu_v1alpha1_tpunode.yaml b/crds/tpu_v1alpha1_tpunode.yaml index fcbab3def3..3ad74dc45a 100644 --- a/crds/tpu_v1alpha1_tpunode.yaml +++ b/crds/tpu_v1alpha1_tpunode.yaml @@ -147,7 +147,7 @@ spec: Immutable. Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network that you want to peer the - TPU Node to is a Shared VPC network, the node must be created with this this field enabled. + TPU Node to is a Shared VPC network, the node must be created with this field enabled. type: boolean zone: description: Immutable. The GCP location for the TPU. If it is not From e90213314ea7a3ee5bf834d2efb6cc48b136e74a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:41:41 -0400 Subject: [PATCH 04/18] spelling: to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/controller/iam/iamclient/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/iam/iamclient/helpers.go b/pkg/controller/iam/iamclient/helpers.go index 1cce76ad92..4861914741 100644 --- a/pkg/controller/iam/iamclient/helpers.go +++ b/pkg/controller/iam/iamclient/helpers.go @@ -114,7 +114,7 @@ func embedPolicyData(spec map[string]interface{}) error { // An unfortunate reality is that the GVK is not always properly filled in when // reading a resource from the K8s API server, and there are functions that -// need the Kind to be filled in to work (e.g. krmtotf.NewResource, +// need the Kind to be filled to work (e.g. krmtotf.NewResource, // k8s.MarshalAsUnstructured, etc.). The Kind is not set because the TypeMeta // is empty. The reason why the TypeMeta is empty is because in // k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go the From cc8d6a5ad19f70cdd4b024d5564c99c15b27f457 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:52:40 -0400 Subject: [PATCH 05/18] spelling: todo Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../pkg/commands/updatetypes/updatetypescommand.go | 2 +- pkg/webhook/immutable_fields_validator_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tools/controllerbuilder/pkg/commands/updatetypes/updatetypescommand.go b/dev/tools/controllerbuilder/pkg/commands/updatetypes/updatetypescommand.go index 2b819c7b9f..d127123aa5 100644 --- a/dev/tools/controllerbuilder/pkg/commands/updatetypes/updatetypescommand.go +++ b/dev/tools/controllerbuilder/pkg/commands/updatetypes/updatetypescommand.go @@ -96,7 +96,7 @@ type TypeUpdater struct { opts *UpdateTypeOptions newField newProtoField dependentMessages map[string]protoreflect.MessageDescriptor // key: fully qualified name of proto message - generatedGoField generatedGoField // TOOD: support multiple new fields + generatedGoField generatedGoField // TODO: support multiple new fields generatedGoStructs []generatedGoStruct } diff --git a/pkg/webhook/immutable_fields_validator_test.go b/pkg/webhook/immutable_fields_validator_test.go index ada5520daf..f415c434f0 100644 --- a/pkg/webhook/immutable_fields_validator_test.go +++ b/pkg/webhook/immutable_fields_validator_test.go @@ -2161,7 +2161,7 @@ var TestCases = []TestCase{ }, ExpectedResult: []string{"ipAddress"}, }, - // (TODO:maqiuyu): Add a test case for resourceID once supported. + // TODO(maqiuyu): Add a test case for resourceID once supported. } func TestUpdateIAMPolicy(t *testing.T) { From dfe9390f279e6fcb04e91a4cbadb571b45980299 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:08:32 -0400 Subject: [PATCH 06/18] spelling: transform Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- operator/pkg/controllers/imagetransform.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/pkg/controllers/imagetransform.go b/operator/pkg/controllers/imagetransform.go index 10478432d1..9e11afa129 100644 --- a/operator/pkg/controllers/imagetransform.go +++ b/operator/pkg/controllers/imagetransform.go @@ -23,7 +23,7 @@ import ( "sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/declarative/pkg/manifest" ) -// ImageTranform remaps container images in a manifest. +// ImageTransform remaps container images in a manifest. type ImageTransform struct { // ImagePrefix changes the image registry to a different registry, keeping the name. // We strip off all but the last component of the image name, and then add the prefix. From 04a8bc5e0c42ce5ae56bd907966e299cdb7d02b3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:09:05 -0400 Subject: [PATCH 07/18] spelling: transformation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- operator/pkg/controllers/imagetransform.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/pkg/controllers/imagetransform.go b/operator/pkg/controllers/imagetransform.go index 9e11afa129..4e72573023 100644 --- a/operator/pkg/controllers/imagetransform.go +++ b/operator/pkg/controllers/imagetransform.go @@ -45,7 +45,7 @@ func NewImageTransform(imagePrefix string) *ImageTransform { } // Remap images to the specified mirror / alternative location. -// This function can be used as an object transfomration. +// This function can be used as an object transformation. func (x *ImageTransform) RemapImages(ctx context.Context, o declarative.DeclarativeObject, manifest *manifest.Objects) error { for _, obj := range manifest.Items { if err := x.remapImages(obj); err != nil { From d8acadf283bebf4ab992601fc5972d15b663f96a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:08:48 -0400 Subject: [PATCH 08/18] spelling: transmission Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/cli/stream/yamlstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cli/stream/yamlstream.go b/pkg/cli/stream/yamlstream.go index b30b010910..33894d28be 100644 --- a/pkg/cli/stream/yamlstream.go +++ b/pkg/cli/stream/yamlstream.go @@ -41,7 +41,7 @@ type YAMLStream struct { nextErr error // true if the consumer of the stream has read at least one non-error result returnedAtLeastOneNonErrorResult bool - // true if the end of the stream was reached and the tranmission terminator was returned + // true if the end of the stream was reached and the transmission terminator was returned returnedTransmissionTerminator bool } From 6c4b0109bcddab6340863d209486e2e0524b39d0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:32:59 -0400 Subject: [PATCH 09/18] spelling: troubleshooting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32d1ba9c2e..1c7dd6a029 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -232,8 +232,7 @@ by creating an Artifact Registry resource through Config Connector. #### Looking for error logs -You can look for error logs by checking the controller logs following the steps -[here](https://cloud.google.com/config-connector/docs/troubleshooting#check-controller-logs). +You can look for error logs by checking the controller logs following the [troubleshooting](https://cloud.google.com/config-connector/docs/troubleshooting#check-controller-logs). #### Pods fail to pull image When the cluster is created without providing a service account, a Compute Engine service account is created for the cluster. Users must grant the service account permission to pull images from the project registry. From a5c0d645afdfcf2a2ba2d5da6df6d12dadd2ae08 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:11:57 -0400 Subject: [PATCH 10/18] spelling: unexpected Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/cluster/installation_identifier_test.go | 2 +- pkg/lease/leasable/leasable_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/installation_identifier_test.go b/pkg/cluster/installation_identifier_test.go index 546f0e3e4c..74817d3456 100644 --- a/pkg/cluster/installation_identifier_test.go +++ b/pkg/cluster/installation_identifier_test.go @@ -98,7 +98,7 @@ func testDeleteNamespaceID(t *testing.T, mgr manager.Manager) { } if val, ok := configMap.Data[namespaceName]; ok { - t.Fatalf("error checking deleted namespace, upexpected value from configmap '%v': %v", namespaceName, val) + t.Fatalf("error checking deleted namespace, unexpected value from configmap '%v': %v", namespaceName, val) } } diff --git a/pkg/lease/leasable/leasable_test.go b/pkg/lease/leasable/leasable_test.go index a3b8d42c42..6881e5006b 100644 --- a/pkg/lease/leasable/leasable_test.go +++ b/pkg/lease/leasable/leasable_test.go @@ -122,7 +122,7 @@ func TestDCLSchemaSupportsLeasing(t *testing.T) { t.Parallel() res, err := DCLSchemaSupportsLeasing(tc.schema) if err != nil { - t.Fatalf("unexpcted error: %v", err) + t.Fatalf("unexpected error: %v", err) } if res != tc.expected { t.Fatalf("expect to get %v, but got %v", tc.expected, res) From 136409ff63fb3a9076d83d6a2fc01581f4226e3b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:53:21 -0400 Subject: [PATCH 11/18] spelling: uniquify Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- config/tests/samples/create/contents_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tests/samples/create/contents_test.go b/config/tests/samples/create/contents_test.go index d53208a454..4071f9df07 100644 --- a/config/tests/samples/create/contents_test.go +++ b/config/tests/samples/create/contents_test.go @@ -58,7 +58,7 @@ func validateResourceName(t *testing.T, sampleName string, u *unstructured.Unstr } } // In addition to this naming scheme following the sample guidelines, the - // create sample test looks for either "sample" or "dep" to "uniqify" the + // create sample test looks for either "sample" or "dep" to "uniquify" the // name of a sample t.Errorf("invalid metadata.name value '%v' in sample '%v': must contain one of {%v} to be valid", u.GetName(), sampleName, strings.Join(allowedNameFragments, ",")) From 75774b21b3ea961504b7d93c68c5f8ea15324612 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:53:28 -0400 Subject: [PATCH 12/18] spelling: unknown Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../compositions/composition/api/v1alpha1/composition_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/compositions/composition/api/v1alpha1/composition_types.go b/experiments/compositions/composition/api/v1alpha1/composition_types.go index ebef5bef8d..30b8f222e6 100644 --- a/experiments/compositions/composition/api/v1alpha1/composition_types.go +++ b/experiments/compositions/composition/api/v1alpha1/composition_types.go @@ -137,7 +137,7 @@ type CompositionSpec struct { type ValidationStatus string const ( - // ValidationStatusUnkown is when it is not validated + // ValidationStatusUnknown is when it is not validated ValidationStatusUnknown ValidationStatus = "unknown" // ValidationStatusSuccess is when valdiation succeeds ValidationStatusSuccess ValidationStatus = "success" From 9bc279b69ec44382a977bfa45fe340255299668b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 19:20:43 -0400 Subject: [PATCH 13/18] spelling: unmarshalling Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/krmtotf/conversion.go | 6 +++--- pkg/krmtotf/legacygcpmanagedfields.go | 2 +- .../servicemappingloader/servicemappingloader.go | 2 +- pkg/test/equals.go | 2 +- pkg/util/util.go | 2 +- scripts/resource-autogen/main.go | 4 ++-- .../servicemappingloader/servicemappingloader.go | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/krmtotf/conversion.go b/pkg/krmtotf/conversion.go index 91ec18113a..e10cf9fff7 100644 --- a/pkg/krmtotf/conversion.go +++ b/pkg/krmtotf/conversion.go @@ -68,7 +68,7 @@ func CtyValToMap(val cty.Value, t cty.Type) map[string]interface{} { } var ret map[string]interface{} if err := json.Unmarshal(b, &ret); err != nil { - panic(fmt.Errorf("error unmarshaling JSON as map[string]interface{}: %w", err)) + panic(fmt.Errorf("error unmarshalling JSON as map[string]interface{}: %w", err)) } return ret } @@ -80,7 +80,7 @@ func MapToCtyVal(m map[string]interface{}, t cty.Type) cty.Value { } ret, err := ctyjson.Unmarshal(b, t) if err != nil { - panic(fmt.Errorf("error unmarshaling JSON as cty.Value: %w", err)) + panic(fmt.Errorf("error unmarshalling JSON as cty.Value: %w", err)) } return ret } @@ -92,7 +92,7 @@ func MapToCtyValWithSchema(m map[string]interface{}, s map[string]*schema.Schema } ret, err := ctyjson.Unmarshal(b, schema.InternalMap(s).CoreConfigSchema().ImpliedType()) if err != nil { - panic(fmt.Errorf("error unmarshaling JSON as cty.Value: %w", err)) + panic(fmt.Errorf("error unmarshalling JSON as cty.Value: %w", err)) } return ret } diff --git a/pkg/krmtotf/legacygcpmanagedfields.go b/pkg/krmtotf/legacygcpmanagedfields.go index e20b9aacb6..c89b2f84b3 100644 --- a/pkg/krmtotf/legacygcpmanagedfields.go +++ b/pkg/krmtotf/legacygcpmanagedfields.go @@ -304,7 +304,7 @@ func getLastAppliedValue(r *Resource, path ...string) (val interface{}, found bo } lastAppliedConfig := make(map[string]interface{}) if err := json.Unmarshal([]byte(lastAppliedConfigRaw), &lastAppliedConfig); err != nil { - return nil, false, fmt.Errorf("error unmarshaling last applied configuration: %w", err) + return nil, false, fmt.Errorf("error unmarshalling last applied configuration: %w", err) } specPath := append([]string{"spec"}, path...) return unstructured.NestedFieldCopy(lastAppliedConfig, specPath...) diff --git a/pkg/servicemapping/servicemappingloader/servicemappingloader.go b/pkg/servicemapping/servicemappingloader/servicemappingloader.go index d627e89abf..7d21f031f1 100644 --- a/pkg/servicemapping/servicemappingloader/servicemappingloader.go +++ b/pkg/servicemapping/servicemappingloader/servicemappingloader.go @@ -251,7 +251,7 @@ func fileToServiceMapping(key string) (*v1alpha1.ServiceMapping, error) { func parseServiceMapping(b []byte) (*v1alpha1.ServiceMapping, error) { var sm v1alpha1.ServiceMapping if err := yaml.UnmarshalStrict(b, &sm); err != nil { - return nil, fmt.Errorf("error unmarshaling byte to service mapping: %w", err) + return nil, fmt.Errorf("error unmarshalling byte to service mapping: %w", err) } return &sm, nil } diff --git a/pkg/test/equals.go b/pkg/test/equals.go index cbe28b709d..6c4cde1da9 100644 --- a/pkg/test/equals.go +++ b/pkg/test/equals.go @@ -32,7 +32,7 @@ func normalize(t *testing.T, obj interface{}) map[string]interface{} { } var ret map[string]interface{} if err := json.Unmarshal(b, &ret); err != nil { - t.Fatalf("error unmarshaling JSON bytes: %v", err) + t.Fatalf("error unmarshalling JSON bytes: %v", err) } return ret } diff --git a/pkg/util/util.go b/pkg/util/util.go index 1e1fea0c11..4b8d903308 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -25,7 +25,7 @@ func Marshal(raw interface{}, processed interface{}) error { return fmt.Errorf("error marshaling as JSON: %w", err) } if err := json.Unmarshal(b, processed); err != nil { - return fmt.Errorf("error unmarshaling into processed object: %w", err) + return fmt.Errorf("error unmarshalling into processed object: %w", err) } return nil } diff --git a/scripts/resource-autogen/main.go b/scripts/resource-autogen/main.go index 66dc4ca4e7..c39bbaf945 100644 --- a/scripts/resource-autogen/main.go +++ b/scripts/resource-autogen/main.go @@ -243,7 +243,7 @@ func convertTFSamplesToKRMTestdata(tfToGVK map[string]schema.GroupVersionKind, s sampleName = strings.TrimSuffix(sampleName, "basic") + "autogen" if err := insertTestData(create, dependencies, autoGenType, sampleName, generatedSamples); err != nil { - errToReturn := fmt.Errorf("error unmarshaling json for TF sample %s: %w", sf, err) + errToReturn := fmt.Errorf("error unmarshalling json for TF sample %s: %w", sf, err) klog.Warningf("Failed sample conversion: %v", errToReturn) errs = multierror.Append(errs, errToReturn) continue @@ -281,7 +281,7 @@ func convertHCLBytesToJSON(raw []byte) (map[string]interface{}, error) { jsonStruct := make(map[string]interface{}) err = json.Unmarshal(convertedBytes, &jsonStruct) if err != nil { - return nil, fmt.Errorf("error unmarshaling json: %w", err) + return nil, fmt.Errorf("error unmarshalling json: %w", err) } return jsonStruct, nil diff --git a/scripts/resource-autogen/servicemapping/servicemappingloader/servicemappingloader.go b/scripts/resource-autogen/servicemapping/servicemappingloader/servicemappingloader.go index 16bc30ec6f..bd644cb4ba 100644 --- a/scripts/resource-autogen/servicemapping/servicemappingloader/servicemappingloader.go +++ b/scripts/resource-autogen/servicemapping/servicemappingloader/servicemappingloader.go @@ -134,7 +134,7 @@ func readerToServiceMapping(r io.Reader) (*v1alpha1.ServiceMapping, error) { } var sm v1alpha1.ServiceMapping if err := yaml.Unmarshal(bytes, &sm); err != nil { - return nil, fmt.Errorf("error unmarshaling byte to service mapping: %w", err) + return nil, fmt.Errorf("error unmarshalling byte to service mapping: %w", err) } return &sm, nil } From 8ec09fe7d22684cc8ee5fd66929f062226810d39 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:54:33 -0400 Subject: [PATCH 14/18] spelling: unset Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- config/tests/servicemapping/servicemapping_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tests/servicemapping/servicemapping_test.go b/config/tests/servicemapping/servicemapping_test.go index 8183439312..d7ba4c7348 100644 --- a/config/tests/servicemapping/servicemapping_test.go +++ b/config/tests/servicemapping/servicemapping_test.go @@ -1227,7 +1227,7 @@ func TestV1alpha1ToV1beta1IsSetForManuallyConfiguredAndAllowlistedResources(t *t if r.AutoGenerated && isV1alpha1ToV1beta1 { t.Errorf("resource config %v is auto-generated "+ "and allowlisted, but has `v1alpha1ToV1beta1: true`: "+ - "`v1alpha1ToV1beta1` should be usnet", r.Name) + "`v1alpha1ToV1beta1` should be unset", r.Name) continue } if !r.AutoGenerated { From 6919f7f951cc66a7bb7ae0084edac2c5ffe59923 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:53:57 -0400 Subject: [PATCH 15/18] spelling: unstruct Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/controller/iam/iamclient/externalonly.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/iam/iamclient/externalonly.go b/pkg/controller/iam/iamclient/externalonly.go index d86c85dc82..71aee29920 100644 --- a/pkg/controller/iam/iamclient/externalonly.go +++ b/pkg/controller/iam/iamclient/externalonly.go @@ -28,7 +28,7 @@ import ( // ExternalOnlyType is a KCC resource type that KCC does not support as a // core resource, but does support referencing externally in IAM. type ExternalOnlyType struct { - // UnstuctHandler is a function that fills in the external field information + // UnstructHandler is a function that fills in the external field information // from the given reference into the given unstructured object. UnstructHandler func(ref iamv1beta1.ResourceReference, u *unstructured.Unstructured) *unstructured.Unstructured From 36f737bb4f0d312be16999ab794d6af225b41a17 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:53:49 -0400 Subject: [PATCH 16/18] spelling: unstructured Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/controller/dcl/controller.go | 2 +- .../immutable_fields_validator_test.go | 40 +++++++++---------- tests/e2e/normalize.go | 4 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pkg/controller/dcl/controller.go b/pkg/controller/dcl/controller.go index 682e23bdab..22903e206f 100644 --- a/pkg/controller/dcl/controller.go +++ b/pkg/controller/dcl/controller.go @@ -692,7 +692,7 @@ func (r *Reconciler) isOrphaned(_ context.Context, resource *dcl.Resource) (orph } // getStateHint returns a state hint based on the given resource live state. A -// state hint is a DCL unstructurd object that represents the live state of the +// state hint is a DCL unstructured object that represents the live state of the // resource. // // This function returns the given live state (if it's not nil) as a DCL diff --git a/pkg/webhook/immutable_fields_validator_test.go b/pkg/webhook/immutable_fields_validator_test.go index f415c434f0..8f288ab023 100644 --- a/pkg/webhook/immutable_fields_validator_test.go +++ b/pkg/webhook/immutable_fields_validator_test.go @@ -2179,25 +2179,25 @@ func TestUpdateIAMPolicy(t *testing.T) { }, }, } - oldPolicyUnstructred := newUnstructuredFromObject(t, &policy) + oldPolicyUnstructured := newUnstructuredFromObject(t, &policy) newPolicyUnstructured := newUnstructuredFromObject(t, &policy) - assertHandleIAMPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, true) + assertHandleIAMPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, true) copyPolicy := policy copyPolicy.Spec.ResourceReference.Kind = "new-resource-reference-kind" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) copyPolicy = policy copyPolicy.Spec.ResourceReference.Namespace = "new-resource-reference-namespace" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) copyPolicy = policy copyPolicy.Spec.ResourceReference.Name = "new-resource-reference-name" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) copyPolicy = policy copyPolicy.Spec.ResourceReference.APIVersion = "new-resource-reference-apiversion" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) } func assertHandleIAMPolicy(t *testing.T, old *unstructured.Unstructured, new *unstructured.Unstructured, expectedAllowedValue bool) { @@ -2225,25 +2225,25 @@ func TestUpdateIAMPartialPolicy(t *testing.T) { }, }, } - oldPolicyUnstructred := newUnstructuredFromObject(t, &policy) + oldPolicyUnstructured := newUnstructuredFromObject(t, &policy) newPolicyUnstructured := newUnstructuredFromObject(t, &policy) - assertHandleIAMPartialPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, true) + assertHandleIAMPartialPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, true) copyPolicy := policy copyPolicy.Spec.ResourceReference.Kind = "new-resource-reference-kind" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPartialPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPartialPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) copyPolicy = policy copyPolicy.Spec.ResourceReference.Namespace = "new-resource-reference-namespace" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPartialPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPartialPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) copyPolicy = policy copyPolicy.Spec.ResourceReference.Name = "new-resource-reference-name" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPartialPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPartialPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) copyPolicy = policy copyPolicy.Spec.ResourceReference.APIVersion = "new-resource-reference-apiversion" newPolicyUnstructured = newUnstructuredFromObject(t, ©Policy) - assertHandleIAMPartialPolicy(t, oldPolicyUnstructred, newPolicyUnstructured, false) + assertHandleIAMPartialPolicy(t, oldPolicyUnstructured, newPolicyUnstructured, false) } func assertHandleIAMPartialPolicy(t *testing.T, old *unstructured.Unstructured, new *unstructured.Unstructured, expectedAllowedValue bool) { @@ -2273,33 +2273,33 @@ func TestUpdateIAMPolicyMember(t *testing.T) { }, }, } - oldPolicyMemberUnstructred := newUnstructuredFromObject(t, &policyMember) + oldPolicyMemberUnstructured := newUnstructuredFromObject(t, &policyMember) newPolicyMemberUnstructured := newUnstructuredFromObject(t, &policyMember) - assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructred, newPolicyMemberUnstructured, true) + assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructured, newPolicyMemberUnstructured, true) copyPolicyMember := policyMember copyPolicyMember.Spec.Member = "new-member" newPolicyMemberUnstructured = newUnstructuredFromObject(t, ©PolicyMember) - assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructred, newPolicyMemberUnstructured, false) + assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructured, newPolicyMemberUnstructured, false) copyPolicyMember = policyMember copyPolicyMember.Spec.Role = "new-role" newPolicyMemberUnstructured = newUnstructuredFromObject(t, ©PolicyMember) - assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructred, newPolicyMemberUnstructured, false) + assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructured, newPolicyMemberUnstructured, false) copyPolicyMember = policyMember copyPolicyMember.Spec.ResourceReference.Kind = "new-resource-reference-kind" newPolicyMemberUnstructured = newUnstructuredFromObject(t, ©PolicyMember) - assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructred, newPolicyMemberUnstructured, false) + assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructured, newPolicyMemberUnstructured, false) copyPolicyMember = policyMember copyPolicyMember.Spec.ResourceReference.Namespace = "new-resource-reference-namespace" newPolicyMemberUnstructured = newUnstructuredFromObject(t, ©PolicyMember) - assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructred, newPolicyMemberUnstructured, false) + assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructured, newPolicyMemberUnstructured, false) copyPolicyMember = policyMember copyPolicyMember.Spec.ResourceReference.Name = "new-resource-reference-name" newPolicyMemberUnstructured = newUnstructuredFromObject(t, ©PolicyMember) - assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructred, newPolicyMemberUnstructured, false) + assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructured, newPolicyMemberUnstructured, false) copyPolicyMember = policyMember copyPolicyMember.Spec.ResourceReference.APIVersion = "new-resource-reference-apiversion" newPolicyMemberUnstructured = newUnstructuredFromObject(t, ©PolicyMember) - assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructred, newPolicyMemberUnstructured, false) + assertHandleIAMPolicyMember(t, oldPolicyMemberUnstructured, newPolicyMemberUnstructured, false) } func assertHandleIAMPolicyMember(t *testing.T, old *unstructured.Unstructured, new *unstructured.Unstructured, expectedAllowedValue bool) { diff --git a/tests/e2e/normalize.go b/tests/e2e/normalize.go index 83883b139d..22c5dfe471 100644 --- a/tests/e2e/normalize.go +++ b/tests/e2e/normalize.go @@ -333,7 +333,7 @@ func normalizeKRMObject(t *testing.T, u *unstructured.Unstructured, project test }) - return visitor.VisitUnstructued(u) + return visitor.VisitUnstructured(u) } func setStringAtPath(m map[string]any, atPath string, newValue string) error { @@ -502,7 +502,7 @@ func (o *objectWalker) visitString(v string, path string) (string, error) { return v, nil } -func (o *objectWalker) VisitUnstructued(v *unstructured.Unstructured) error { +func (o *objectWalker) VisitUnstructured(v *unstructured.Unstructured) error { if err := o.visitMap(v.Object, ""); err != nil { return err } From 92d726eea88a3f6a43987fb90922e7a2bb787e48 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:49:15 -0400 Subject: [PATCH 17/18] spelling: update Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- ..._generated_object_windowbasedmetricsumfilter.golden.yaml | 2 +- .../windowbasedmetricsumfilter/_http.log | 6 +++--- .../windowbasedmetricsumfilter/update.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_generated_object_windowbasedmetricsumfilter.golden.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_generated_object_windowbasedmetricsumfilter.golden.yaml index 16d8b7c166..d8c945ec72 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_generated_object_windowbasedmetricsumfilter.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_generated_object_windowbasedmetricsumfilter.golden.yaml @@ -15,7 +15,7 @@ metadata: name: monitoringservicelevelobjective-${uniqueId} namespace: ${uniqueId} spec: - displayName: updae request - a window based metric sum filter + displayName: update request - a window based metric sum filter goal: 0.8 projectRef: external: projects/${projectId} diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_http.log b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_http.log index 7bbafa0252..46f4952cab 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/_http.log @@ -223,7 +223,7 @@ Content-Type: application/json User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 { - "displayName": "updae request - a window based metric sum filter", + "displayName": "update request - a window based metric sum filter", "goal": 0.8, "rollingPeriod": "172800s", "serviceLevelIndicator": { @@ -258,7 +258,7 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "displayName": "updae request - a window based metric sum filter", + "displayName": "update request - a window based metric sum filter", "goal": 0.8, "name": "projects/${projectNumber}/services/monitoringservice-${uniqueId}/serviceLevelObjectives/monitoringservicelevelobjective-${uniqueId}", "rollingPeriod": "172800s", @@ -300,7 +300,7 @@ X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 { - "displayName": "updae request - a window based metric sum filter", + "displayName": "update request - a window based metric sum filter", "goal": 0.8, "name": "projects/${projectNumber}/services/monitoringservice-${uniqueId}/serviceLevelObjectives/monitoringservicelevelobjective-${uniqueId}", "rollingPeriod": "172800s", diff --git a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/update.yaml b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/update.yaml index 208d837a76..a46222861f 100644 --- a/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/monitoring/v1beta1/monitoringservicelevelobjective/windowbasedmetricsumfilter/update.yaml @@ -24,7 +24,7 @@ spec: external: projects/${projectId} serviceRef: external: monitoringservice-${uniqueId} - displayName: "updae request - a window based metric sum filter" + displayName: "update request - a window based metric sum filter" goal: 0.8 rollingPeriod: "172800s" serviceLevelIndicator: From 7cfe95ca34fde1eb5780e9ffc39225ea4613c2bc Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:54:57 -0400 Subject: [PATCH 18/18] spelling: validation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../composition/api/v1alpha1/composition_types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experiments/compositions/composition/api/v1alpha1/composition_types.go b/experiments/compositions/composition/api/v1alpha1/composition_types.go index 30b8f222e6..1b1d583b57 100644 --- a/experiments/compositions/composition/api/v1alpha1/composition_types.go +++ b/experiments/compositions/composition/api/v1alpha1/composition_types.go @@ -139,9 +139,9 @@ type ValidationStatus string const ( // ValidationStatusUnknown is when it is not validated ValidationStatusUnknown ValidationStatus = "unknown" - // ValidationStatusSuccess is when valdiation succeeds + // ValidationStatusSuccess is when validation succeeds ValidationStatusSuccess ValidationStatus = "success" - // ValidationStatusFailed is when valdiation fails + // ValidationStatusFailed is when validation fails ValidationStatusFailed ValidationStatus = "failed" // ValidationStatusError is when validation was not called ValidationStatusError ValidationStatus = "error"