diff --git a/provider/aws/session.go b/provider/aws/session.go index dac088983..822ab4aff 100644 --- a/provider/aws/session.go +++ b/provider/aws/session.go @@ -17,6 +17,7 @@ limitations under the License. package aws import ( + "fmt" "strings" "github.com/aws/aws-sdk-go/aws" @@ -24,7 +25,6 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/linki/instrumented_http" - "github.com/pkg/errors" "github.com/sirupsen/logrus" "sigs.k8s.io/external-dns/pkg/apis/externaldns" @@ -54,7 +54,7 @@ func NewSession(awsConfig AWSSessionConfig) (*session.Session, error) { SharedConfigState: session.SharedConfigEnable, }) if err != nil { - return nil, errors.Wrap(err, "failed to instantiate AWS session") + return nil, fmt.Errorf("instantiating AWS session: %w", err) } if awsConfig.AssumeRole != "" { diff --git a/registry/dynamodb.go b/registry/dynamodb.go index 3a5b3f70f..6507af650 100644 --- a/registry/dynamodb.go +++ b/registry/dynamodb.go @@ -201,7 +201,7 @@ func (im *DynamoDBRegistry) ApplyChanges(ctx context.Context, changes *plan.Chan key := fromDynamoKey(request.Parameters[0]) for i, endpoint := range filteredChanges.Create { if endpoint.Key() == key { - log.Warnf("Skipping endpoint %v because owner does not match", endpoint) + log.Infof("Skipping endpoint %v because owner does not match", endpoint) filteredChanges.Create = append(filteredChanges.Create[:i], filteredChanges.Create[i+1:]...) // The dynamodb insertion failed; remove from our cache. im.removeFromCache(endpoint) @@ -258,10 +258,6 @@ func (im *DynamoDBRegistry) AdjustEndpoints(endpoints []*endpoint.Endpoint) []*e return im.provider.AdjustEndpoints(endpoints) } -/** - DynamoDB registry-specific private methods. -*/ - func (im *DynamoDBRegistry) readLabels(ctx context.Context) error { table, err := im.dynamodbAPI.DescribeTableWithContext(ctx, &dynamodb.DescribeTableInput{ TableName: aws.String(im.table), @@ -428,7 +424,6 @@ func (im *DynamoDBRegistry) addToCache(ep *endpoint.Endpoint) { func (im *DynamoDBRegistry) removeFromCache(ep *endpoint.Endpoint) { if im.recordsCache == nil || ep == nil { - // return early. return } diff --git a/registry/txt.go b/registry/txt.go index e9411185b..3300b5ef1 100644 --- a/registry/txt.go +++ b/registry/txt.go @@ -294,10 +294,6 @@ func (im *TXTRegistry) AdjustEndpoints(endpoints []*endpoint.Endpoint) []*endpoi return im.provider.AdjustEndpoints(endpoints) } -/** - TXT registry specific private methods -*/ - /** nameMapper is the interface for mapping between the endpoint for the source and the endpoint for the TXT record. @@ -452,7 +448,6 @@ func (im *TXTRegistry) addToCache(ep *endpoint.Endpoint) { func (im *TXTRegistry) removeFromCache(ep *endpoint.Endpoint) { if im.recordsCache == nil || ep == nil { - // return early. return }