-
Notifications
You must be signed in to change notification settings - Fork 1.4k
pkg/destroy/aws: Fix zone id in debug output #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/destroy/aws: Fix zone id in debug output #988
Conversation
Before this commit, when the installer requested tags for the zone from the AWS API and the request was throttled, the installer printed a message with the string pointer value of the zone id: DEBUG sleeping before trying to resolve tags for zone %!s(*string=0xc420e7fdc8): Throttling: Rate exceeded After this commit, the installer prints the string value: DEBUG sleeping before trying to resolve tags for zone /hostedzone/Z2J66YWY5ZGE1: Throttling: Rate exceeded * pkg/destroy/aws/aws.go (r53ZonesToAWSObject): Dereference zone.Id when printing it.
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
9 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Miciah, pravisankar, wking The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
@@ -1206,7 +1206,7 @@ func r53ZonesToAWSObjects(zones []*route53.HostedZone, r53Client *route53.Route5 | |||
}) | |||
if err != nil { | |||
if request.IsErrorThrottle(err) { | |||
logger.Debugf("sleeping before trying to resolve tags for zone %s: %v", zone.Id, err) | |||
logger.Debugf("sleeping before trying to resolve tags for zone %s: %v", *zone.Id, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is zone.Id
guaranteed not to be nil?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. We already dereference it without checking on line 1225. We could use aws.StringValue(zone.Id)
though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
zone.Id
guaranteed not to be nil?
If zone.Id
is not nil
, we have a big problem and want to panic ;). It's going to be impossible to remove a zone if we don't know its ID.
/retest Please review the full test history for this PR and help us cut down flakes. |
Before this commit, when the installer requested tags for the zone from the AWS API and the request was throttled, the installer printed a message with the string pointer value of the zone id:
After this commit, the installer prints the string value:
pkg/destroy/aws/aws.go
(r53ZonesToAWSObject
): Dereferencezone.Id
when printing it.