Skip to content

Commit

Permalink
Fix for CI failure (#1470)
Browse files Browse the repository at this point in the history
* Fix for CI failure

* Address go fmt issue in awsutils.go
  • Loading branch information
achevuru committed May 19, 2021
1 parent 4d1931b commit 7d21e22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pkg/awsutils/awsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func (cache *EC2InstanceMetadataCache) RefreshSGIDs(mac string) error {
for _, eni := range allENIs {
eniIDs = append(eniIDs, eni.ENIID)
}

newENIs := StringSet{}
newENIs.Set(eniIDs)

Expand All @@ -481,9 +481,9 @@ func (cache *EC2InstanceMetadataCache) RefreshSGIDs(mac string) error {
}
awsAPIErrInc("ModifyNetworkInterfaceAttribute", err)
//No need to return error here since retry will happen in 30seconds and also
//If update failed due to stale ENI then returning error will prevent updating SG
//for following ENIs since the list is sorted
log.Debugf("refreshSGIDs: unable to update the ENI %s SG - %v", eniID, err)
//If update failed due to stale ENI then returning error will prevent updating SG
//for following ENIs since the list is sorted
log.Debugf("refreshSGIDs: unable to update the ENI %s SG - %v", eniID, err)
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/eniconfig/eniconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package eniconfig

import (
"context"
"fmt"
"os"

"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -75,7 +74,7 @@ func MyENIConfig(ctx context.Context, k8sClient client.Client) (*v1alpha1.ENICon
var eniConfig v1alpha1.ENIConfig
err = k8sClient.Get(ctx, types.NamespacedName{Name: eniConfigName}, &eniConfig)
if err != nil {
fmt.Errorf("error while retrieving eniconfig: %s", err)
log.Errorf("error while retrieving eniconfig: %s", err)
return nil, ErrNoENIConfig
}

Expand Down Expand Up @@ -120,7 +119,7 @@ func GetNodeSpecificENIConfigName(ctx context.Context, k8sClient client.Client)
var node corev1.Node
err := k8sClient.Get(ctx, types.NamespacedName{Name: os.Getenv("MY_NODE_NAME")}, &node)
if err != nil {
fmt.Errorf("error retrieving node: %s", err)
log.Errorf("error retrieving node: %s", err)
return eniConfigName, err
}

Expand Down

0 comments on commit 7d21e22

Please sign in to comment.