From 2a6c5eed2ecb2ffcaeef06c25838da39e386fa4f Mon Sep 17 00:00:00 2001 From: ensonic Date: Tue, 14 Jul 2026 15:34:00 +0000 Subject: [PATCH] Backfill authors in TODO comments. This is based on githistory who added the TODO:. I will go next user by user and try to implement/resolve them. --- src/bootstrap/cloud/terraform/registry.tf | 2 +- src/go/cmd/cr-syncer-auth-webhook/main.go | 4 ++-- src/go/pkg/controller/approllout/controller.go | 2 +- src/go/pkg/controller/chartassignment/release.go | 4 ++-- src/go/pkg/synk/synk.go | 14 +++++++------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bootstrap/cloud/terraform/registry.tf b/src/bootstrap/cloud/terraform/registry.tf index e723d6f3a..038aa57ab 100644 --- a/src/bootstrap/cloud/terraform/registry.tf +++ b/src/bootstrap/cloud/terraform/registry.tf @@ -6,7 +6,7 @@ locals { google_service_account.human-acl.member, var.onprem_federation ? [google_service_account.robot-service[0].member] : [], ]) - # TODO: use the regional repos depending on settings in the future + # TODO(ensonic): use the regional repos depending on settings in the future private_repo_access = flatten([ for sa in local.service_acounts : [ for prj in var.private_image_repositories : { diff --git a/src/go/cmd/cr-syncer-auth-webhook/main.go b/src/go/cmd/cr-syncer-auth-webhook/main.go index 92fad8ef4..3102c2cc0 100644 --- a/src/go/cmd/cr-syncer-auth-webhook/main.go +++ b/src/go/cmd/cr-syncer-auth-webhook/main.go @@ -101,7 +101,7 @@ func (h *handlers) verifyJWT(encodedJWT string) error { } func (h *handlers) resourceIsFiltered(groupKind string) bool { - // TODO: limit to CRDs with filter-by-robot-name label in case someone adds + // TODO(rodrigoq): limit to CRDs with filter-by-robot-name label in case someone adds // new unfiltered resources in future. return groupKind != "registry.cloudrobotics.com/robottypes" } @@ -126,7 +126,7 @@ func (h *handlers) validateRequest(r *http.Request, robotName string) error { return nil } - // TODO: check against label of upstream resource instead of assuming that + // TODO(rodrigoq): check against label of upstream resource instead of assuming that // robot xyz can access all syncable resources matching *xyz. if incomingReq.RobotName != robotName && !strings.HasSuffix(incomingReq.ResourceName, robotName) { slog.Error("robot impersonation rejected", diff --git a/src/go/pkg/controller/approllout/controller.go b/src/go/pkg/controller/approllout/controller.go index dca112bd9..a5380bcff 100644 --- a/src/go/pkg/controller/approllout/controller.go +++ b/src/go/pkg/controller/approllout/controller.go @@ -87,7 +87,7 @@ func Add(ctx context.Context, mgr manager.Manager, baseValues chartutil.Values) source.Kind(mgr.GetCache(), kclient.Object(&apps.ChartAssignment{}), // We manually enqueue for the owner reference since handler.EnqueueRequestForOwner // does not work. - // TODO: There is an associated bug in the controller-runtime but upgrading to include + // TODO(ensonic): There is an associated bug in the controller-runtime but upgrading to include // https://github.com/kubernetes-sigs/controller-runtime/pull/274 did not resolve the issue. &handler.Funcs{ DeleteFunc: func(ctx context.Context, evt event.DeleteEvent, q workQueue) { diff --git a/src/go/pkg/controller/chartassignment/release.go b/src/go/pkg/controller/chartassignment/release.go index 3482fad78..ae468846c 100644 --- a/src/go/pkg/controller/chartassignment/release.go +++ b/src/go/pkg/controller/chartassignment/release.go @@ -306,7 +306,7 @@ func loadAndExpandChart(as *apps.ChartAssignment) ([]*unstructured.Unstructured, if err != nil { return nil, false, fmt.Errorf("render chart: %w", err) } - // TODO: consider giving the synk package first-class support for raw manifests + // TODO(ensonic): consider giving the synk package first-class support for raw manifests // so that their decoding errors are fully surfaced in the ResourceSet. Otherwise, // common YAML errors will only be surfaced one-by-one, which is tedious to handle. res, err := decodeManifests(manifests) @@ -342,7 +342,7 @@ func loadChart(cspec *apps.AssignedChart) (*chart.Chart, string, error) { return nil, "", fmt.Errorf("load chart requirements: %w", err) } - // TODO: handle empty c.Values, cspec.Values + // TODO(ensonic): handle empty c.Values, cspec.Values // Build the full set of values including the default ones. Even though // they are part of the chart, they are ignored if we don't provide // them explicitly. diff --git a/src/go/pkg/synk/synk.go b/src/go/pkg/synk/synk.go index 4354fdd21..ce5d11edd 100644 --- a/src/go/pkg/synk/synk.go +++ b/src/go/pkg/synk/synk.go @@ -100,7 +100,7 @@ func NewForConfig(cfg *rest.Config) (*Synk, error) { return New(client, cachedDiscovery), nil } -// TODO: determine options that allow us to be semantically compatible with +// TODO(freinartz): determine options that allow us to be semantically compatible with // vanilla kubectl apply. type ApplyOptions struct { name string @@ -444,7 +444,7 @@ func (s *Synk) initialize( if err := s.populateNamespaces(ctx, opts.Namespace, crds, regulars...); err != nil { return nil, nil, fmt.Errorf("set default namespaces: %w", err) } - // TODO: consider putting this and other validation as a step after initialize + // TODO(freinartz): consider putting this and other validation as a step after initialize // so we can give validation errors in batch in the ResourceSet status. if opts.EnforceNamespace { for _, r := range regulars { @@ -684,7 +684,7 @@ func replace(ctx context.Context, client dynamic.ResourceInterface, resource *un func (s *Synk) applyOne(ctx context.Context, resource *unstructured.Unstructured, set *apps.ResourceSet) (apps.ResourceAction, error) { // If name is unset, we'd retrieve a list below and panic. - // TODO: This may be valid if generateName is set instead. In this case we + // TODO(freinartz): This may be valid if generateName is set instead. In this case we // want to create the resource in any case. if resource.GetName() == "" { return apps.ResourceActionNone, fmt.Errorf("missing resource name for %s", resource.GroupVersionKind().String()) @@ -773,13 +773,13 @@ func (s *Synk) applyOne(ctx context.Context, resource *unstructured.Unstructured ) obj, err := scheme.Scheme.New(mapping.GroupVersionKind) if err == nil { - // TODO: add option to dynamically load patch meta from discovery API + // TODO(ensonic): add option to dynamically load patch meta from discovery API // for full kubectl compatibility. patchMeta, err := strategicpatch.NewPatchMetaFromStruct(obj) if err != nil { return apps.ResourceActionNone, fmt.Errorf("lookup patch meta: %w", err) } - // TODO: Make overwrite boolean configurable for full kubectl compatibility. + // TODO(ensonic): Make overwrite boolean configurable for full kubectl compatibility. patch, err = strategicpatch.CreateThreeWayMergePatch( originalRaw, resourceRaw, currentRaw, patchMeta, true, @@ -1033,7 +1033,7 @@ func (s *Synk) deleteFailedResourceSets(ctx context.Context, name string, versio if !ok || n != name || v >= version { continue } - // TODO: should we possibly opt for foreground deletion here so + // TODO(freinartz): should we possibly opt for foreground deletion here so // we only return after all dependents have been deleted as well? // kubectl doesn't allow to opt into foreground deletion in general but // here it would likely bring us closer to the apply --prune semantics. @@ -1060,7 +1060,7 @@ func (s *Synk) deleteResourceSets(ctx context.Context, name string, version int3 if !ok || n != name || v >= version { continue } - // TODO: should we possibly opt for foreground deletion here so + // TODO(freinartz): should we possibly opt for foreground deletion here so // we only return after all dependents have been deleted as well? // kubectl doesn't allow to opt into foreground deletion in general but // here it would likely bring us closer to the apply --prune semantics.