Skip to content

Commit

Permalink
Merge pull request #4709 from giantswarm/gc-full-arn
Browse files Browse the repository at this point in the history
✨ Log full ARN in GC error messages
  • Loading branch information
k8s-ci-robot authored Jan 8, 2024
2 parents a6fe8ce + 9263537 commit 545b88d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/cloud/services/gc/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (s *Service) deleteSecurityGroups(ctx context.Context, resources []*AWSReso

groupID := strings.ReplaceAll(resource.ARN.Resource, "security-group/", "")
if err := s.deleteSecurityGroup(ctx, groupID); err != nil {
return fmt.Errorf("deleting security group %s: %w", groupID, err)
return fmt.Errorf("deleting security group %q with ID %s: %w", resource.ARN, groupID, err)
}
}
s.scope.Debug("Finished processing resources for security group deletion")
Expand Down
3 changes: 1 addition & 2 deletions pkg/cloud/services/gc/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ func (s *Service) deleteTargetGroups(ctx context.Context, resources []*AWSResour
continue
}

name := strings.ReplaceAll(resource.ARN.Resource, "targetgroup/", "")
if err := s.deleteTargetGroup(ctx, resource.ARN.String()); err != nil {
return fmt.Errorf("deleting target group %s: %w", name, err)
return fmt.Errorf("deleting target group %q: %w", resource.ARN, err)
}
}
s.scope.Debug("Finished processing resources for target group deletion")
Expand Down

0 comments on commit 545b88d

Please sign in to comment.