Skip to content

Commit

Permalink
chore: Remove redundant logs (#425)
Browse files Browse the repository at this point in the history
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty committed Jan 25, 2023
1 parent d17a4fd commit 4680869
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion pkg/client/client_apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func (a *AzClientsAPIs) GetContainerGroupInfo(ctx context.Context, resourceGroup
}

err = validation.ValidateContainerGroup(ctx, &response.ContainerGroup)
logger.Debugf("container group %s has missing fields. retrying the validation...", cgName)
if err != nil {
return nil, err
}
Expand Down
6 changes: 0 additions & 6 deletions pkg/provider/aci.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ func (p *ACIProvider) deleteContainerGroup(ctx context.Context, podNS, podName s
// GetPod returns a pod by name that is running inside ACI
// returns nil if a pod by that name is not found.
func (p *ACIProvider) GetPod(ctx context.Context, namespace, name string) (*v1.Pod, error) {
logger := log.G(ctx).WithField("method", "GetPod")
ctx, span := trace.StartSpan(ctx, "aci.GetPod")
defer span.End()
ctx = addAzureAttributes(ctx, span, p)
Expand All @@ -494,7 +493,6 @@ func (p *ACIProvider) GetPod(ctx context.Context, namespace, name string) (*v1.P
}

err = validation.ValidateContainerGroup(ctx, cg)
logger.Debugf("container group %s has missing fields. retrying the validation...", *cg.Name)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -637,7 +635,6 @@ func (p *ACIProvider) RunInContainer(ctx context.Context, namespace, name, conta
// GetPodStatus returns the status of a pod by name that is running inside ACI
// returns nil if a pod by that name is not found.
func (p *ACIProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error) {
logger := log.G(ctx).WithField("method", "GetPodStatus")
ctx, span := trace.StartSpan(ctx, "aci.GetPodStatus")
defer span.End()
ctx = addAzureAttributes(ctx, span, p)
Expand All @@ -648,7 +645,6 @@ func (p *ACIProvider) GetPodStatus(ctx context.Context, namespace, name string)
}

err = validation.ValidateContainerGroup(ctx, cg)
logger.Debugf("container group %s has missing fields. retrying the validation...", *(*cg).Name)
if err != nil {
return nil, err
}
Expand All @@ -658,7 +654,6 @@ func (p *ACIProvider) GetPodStatus(ctx context.Context, namespace, name string)

// GetPods returns a list of all pods known to be running within ACI.
func (p *ACIProvider) GetPods(ctx context.Context) ([]*v1.Pod, error) {
logger := log.G(ctx).WithField("method", "GetPods")
ctx, span := trace.StartSpan(ctx, "aci.GetPods")
defer span.End()
ctx = addAzureAttributes(ctx, span, p)
Expand All @@ -675,7 +670,6 @@ func (p *ACIProvider) GetPods(ctx context.Context) ([]*v1.Pod, error) {

for cgIndex := range cgs {
err = validation.ValidateContainerGroup(ctx, cgs[cgIndex])
logger.Debugf("container group %s has missing fields. retrying the validation...", *cgs[cgIndex].Name)
if err != nil {
return nil, err
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/provider/containergroup_to_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/virtual-kubelet/azure-aci/pkg/tests"
"github.com/virtual-kubelet/azure-aci/pkg/util"
"github.com/virtual-kubelet/azure-aci/pkg/validation"
"github.com/virtual-kubelet/virtual-kubelet/log"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand All @@ -38,8 +37,6 @@ func (p *ACIProvider) containerGroupToPod(ctx context.Context, cg *azaciv2.Conta
}

func (p *ACIProvider) getPodStatusFromContainerGroup(ctx context.Context, cg *azaciv2.ContainerGroup) (*v1.PodStatus, error) {
logger := log.G(ctx).WithField("method", "getPodStatusFromContainerGroup")

// cg is validated
allReady := true
var firstContainerStartTime, lastUpdateTime time.Time
Expand All @@ -49,7 +46,6 @@ func (p *ACIProvider) getPodStatusFromContainerGroup(ctx context.Context, cg *az

for i := range containersList {
err := validation.ValidateContainer(ctx, containersList[i])
logger.Debugf("container %s has missing fields. retrying the validation...", *containersList[i].Name)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 4680869

Please sign in to comment.