Skip to content
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

Refactor #2, Dig #257

Merged
merged 1 commit into from Jan 17, 2021
Merged

Refactor #2, Dig #257

merged 1 commit into from Jan 17, 2021

Conversation

kuritka
Copy link
Collaborator

@kuritka kuritka commented Jan 15, 2021

related to #255

  • Dig implementation moved from controller to utils
  • Tests for Dig require internet connection. Skipping tests If no internet connection available.
  • Remove log.Info() from dig, instead return extended error
  • call log.Info() in caller functions

@@ -52,7 +53,7 @@ func (r *GslbReconciler) getGslbIngressIPs(gslb *k8gbv1beta1.Gslb) ([]string, er
gslbIngressIPs = append(gslbIngressIPs, ip.IP)
}
if len(ip.Hostname) > 0 {
IPs, err := Dig(r.Config.EdgeDNSServer, ip.Hostname)
IPs, err := utils.Dig(r.Config.EdgeDNSServer, ip.Hostname)
if err != nil {
return nil, err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as log.Info() was removed from Dig - we need to explicitly log it here, otherwise the failure of resolution will be hidden from the end user

Copy link
Collaborator Author

@kuritka kuritka Jan 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytsarev thx for finding 👍 . Will log in caller function(s) as controllers package holds dependency to log (viz 1, 2).

 - Tests for Dig require internet connection. If no internet connection available, tests are skipped automatically
 - Remove log.Info() from dig, instead return extended error
@kuritka kuritka merged commit ef1e5bf into master Jan 17, 2021
@kuritka kuritka deleted the refactor-dig branch January 20, 2021 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants