From 389dd87972559629ca276eaade66a8a294c5b6c4 Mon Sep 17 00:00:00 2001 From: Rebecca Date: Fri, 18 Sep 2026 18:03:48 -0700 Subject: [PATCH] refactor(host): clean up comments and fix typos in dry-run validation blocks --- plugin/service/host/plugin.go | 8 ++++---- plugin/service/host/plugin_test.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugin/service/host/plugin.go b/plugin/service/host/plugin.go index bbf5aff..9caf819 100644 --- a/plugin/service/host/plugin.go +++ b/plugin/service/host/plugin.go @@ -191,7 +191,7 @@ func (p *HostPlugin) OnUpdateCatalog(ctx context.Context, req *pb.OnUpdateCatalo return nil, errors.BadRequestStatusf("error loading persisted state: %s", err) } - // New: perform dry run to ensure we can interact with AWS as expected. + // New: perform dry run to ensure we can interact with AWS as expected. opts := []ec2Option{} if newCatalogAttributes.DualStack { opts = append(opts, WithDualStack(newCatalogAttributes.DualStack)) @@ -241,7 +241,7 @@ func (p *HostPlugin) OnUpdateCatalog(ctx context.Context, req *pb.OnUpdateCatalo return nil, errors.BadRequestStatusf("error loading persisted state: %s", err) } - // perform dry run to ensure we can interact with AWS as expected. + // New: perform dry run to ensure we can interact with AWS as expected. opts := []ec2Option{} if newCatalogAttributes.DualStack { opts = append(opts, WithDualStack(newCatalogAttributes.DualStack)) @@ -395,7 +395,7 @@ func (p *HostPlugin) OnCreateSet(ctx context.Context, req *pb.OnCreateSetRequest return nil, err } - // perform dry run to ensure we can interact with AWS as expected. + // New: perform dry run to ensure we can interact with AWS as expected. opts := []ec2Option{} if catalogAttributes.DualStack { opts = append(opts, WithDualStack(catalogAttributes.DualStack)) @@ -461,7 +461,7 @@ func (p *HostPlugin) OnUpdateSet(ctx context.Context, req *pb.OnUpdateSetRequest return nil, err } - // perform dry run to ensure we can interact with AWS as expected. + // New: perform dry run to ensure we can interact with AWS as expected. opts := []ec2Option{} if catalogAttributes.DualStack { opts = append(opts, WithDualStack(catalogAttributes.DualStack)) diff --git a/plugin/service/host/plugin_test.go b/plugin/service/host/plugin_test.go index 9e7de7f..19a8299 100644 --- a/plugin/service/host/plugin_test.go +++ b/plugin/service/host/plugin_test.go @@ -742,7 +742,7 @@ func TestPluginOnCreateCatalogErr(t *testing.T) { testMockEC2WithDescribeInstancesError(errors.New(testDescribeInstancesError)), )), }, - // checkHosts returns the DescribeInstances error as-is rather than + // New: checkHosts returns the DescribeInstances error as-is rather than // wrapping it in a gRPC FailedPrecondition status like the old // dryRunValidation did. A plain Go error maps to codes.Unknown. expectedErrContains: testDescribeInstancesError, @@ -997,7 +997,7 @@ func TestPluginOnUpdateCatalogErr(t *testing.T) { testMockEC2WithDescribeInstancesError(errors.New(testDescribeInstancesError)), )), }, - // checkHosts returns the DesribeInstances errror as-is rather than wrapping it + // New: checkHosts returns the DesribeInstances errror as-is rather than wrapping it // in a gRpc FailedPrecodndition status like the old dryRunValidiation did. // A plain Go error maps to codeds.Unknown. expectedErrContains: testDescribeInstancesError, @@ -1042,7 +1042,7 @@ func TestPluginOnUpdateCatalogErr(t *testing.T) { testMockEC2WithDescribeInstancesError(errors.New(testDescribeInstancesError)), )), }, - // checkHosts returns the DescribeInstances error as-is rather than wrapping it + // New: checkHosts returns the DescribeInstances error as-is rather than wrapping it // in a gRPC FailedPrecondition status like the old dryRunValidiation did. // A plain Go error maps to codes.Unknown. expectedErrContains: testDescribeInstancesError, @@ -1220,7 +1220,7 @@ func TestPluginOnUpdateCatalogErr(t *testing.T) { testMockEC2WithDescribeInstancesError(fmt.Errorf("oops there was an error")), )), }, - // checkHosts returns the DescribeInstances error as-is rather than wrapping it + // New: checkHosts returns the DescribeInstances error as-is rather than wrapping it // in a gRPC FailedPrecondition status like the old dryRunValidiation did. // A plain Go error maps to codes.Unknown. expectedErrContains: "oops there was an error",