Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORE] Spelling 6/n #3214

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ spec:
projectRef:
# Replace "${PROJECT_ID?}" with your project ID
external: "projects/${PROJECT_ID?}"
loction: "us-west2"
location: "us-west2"
regex:
pattern: ".*"
2 changes: 1 addition & 1 deletion dev/tasks/build-cli-bundle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ rm -rf "${BUILD}/lib"
cp "${REPO_ROOT}/dev/metadata/licenses-config-connector.txt" "${BUILD}/LICENSES.txt"


# build a binary for each CPU architecture on linux, osx, and windows
# build a binary for each CPU architecture on Linux, macOS, and Windows
# list of dist we support:
# linux_amd64/linux_arm64/darwin_amd64/darwin_arm64/windows_amd64
for GODIST in $(go tool dist list | grep "linux\|darwin\|windows" | grep "amd64\|arm64" | grep -v "windows/arm64"); do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (u *TypeUpdater) generate() error {

for _, msg := range u.dependentMessages {
var buf bytes.Buffer
klog.Infof("generate Go code for messge %s", msg.FullName())
klog.Infof("generate Go code for message %s", msg.FullName())
codegen.WriteMessage(&buf, msg)
u.generatedGoStructs = append(u.generatedGoStructs,
generatedGoStruct{
Expand Down
2 changes: 1 addition & 1 deletion docs/releasenotes/release-1.120.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

* `CloudBuildWorkerPool`
* `CloudIDSEndpoint`
* `ComputeMangedSSLCertificate`
* `ComputeManagedSSLCertificate`

## New Fields:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (c *ccCluster) ClusterUp() error {
return fmt.Errorf("Error Waiting for Deloyments. err: %v", err)
}

// HACK - Ties this lib to Composition. Shall figure out callback lateron.
// HACK - Ties this lib to Composition. Shall figure out callback later on.
// May be parameterize manifests with context
contextObj := utils.GetContextObj(c.Context())
err = c.Client.Create(context.Background(), contextObj)
Expand Down
30 changes: 15 additions & 15 deletions experiments/compositions/expanders/cel-expander/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ metadata:
namespace: config-control
spec:
`
emptyCELRenderedManifets = ""
emptyCELRenderedManifests = ""

// Simple chart with a static template file (no templating)
staticSimpleChart = `apiVersion: composition.google.com/v1alpha1
Expand All @@ -61,7 +61,7 @@ spec:
foo: "3"
bar: "interface"
`
staticSimpleChartRenderedManifets = `
staticSimpleChartRenderedManifests = `
---
apiVersion: v1
data:
Expand Down Expand Up @@ -89,7 +89,7 @@ spec:
foo: ${sqls.spec.foo}
car: ${sqls.spec.car}
`
simpleCELConfigRenderedManifets = `
simpleCELConfigRenderedManifests = `
---
apiVersion: v1
data:
Expand Down Expand Up @@ -247,8 +247,8 @@ func TestEvaluateNoResourcesConfig(t *testing.T) {
if r.GetStatus() != pb.Status_SUCCESS {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
if string(r.Manifests) != emptyCELRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", emptyCELRenderedManifets, r.Manifests)
if string(r.Manifests) != emptyCELRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", emptyCELRenderedManifests, r.Manifests)
}
}

Expand All @@ -270,8 +270,8 @@ func TestEvaluateEmptyContext(t *testing.T) {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
t.Logf("status returned: %s, %s", r.GetStatus(), r.GetError())
if string(r.Manifests) != emptyCELRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", emptyCELRenderedManifets, r.Manifests)
if string(r.Manifests) != emptyCELRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", emptyCELRenderedManifests, r.Manifests)
}
}

Expand Down Expand Up @@ -313,8 +313,8 @@ func TestEvaluateEmptyValue(t *testing.T) {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
t.Logf("status returned: %s, %s", r.GetStatus(), r.GetError())
if string(r.Manifests) != emptyCELRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", emptyCELRenderedManifets, r.Manifests)
if string(r.Manifests) != emptyCELRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", emptyCELRenderedManifests, r.Manifests)
}
}

Expand All @@ -335,8 +335,8 @@ func TestEvaluateStaticConfig(t *testing.T) {
if r.GetStatus() != pb.Status_SUCCESS {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
if string(r.Manifests) != staticSimpleChartRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", staticSimpleChartRenderedManifets, r.Manifests)
if string(r.Manifests) != staticSimpleChartRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", staticSimpleChartRenderedManifests, r.Manifests)
}
}

Expand All @@ -357,8 +357,8 @@ func TestEvaluateUsingFacade(t *testing.T) {
if r.GetStatus() != pb.Status_SUCCESS {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
if string(r.Manifests) != simpleCELConfigRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", simpleCELConfigRenderedManifets, r.Manifests)
if string(r.Manifests) != simpleCELConfigRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", simpleCELConfigRenderedManifests, r.Manifests)
}
}

Expand Down Expand Up @@ -410,8 +410,8 @@ func TestEvaluateTemplateUsesValues(t *testing.T) {
t.Fatalf("want SUCCESS , got: %s", r.GetStatus())
}

if string(r.Manifests) != simpleCELConfigRenderedManifets {
t.Fatalf("\nexpected: %s\ngot: %s", simpleCELConfigRenderedManifets, r.Manifests)
if string(r.Manifests) != simpleCELConfigRenderedManifests {
t.Fatalf("\nexpected: %s\ngot: %s", simpleCELConfigRenderedManifests, r.Manifests)
}
}

Expand Down
36 changes: 18 additions & 18 deletions experiments/compositions/expanders/helm-expander/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
description: sample chart
version: 0.1.0
`
emptyChartRenderedManifets = "\n"
emptyChartRenderedManifests = "\n"

// Simple chart with a static template file (no templating)
staticSimpleChart = `apiVersion: composition.google.com/v1alpha1
Expand All @@ -71,7 +71,7 @@ spec:
foo: "3"
bar: "interface"
`
staticSimpleChartRenderedManifets = `---
staticSimpleChartRenderedManifests = `---
# Source: hello-world/templates/configmap.yaml
apiVersion: v1
data:
Expand Down Expand Up @@ -104,7 +104,7 @@ spec:
foo: "{{ .Values.sqls.spec.foo }}"
car: "{{ .Values.sqls.spec.car }}"
`
simpleChartRenderedManifets = `---
simpleChartRenderedManifests = `---
# Source: hello-world/templates/configmap.yaml
apiVersion: v1
data:
Expand Down Expand Up @@ -138,7 +138,7 @@ spec:
car: "{{ .Values.sqls.spec.car }}"
{{ if eq .Values.sqls.spec.car "sedan" }}trunk: "true"{{ end }}
`
simpleTemplateChartRenderedManifets = `---
simpleTemplateChartRenderedManifests = `---
# Source: hello-world/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -334,8 +334,8 @@ func TestEvaluateNoTemplateConfig(t *testing.T) {
if r.GetStatus() != pb.Status_SUCCESS {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
if string(r.Manifests) != emptyChartRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", emptyChartRenderedManifets, r.Manifests)
if string(r.Manifests) != emptyChartRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", emptyChartRenderedManifests, r.Manifests)
}
}

Expand All @@ -357,8 +357,8 @@ func TestEvaluateEmptyContext(t *testing.T) {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
t.Logf("status returned: %s, %s", r.GetStatus(), r.GetError())
if string(r.Manifests) != emptyChartRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", emptyChartRenderedManifets, r.Manifests)
if string(r.Manifests) != emptyChartRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", emptyChartRenderedManifests, r.Manifests)
}
}

Expand Down Expand Up @@ -400,8 +400,8 @@ func TestEvaluateEmptyValue(t *testing.T) {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
t.Logf("status returned: %s, %s", r.GetStatus(), r.GetError())
if string(r.Manifests) != emptyChartRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", emptyChartRenderedManifets, r.Manifests)
if string(r.Manifests) != emptyChartRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", emptyChartRenderedManifests, r.Manifests)
}
}

Expand All @@ -422,8 +422,8 @@ func TestEvaluateStaticConfig(t *testing.T) {
if r.GetStatus() != pb.Status_SUCCESS {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
if string(r.Manifests) != staticSimpleChartRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", staticSimpleChartRenderedManifets, r.Manifests)
if string(r.Manifests) != staticSimpleChartRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", staticSimpleChartRenderedManifests, r.Manifests)
}
}

Expand All @@ -444,8 +444,8 @@ func TestEvaluateUsingFacade(t *testing.T) {
if r.GetStatus() != pb.Status_SUCCESS {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
if string(r.Manifests) != simpleChartRenderedManifets {
t.Fatalf("\nexpected: %s\n got: %s", simpleChartRenderedManifets, r.Manifests)
if string(r.Manifests) != simpleChartRenderedManifests {
t.Fatalf("\nexpected: %s\n got: %s", simpleChartRenderedManifests, r.Manifests)
}
}

Expand All @@ -466,8 +466,8 @@ func TestEvaluateTemplateUsingFacade(t *testing.T) {
if r.GetStatus() != pb.Status_SUCCESS {
t.Fatalf("want SUCCESS, got: %s", r.GetStatus())
}
if string(r.Manifests) != simpleTemplateChartRenderedManifets {
t.Fatalf("\nexpected: %s\ngot: %s", simpleTemplateChartRenderedManifets, r.Manifests)
if string(r.Manifests) != simpleTemplateChartRenderedManifests {
t.Fatalf("\nexpected: %s\ngot: %s", simpleTemplateChartRenderedManifests, r.Manifests)
}
}

Expand Down Expand Up @@ -532,8 +532,8 @@ func TestEvaluateTemplateUsesValues(t *testing.T) {
t.Fatalf("want SUCCESS , got: %s", r.GetStatus())
}

if string(r.Manifests) != simpleTemplateChartRenderedManifets {
t.Fatalf("\nexpected: %s\ngot: %s", simpleTemplateChartRenderedManifets, r.Manifests)
if string(r.Manifests) != simpleTemplateChartRenderedManifests {
t.Fatalf("\nexpected: %s\ngot: %s", simpleTemplateChartRenderedManifests, r.Manifests)
}
}

Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockgkehub/gkehubfeature.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (s *GKEHubFeature) CreateFeature(ctx context.Context, req *pb.CreateFeature
acmSpec := spec.GetConfigmanagement()
if acmSpec != nil {
if acmSpec.GetConfigSync() == nil && acmSpec.GetHierarchyController() == nil && acmSpec.GetPolicyController() == nil {
return nil, fmt.Errorf("none of configsync or hierarchycontroller or policycontroller is specified under configmanagement for memebership %s", id)
return nil, fmt.Errorf("none of configsync or hierarchycontroller or policycontroller is specified under configmanagement for membership %s", id)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/manifest/manifest_loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestManifestLoader_ResolveManifest(t *testing.T) {
t.Parallel()
manifestStr, err := ml.ResolveManifest(context.TODO(), tc.cc)
if err != nil {
t.Fatalf("unexpected error while loadding the manifest for namespaced components: %v", err)
t.Fatalf("unexpected error while loading the manifest for namespaced components: %v", err)
}
if !reflect.DeepEqual(manifestStr, tc.result) {
t.Fatalf("unexpected diff: %v", cmp.Diff(manifestStr, tc.result))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestManifestLoader_ResolveNamespacedComponents(t *testing.T) {
ctx := context.TODO()
m, err := ml.ResolveManifest(ctx, tc.ccc)
if err != nil {
t.Fatalf("unexpected error while loadding the manifest for namespaced components: %v", err)
t.Fatalf("unexpected error while loading the manifest for namespaced components: %v", err)
}

if !reflect.DeepEqual(m, tc.result) {
Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/manifest/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (r *LocalRepository) LoadManifest(_ context.Context, componentName string,
return map[string]string{path: sb.String()}, nil
}

// otherwise we are in namesapce mode
// otherwise we are in namespace mode
rlog.Info("loading manifest", "component", componentName, "version", version, "mode", mode)
p = filepath.Join(r.basedir, "packages", componentName, version, "namespaced", cnrmSystemFileName)
b, err = os.ReadFile(p)
Expand Down
4 changes: 2 additions & 2 deletions operator/pkg/manifest/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ func TestNewLocalRepository_LoadManifest(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
manifestStrs, err := repo.LoadManifest(context.TODO(), "configconnector", "0.0.0-test", tc.cc)
if err != nil {
t.Fatalf("unexpected error while loadding the manifest: %v", err)
t.Fatalf("unexpected error while loading the manifest: %v", err)
}
if !reflect.DeepEqual(manifestStrs, tc.result) {
t.Fatalf("unexpected diff: %v", cmp.Diff(manifestStrs, tc.result))
Expand Down Expand Up @@ -507,7 +507,7 @@ func TestNewLocalRepository_LoadNamespacedComponents(t *testing.T) {
t.Parallel()
manifests, err := repo.LoadNamespacedComponents(context.TODO(), "configconnector", "0.0.0-test")
if err != nil {
t.Fatalf("unexpected error while loadding the manifest for namespaced components: %v", err)
t.Fatalf("unexpected error while loading the manifest for namespaced components: %v", err)
}
if !reflect.DeepEqual(manifests, tc.result) {
t.Fatalf("unexpected diff: %v", cmp.Diff(manifests, tc.result))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (a *Adapter) Update(ctx context.Context, updateOp *directbase.UpdateOperati
mapCtx := &direct.MapContext{}

// TODO(kcc): Autogen "func immutable()" for each field
// TODO(kcc): autogen updateMastk.path for mutable gcp fields.
// TODO(kcc): autogen updateMask.path for mutable gcp fields.
updateMask := &fieldmaskpb.FieldMask{}
if !reflect.DeepEqual(a.desired.Spec.DisplayName, a.actual.DisplayName) {
updateMask.Paths = append(updateMask.Paths, "display_name")
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/direct/cloudbuild/workerpool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (m *model) AdapterForObject(ctx context.Context, reader client.Reader, u *u
}

func (m *model) AdapterForURL(ctx context.Context, url string) (directbase.Adapter, error) {
// Format: //cloudbuild.googleapis.com/projects/<project>/lcoations/<location>/workerPools/<id>
// Format: //cloudbuild.googleapis.com/projects/<project>/locations/<location>/workerPools/<id>
if !strings.HasPrefix(url, "//cloudbuild.googleapis.com/") {
return nil, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/direct/logging/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func convertAPItoKRM_LoggingLogMetric(projectID string, in *api.LogMetric) (*uns

u := &unstructured.Unstructured{}
if err := util.Marshal(lm, u); err != nil {
return nil, fmt.Errorf("error marshing logMetric to unstructured %w", err)
return nil, fmt.Errorf("error marshalling logMetric to unstructured %w", err)
}

return u, nil
Expand Down
8 changes: 4 additions & 4 deletions pkg/controller/direct/mappings/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func NewMapping(cloudObj any, krmObj any, fields ...FieldMapping) *MappingBuilde
}

b = b.addKRMToCloudMapping(resourceKRMType, resourceCloudType, true, fields...)
b = b.addCloudToKRMMappin(resourceCloudType, resourceKRMType, true, fields...)
b = b.addCloudToKRMMapping(resourceCloudType, resourceKRMType, true, fields...)
return b

}
Expand All @@ -164,7 +164,7 @@ func (b *MappingBuilder) MapNested(cloudObj any, krmObj any, fields ...FieldMapp
resourceKRMType := typeOf(krmVal.Type())

b = b.addKRMToCloudMapping(resourceKRMType, resourceCloudType, false, fields...)
b = b.addCloudToKRMMappin(resourceCloudType, resourceKRMType, false, fields...)
b = b.addCloudToKRMMapping(resourceCloudType, resourceKRMType, false, fields...)
return b
}

Expand Down Expand Up @@ -210,8 +210,8 @@ func (b *MappingBuilder) addKRMToCloudMapping(inType *reflectType, outType *refl
return b
}

// addCloudToKRMMappin will add a mapping for mapping from Cloud to KRM objects.
func (b *MappingBuilder) addCloudToKRMMappin(inType *reflectType, outType *reflectType, hasSpecStatus bool, fields ...FieldMapping) *MappingBuilder {
// addCloudToKRMMapping will add a mapping for mapping from Cloud to KRM objects.
func (b *MappingBuilder) addCloudToKRMMapping(inType *reflectType, outType *reflectType, hasSpecStatus bool, fields ...FieldMapping) *MappingBuilder {
createMapping := &structTypeMapping{
scope: b.mapping,
inType: inType,
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/direct/sql/sqlinstance_equality.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func AclEntryListsMatch(desired []*api.AclEntry, actual []*api.AclEntry) bool {
if len(desired) != len(actual) {
return false
}
// We mustiterate over the AclEntry lists in sorted order,
// We must iterate over the AclEntry lists in sorted order,
// so that the comparison is deterministic.
sort.Sort(AclEntriesByName(desired))
sort.Sort(AclEntriesByName(actual))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func MeanReconcileReenqueuePeriod(gvk schema.GroupVersionKind,
if smLoader != nil {
rcs, err := smLoader.GetResourceConfigs(gvk)
if err == nil && len(rcs) > 0 {
// One GVK can map to mutiple ResourceConfigs, however these ResournceConfigs will share the same reconcile interval.
// One GVK can map to multiple ResourceConfigs, however these ResournceConfigs will share the same reconcile interval.
if rcs[0].ReconciliationIntervalInSeconds != nil {
return time.Duration(*rcs[0].ReconciliationIntervalInSeconds) * time.Second
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/unmanageddetector/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func getCurrentCondition(ctx context.Context, c client.Client, u *unstructured.U
}
resource, err := k8s.NewResource(unstruct)
if err != nil {
return v1alpha1.Condition{}, false, fmt.Errorf("error marhsalling unstruct to k8s resource: %w", err)
return v1alpha1.Condition{}, false, fmt.Errorf("error marshalling unstruct to k8s resource: %w", err)
}
condition, found = k8s.GetReadyCondition(resource)
return condition, found, nil
Expand Down
Loading
Loading