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

CHORE: Fix lint warnings from golangci-lint #3311

Merged
merged 17 commits into from
Jan 13, 2025
Merged

Conversation

tlimoncelli
Copy link
Contributor

@tlimoncelli tlimoncelli commented Jan 5, 2025

Issue

golangci-lint reports many, many, many warnings

Resolution

Fix them all!

Please check my changes!

Please check your code and give feedback or mark it approved:

I'll be merging this on Jan 13, 2025. Please get your feedback in by then.

Notes

Here are (some of) the warnings:

pkg/zonerecs/zonerecords.go:33:13: Error return value of `dc.Punycode` is not checked (errcheck)
	dc.Punycode()
	           ^
providers/cloudflare/cloudflareProvider.go:559:37: Error return value of `cfsingleredirect.TranscodePRtoSR` is not checked (errcheck)
				cfsingleredirect.TranscodePRtoSR(rec)
				                                ^
providers/cloudflare/cloudflareProvider.go:574:37: Error return value of `cfsingleredirect.TranscodePRtoSR` is not checked (errcheck)
				cfsingleredirect.TranscodePRtoSR(rec)
				                                ^
providers/cloudflare/cloudflareProvider.go:620:16: Error return value of `rec.SetTarget` is not checked (errcheck)
		rec.SetTarget(newIP.String())
		             ^
providers/cloudflare/preprocess_test.go:25:14: Error return value of `rc.SetTarget` is not checked (errcheck)
	rc.SetTarget("1.2.3.4")
	            ^
providers/cloudflare/preprocess_test.go:112:16: Error return value of `rec.SetTarget` is not checked (errcheck)
		rec.SetTarget(tst.Given)
		             ^
providers/cloudflare/rest.go:495:14: Error return value of `r.SetTarget` is not checked (errcheck)
		r.SetTarget(fmt.Sprintf("%s,%s", // $PATTERN,$SCRIPT
		           ^
providers/hostingde/types.go:162:15: Error return value of `rc.SetTarget` is not checked (errcheck)
		rc.SetTarget(r.Content)
		            ^
pkg/prettyzone/prettyzone_test.go:33:17: Error return value is not checked (errcheck)
	writeZoneFileRR(buf2, parsed, "bosun.org")
	               ^
pkg/prettyzone/prettyzone_test.go:130:17: Error return value is not checked (errcheck)
	writeZoneFileRR(buf, []dns.RR{r1, r2, r3}, "bosun.org")
	               ^
pkg/prettyzone/prettyzone_test.go:151:17: Error return value is not checked (errcheck)
	writeZoneFileRR(buf, []dns.RR{r1, r2, r3, r4}, "bosun.org")
	               ^
providers/namecheap/namecheapProvider.go:302:22: Error return value of `record.SetTargetMX` is not checked (errcheck)
			record.SetTargetMX(uint16(dnsHost.MXPref), dnsHost.Address)
			                  ^
providers/namecheap/namecheapProvider.go:304:29: Error return value of `record.PopulateFromString` is not checked (errcheck)
			record.PopulateFromString(dnsHost.Type, dnsHost.Address, origin)
			                         ^
providers/route53/route53Provider.go:447:15: Error return value of `rc.SetTarget` is not checked (errcheck)
		rc.SetTarget(aws.ToString(set.AliasTarget.DNSName))
		            ^
providers/gcore/convert.go:80:4: ineffectual assignment to label (ineffassign)
			label = ""
			^
pkg/powershell/middleware/session.go:45:20: Error return value of `s.upstream.Execute` is not checked (errcheck)
	s.upstream.Execute(fmt.Sprintf("Disconnect-PSSession -Session $%s", s.name))
	                  ^
pkg/normalize/flatten.go:94:24: Error return value of `txt.SetTargetTXTs` is not checked (errcheck)
						txt.SetTargetTXTs(v)
						                 ^
pkg/normalize/flatten.go:97:23: Error return value of `cp.SetTargetTXTs` is not checked (errcheck)
						cp.SetTargetTXTs(v)
						                ^
pkg/normalize/validate.go:302:16: Error return value of `r.SetTarget` is not checked (errcheck)
				r.SetTarget(tr.String())
				           ^
pkg/normalize/validate.go:312:15: Error return value of `r.SetTarget` is not checked (errcheck)
			r.SetTarget(transformCNAME(r.GetTargetField(), srcDomain.Name, dstDomain.Name, suffixstrip))
			           ^
pkg/normalize/validate.go:428:18: Error return value of `rec.SetTarget` is not checked (errcheck)
				rec.SetTarget(dnsutil.AddOrigin(rec.GetTargetField(), origin))
				             ^
pkg/normalize/validate.go:864:19: Error return value of `copy.SetTarget` is not checked (errcheck)
				copy.SetTarget(newIP.String())
				              ^
pkg/normalize/validate_test.go:305:16: Error return value of `recA.SetTarget` is not checked (errcheck)
	recA.SetTarget("example.com.")
	              ^
pkg/normalize/validate_test.go:320:18: Error return value of `recB.SetTarget` is not checked (errcheck)
			recB.SetTarget("example2.com.")
			              ^
pkg/powershell/shell.go:75:15: Error return value of `s.stdin.Write` is not checked (errcheck)
	s.stdin.Write([]byte("exit" + newline))
	             ^
pkg/powershell/shell.go:84:15: Error return value of `s.handle.Wait` is not checked (errcheck)
	s.handle.Wait()
	             ^
providers/sakuracloud/convert.go:24:18: Error return value of `rc.SetTargetTXT` is not checked (errcheck)
		rc.SetTargetTXT(r.RData)
		               ^
providers/sakuracloud/convert.go:26:24: Error return value of `rc.PopulateFromString` is not checked (errcheck)
		rc.PopulateFromString(r.Type, r.RData, domain)
		                     ^
pkg/diff2/analyze_test.go:63:22: Error return value of `r.PopulateFromString` is not checked (errcheck)
	r.PopulateFromString(rtype, content, origin)
	                    ^
pkg/diff2/handsoff.go:141:32: printf: non-constant format string in call to fmt.Errorf (govet)
			return nil, nil, fmt.Errorf(strings.Join(msgs, "\n") +
			                            ^
providers/domainnameshop/api.go:179:36: Error return value of `(*encoding/json.Encoder).Encode` is not checked (errcheck)
	json.NewEncoder(payloadBuf).Encode(&dnsR)
	                                  ^
providers/domainnameshop/convert.go:27:13: Error return value of `t.SetTarget` is not checked (errcheck)
	t.SetTarget(target)
	           ^
providers/domainnameshop/convert.go:32:17: Error return value of `t.SetTargetTXT` is not checked (errcheck)
		t.SetTargetTXT(target)
		              ^
providers/domainnameshop/dns.go:33:19: Error return value of `rc.SetTargetTXT` is not checked (errcheck)
			rc.SetTargetTXT(rc.GetTargetTXTJoined())
			               ^
providers/digitalocean/digitaloceanProvider.go:306:17: Error return value of `t.SetTargetTXT` is not checked (errcheck)
		t.SetTargetTXT(target)
		              ^
providers/digitalocean/digitaloceanProvider.go:308:14: Error return value of `t.SetTarget` is not checked (errcheck)
		t.SetTarget(target)
		           ^
providers/rwth/api.go:192:18: printf: non-constant format string in call to github.com/StackExchange/dnscontrol/v4/pkg/printer.Printf (govet)
		printer.Printf(string(data))
		               ^
providers/dnsmadeeasy/restApi.go:225:18: printf: non-constant format string in call to github.com/StackExchange/dnscontrol/v4/pkg/printer.Printf (govet)
		printer.Printf(string(dump))
		               ^
providers/dnsmadeeasy/restApi.go:237:18: printf: non-constant format string in call to github.com/StackExchange/dnscontrol/v4/pkg/printer.Printf (govet)
		printer.Printf(string(dump))
		               ^
providers/internetbs/api.go:37:16: Error return value of `json.Unmarshal` is not checked (errcheck)
	json.Unmarshal(bodyString, &dr)
	              ^
pkg/notifications/bonfire.go:33:12: Error return value of `http.Post` is not checked (errcheck)
		http.Post(string(b), "text/markdown", strings.NewReader(p))
		         ^
pkg/notifications/shoutrrr.go:29:15: Error return value of `shoutrrr.Send` is not checked (errcheck)
	shoutrrr.Send(string(b), payload)
	             ^
pkg/notifications/slack.go:43:11: Error return value of `http.Post` is not checked (errcheck)
	http.Post(s.URL, "text/json", bytes.NewReader(json))
	         ^
pkg/notifications/teams.go:49:11: Error return value of `http.Post` is not checked (errcheck)
	http.Post(s.URL, "text/json", bytes.NewReader(json))
	         ^
providers/bind/soa.go:33:21: Error return value of `soaRec.SetTargetSOA` is not checked (errcheck)
	soaRec.SetTargetSOA(
	                   ^
providers/packetframe/api.go:198:16: Error return value of `json.Unmarshal` is not checked (errcheck)
	json.Unmarshal(body, &dr)
	              ^
providers/packetframe/packetframeProvider.go:212:18: Error return value of `rc.SetTargetTXT` is not checked (errcheck)
		rc.SetTargetTXT(r.Value)
		               ^
providers/packetframe/packetframeProvider.go:218:18: Error return value of `rc.SetTargetSRV` is not checked (errcheck)
		rc.SetTargetSRV(uint16(prio), uint16(weight), uint16(port), spl[3])
		               ^
providers/packetframe/packetframeProvider.go:222:17: Error return value of `rc.SetTargetMX` is not checked (errcheck)
		rc.SetTargetMX(uint16(prio), spl[1])
		              ^
providers/softlayer/softlayerProvider.go:159:22: Error return value of `recConfig.SetTarget` is not checked (errcheck)
		recConfig.SetTarget(*record.Data)
		                   ^
providers/softlayer/softlayerProvider.go:183:27: Error return value of `recConfig.SetTargetTXTs` is not checked (errcheck)
			recConfig.SetTargetTXTs(append(recConfig.GetTargetTXTSegmented(), *record.Data))
			                       ^
build/generate/dtsFile.go:71:14: Error return value of `os.WriteFile` is not checked (errcheck)
	os.WriteFile(join("commands", "types", "dnscontrol.d.ts"), []byte(fileContent+"\n"), 0644)
	            ^
models/record.go:256:23: Error return value of `copier.CopyWithOption` is not checked (errcheck)
	copier.CopyWithOption(&rc, &recj, copier.Option{IgnoreEmpty: true, DeepCopy: true})
	                     ^
models/t_loc.go:93:23: Error return value of `rc.calculateLOCFields` is not checked (errcheck)
	rc.calculateLOCFields(d1, m1, s1, ns, d2, m2, s2, ew, al, sz, hp, vp)
	                     ^
pkg/js/js.go:72:8: Error return value of `vm.Set` is not checked (errcheck)
	vm.Set("require", require)
	      ^
pkg/js/hash.go:21:2: SA4006: this value of `result` is never used (staticcheck)
	result := otto.Value{}
	^
providers/axfrddns/axfrddnsProvider.go:240:6: ineffectual assignment to con (ineffassign)
	var con net.Conn = nil
	    ^
providers/axfrddns/axfrddnsProvider.go:241:6: ineffectual assignment to err (ineffassign)
	var err error = nil
	    ^
pkg/acme/acme.go:190:25: S1024: should use time.Until instead of t.Sub(time.Now()) (gosimple)
	var daysLeft = float64(cert.NotAfter.Sub(time.Now())) / float64(time.Hour*24)
	                       ^
providers/loopia/loopiaProvider.go:373:17: printf: non-constant format string in call to github.com/StackExchange/dnscontrol/v4/pkg/printer.Debugf (govet)
	printer.Debugf(note)
	               ^
providers/gandiv5/gandi_v5Provider.go:300:17: printf: non-constant format string in call to github.com/StackExchange/dnscontrol/v4/pkg/printer.Debugf (govet)
	printer.Debugf(note)
	               ^

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Changes detected by Check Git Status Action

@systemcrash
Copy link
Contributor

I concur with the proposed loopia provider changes, and the mentioned amendment also.

providers/loopia/loopiaProvider.go:373:17: printf: non-constant format string in call to github.com/StackExchange/dnscontrol/v4/pkg/printer.Debugf (govet)
	printer.Debugf(note)
	               ^

@xddxdd
Copy link
Contributor

xddxdd commented Jan 5, 2025

The label variable in providers/gcore/convert.go was remnant of a refactoring before I submitted the PR for this provider. It is safe to remove.

@ttkzw
Copy link
Contributor

ttkzw commented Jan 6, 2025

  • providers/sakuracloud/ @ttkzw

I concur with the proposed sakuracloud provider changes.

@@ -133,7 +132,7 @@ func initAxfrDdns(config map[string]string, providermeta json.RawMessage) (provi
} else if len(api.nameservers) != 0 {
api.master = api.nameservers[0].Name + ":53"
} else {
return nil, fmt.Errorf("nameservers list is empty: creds.json needs a default `nameservers` or an explicit `master`")
return nil, errors.New("nameservers list is empty: creds.json needs a default `nameservers` or an explicit `master`")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this line changed to errors.New while lines 206, 223, 227, 287, and 387 still use fmt.Errorf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question!

errors.New() is appropriate when there is no formatting needed.

  • fmt.Errorf(): Has "printf" semantics
  • errors.New(): has "print" semantics

@imlonghao
Copy link
Contributor

imlonghao commented Jan 6, 2025

[x] providers/porkbun/ @imlonghao

LGTM

By the way, can we make those lints in GitHub Actions and executed when doing PR?

@tlimoncelli
Copy link
Contributor Author

By the way, can we make those lints in GitHub Actions and executed when doing PR?

Yes! Noted here: #3313

(I could use a volunteer)

@willpower232
Copy link
Contributor

I'm not sure if I've offended the gods of namecheap or there is a genuine problem here but I'm getting a timeout during one of the tests. I gave it half an hour and tried again and it was still happening so not sure if I should try again tomorrow or not.

Stack traces under the cut

stack traces
=== RUN   TestDNSProviders/willpower232testsdnscontrol.com/Clean_Slate:Empty#39
panic: test timed out after 10m0s
	running tests:
		TestDNSProviders (10m0s)
		TestDNSProviders/willpower232testsdnscontrol.com (10m0s)
		TestDNSProviders/willpower232testsdnscontrol.com/Clean_Slate:Empty#39 (0s)

goroutine 806 [running]:
testing.(*M).startAlarm.func1()
	/usr/local/go/src/testing/testing.go:2373 +0x385
created by time.goFunc
	/usr/local/go/src/time/sleep.go:215 +0x2d

goroutine 1 [chan receive, 9 minutes]:
testing.(*T).Run(0xc000326820, {0x1cd4d6d?, 0x0?}, 0x1d6ed68)
	/usr/local/go/src/testing/testing.go:1751 +0x3ab
testing.runTests.func1(0xc000326820)
	/usr/local/go/src/testing/testing.go:2168 +0x37
testing.tRunner(0xc000326820, 0xc000271c70)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
testing.runTests(0xc0001b33b0, {0x2bc3820, 0x3, 0x3}, {0xc000354f00?, 0x1cc2d41?, 0x2bef0e0?})
	/usr/local/go/src/testing/testing.go:2166 +0x43d
testing.(*M).Run(0xc000388140)
	/usr/local/go/src/testing/testing.go:2034 +0x64a
main.main()
	_testmain.go:49 +0x9b

goroutine 36 [chan receive, 9 minutes]:
testing.(*T).Run(0xc0003269c0, {0xc000046011?, 0x27bf420?}, 0xc0003d2690)
	/usr/local/go/src/testing/testing.go:1751 +0x3ab
github.com/StackExchange/dnscontrol/v4/integrationTest.TestDNSProviders(0xc0003269c0)
	/home/wp/gitrepos/dnscontrol-integrationTest/integrationTest/integration_test.go:161 +0xf4
testing.tRunner(0xc0003269c0, 0x1d6ed68)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
created by testing.(*T).Run in goroutine 1
	/usr/local/go/src/testing/testing.go:1743 +0x390

goroutine 37 [chan receive]:
testing.(*T).Run(0xc000326d00, {0xc000d93cb0?, 0xc000083c08?}, 0xc0006246c0)
	/usr/local/go/src/testing/testing.go:1751 +0x3ab
github.com/StackExchange/dnscontrol/v4/integrationTest.makeChanges(0xc000326d00, {0x1f8ec20, 0xc0003d2660}, 0xc0003d79e0, 0xc000b1caa0, {0x1ccc225, 0xb}, 0x0, 0x0)
	/home/wp/gitrepos/dnscontrol-integrationTest/integrationTest/integration_test.go:235 +0x188
github.com/StackExchange/dnscontrol/v4/integrationTest.runTests(0xc000326d00, {0x1f8ec20, 0xc0003d2660}, {0xc000046011?, 0x548e73?}, 0xc0003d2300)
	/home/wp/gitrepos/dnscontrol-integrationTest/integrationTest/integration_test.go:352 +0x35c
github.com/StackExchange/dnscontrol/v4/integrationTest.TestDNSProviders.func1(0xc000326d00?)
	/home/wp/gitrepos/dnscontrol-integrationTest/integrationTest/integration_test.go:162 +0x27
testing.tRunner(0xc000326d00, 0xc0003d2690)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
created by testing.(*T).Run in goroutine 36
	/usr/local/go/src/testing/testing.go:1743 +0x390

goroutine 47 [IO wait]:
internal/poll.runtime_pollWait(0x7f3b85009df0, 0x72)
	/usr/local/go/src/runtime/netpoll.go:351 +0x85
internal/poll.(*pollDesc).wait(0xc000226180?, 0xc000363500?, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000226180, {0xc000363500, 0x1500, 0x1500})
	/usr/local/go/src/internal/poll/fd_unix.go:165 +0x27a
net.(*netFD).Read(0xc000226180, {0xc000363500?, 0x848832?, 0xc00015f9a0?})
	/usr/local/go/src/net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc000762000, {0xc000363500?, 0xc000c960a0?, 0xc0003637fa?})
	/usr/local/go/src/net/net.go:189 +0x45
crypto/tls.(*atLeastReader).Read(0xc000df01e0, {0xc000363500?, 0x0?, 0xc000df01e0?})
	/usr/local/go/src/crypto/tls/conn.go:809 +0x3b
bytes.(*Buffer).ReadFrom(0xc000004638, {0x1f7c460, 0xc000df01e0})
	/usr/local/go/src/bytes/buffer.go:211 +0x98
crypto/tls.(*Conn).readFromUntil(0xc000004388, {0x1f7b800, 0xc000762000}, 0xc00015fa10?)
	/usr/local/go/src/crypto/tls/conn.go:831 +0xde
crypto/tls.(*Conn).readRecordOrCCS(0xc000004388, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:629 +0x3cf
crypto/tls.(*Conn).readRecord(...)
	/usr/local/go/src/crypto/tls/conn.go:591
crypto/tls.(*Conn).Read(0xc000004388, {0xc000cbd000, 0x1000, 0xc000d00380?})
	/usr/local/go/src/crypto/tls/conn.go:1385 +0x150
bufio.(*Reader).Read(0xc000ca0d20, {0xc000caa120, 0x9, 0x2b8ce20?})
	/usr/local/go/src/bufio/bufio.go:241 +0x197
io.ReadAtLeast({0x1f7b200, 0xc000ca0d20}, {0xc000caa120, 0x9, 0x9}, 0x9)
	/usr/local/go/src/io/io.go:335 +0x90
io.ReadFull(...)
	/usr/local/go/src/io/io.go:354
net/http.http2readFrameHeader({0xc000caa120, 0x9, 0xc000c002a0?}, {0x1f7b200?, 0xc000ca0d20?})
	/usr/local/go/src/net/http/h2_bundle.go:1642 +0x65
net/http.(*http2Framer).ReadFrame(0xc000caa0e0)
	/usr/local/go/src/net/http/h2_bundle.go:1909 +0x85
net/http.(*http2clientConnReadLoop).run(0xc00015ffa8)
	/usr/local/go/src/net/http/h2_bundle.go:9496 +0xda
net/http.(*http2ClientConn).readLoop(0xc0008c0f00)
	/usr/local/go/src/net/http/h2_bundle.go:9392 +0x7c
created by net/http.(*http2Transport).newClientConn in goroutine 46
	/usr/local/go/src/net/http/h2_bundle.go:8006 +0xd1b

goroutine 805 [select]:
net/http.(*http2clientStream).writeRequest(0xc0007a2c00, 0xc000237b80, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:8673 +0xa65
net/http.(*http2clientStream).doRequest(0xc0007a2c00, 0xc0003271e0?, 0xc0006246c0?)
	/usr/local/go/src/net/http/h2_bundle.go:8551 +0x56
created by net/http.(*http2ClientConn).roundTrip in goroutine 804
	/usr/local/go/src/net/http/h2_bundle.go:8456 +0x3d8

goroutine 804 [select]:
net/http.(*http2ClientConn).roundTrip(0xc0008c0f00, 0xc000237b80, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:8520 +0x4f8
net/http.(*http2ClientConn).RoundTrip(...)
	/usr/local/go/src/net/http/h2_bundle.go:8417
net/http.(*http2Transport).RoundTripOpt(0xc000388460, 0xc000237b80, {0x12?})
	/usr/local/go/src/net/http/h2_bundle.go:7739 +0x1ab
net/http.(*http2Transport).RoundTrip(...)
	/usr/local/go/src/net/http/h2_bundle.go:7697
net/http.http2noDialH2RoundTripper.RoundTrip({0x2bc6840?}, 0xc000237b80?)
	/usr/local/go/src/net/http/h2_bundle.go:10371 +0x1a
net/http.(*Transport).roundTrip(0x2bc6840, 0xc000237a40)
	/usr/local/go/src/net/http/transport.go:563 +0x493
net/http.(*Transport).RoundTrip(0x4bce5c?, 0x1f7cbc0?)
	/usr/local/go/src/net/http/roundtrip.go:30 +0x13
net/http.send(0xc000237a40, {0x1f7cbc0, 0x2bc6840}, {0x1?, 0xc000c00ff0?, 0x0?})
	/usr/local/go/src/net/http/client.go:259 +0x5e4
net/http.(*Client).send(0x2bee420, 0xc000237a40, {0xc000aa9938?, 0x4dd9ab?, 0x0?})
	/usr/local/go/src/net/http/client.go:180 +0x98
net/http.(*Client).do(0x2bee420, 0xc000237a40)
	/usr/local/go/src/net/http/client.go:725 +0x8bc
net/http.(*Client).Do(...)
	/usr/local/go/src/net/http/client.go:590
github.com/billputer/go-namecheap.(*Client).sendRequest(0xc0001ad020, 0xc000083c08?)
	/home/wp/go/pkg/mod/github.com/billputer/[email protected]/namecheap.go:166 +0x6e
github.com/billputer/go-namecheap.(*Client).do(0x1b52220?, 0xc000c00f90?)
	/home/wp/go/pkg/mod/github.com/billputer/[email protected]/namecheap.go:119 +0x25
github.com/billputer/go-namecheap.(*Client).DomainsDNSGetHosts(0xc0001ad020, {0xc000046011, 0x1b}, {0xc00004602d, 0x3})
	/home/wp/go/pkg/mod/github.com/billputer/[email protected]/dns.go:44 +0x1cb
github.com/StackExchange/dnscontrol/v4/providers/namecheap.(*namecheapProvider).GetZoneRecords.func1()
	/home/wp/gitrepos/dnscontrol-integrationTest/providers/namecheap/namecheapProvider.go:127 +0x45
github.com/StackExchange/dnscontrol/v4/providers/namecheap.doWithRetry(0xc000159cc8)
	/home/wp/gitrepos/dnscontrol-integrationTest/providers/namecheap/namecheapProvider.go:104 +0x8c
github.com/StackExchange/dnscontrol/v4/providers/namecheap.(*namecheapProvider).GetZoneRecords(0xc0003d2660, {0xc000046011, 0x1f}, 0xc0007a2300?)
	/home/wp/gitrepos/dnscontrol-integrationTest/providers/namecheap/namecheapProvider.go:126 +0xa7
github.com/StackExchange/dnscontrol/v4/pkg/zonerecs.CorrectZoneRecords({0x7f3b8464ca18, 0xc0003d2660}, 0xc000a418c0)
	/home/wp/gitrepos/dnscontrol-integrationTest/pkg/zonerecs/zonerecords.go:11 +0x4c
github.com/StackExchange/dnscontrol/v4/integrationTest.makeChanges.func1(0xc0003271e0)
	/home/wp/gitrepos/dnscontrol-integrationTest/integrationTest/integration_test.go:275 +0x6d2
testing.tRunner(0xc0003271e0, 0xc0006246c0)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
created by testing.(*T).Run in goroutine 37
	/usr/local/go/src/testing/testing.go:1743 +0x390
exit status 2
FAIL	github.com/StackExchange/dnscontrol/v4/integrationTest	600.030s

@gucci-on-fleek
Copy link
Contributor

LGTM

@Deraen
Copy link
Contributor

Deraen commented Jan 7, 2025

LGTM

@tlimoncelli
Copy link
Contributor Author

@willpower232 Did the problem go away on its own?

@vojtad
Copy link
Contributor

vojtad commented Jan 7, 2025

Looks good, thanks.

@willpower232
Copy link
Contributor

@tlimoncelli yeah it seems to, some kind of extra rate limiting is in place I'd say, I'm able to make it work successively if I wait an hour haha

the same five tests fail on main and this branch so looks like the namecheap provider is just as good in both places 🙏

--- FAIL: TestDNSProviders/willpower232testsdnscontrol.com/06:MX:Change_MX_p (0.95s)
--- FAIL: TestDNSProviders/willpower232testsdnscontrol.com/22:complex_TXT:a_0-byte_TXT (0.75s)
--- FAIL: TestDNSProviders/willpower232testsdnscontrol.com/33:CAA:CAA_change_flag (0.89s)
--- FAIL: TestDNSProviders/willpower232testsdnscontrol.com/76:IGNORE_with_modify:VERIFY_PREVIOUS (0.46s)
--- FAIL: TestDNSProviders/willpower232testsdnscontrol.com/79:IGNORE_w/change_b3227:VERIFY_PREVIOUS#02 (0.30s)

@tlimoncelli
Copy link
Contributor Author

@tlimoncelli yeah it seems to, some kind of extra rate limiting is in place I'd say, I'm able to make it work successively if I wait an hour haha

the same five tests fail on main and this branch so looks like the namecheap provider is just as good in both places 🙏

Agreed.

That said... could you open a bug about those 5 items?
The 2nd one is easy to fix by adding rejectif.TxtIsEmpty to namecheap/auditrecords.go
Not sure about the others but I'd be glad to assist!

Tom

@riku22
Copy link
Contributor

riku22 commented Jan 8, 2025

LGTM

@tlimoncelli
Copy link
Contributor Author

Friendly reminder! Merge happens on Monday.

@tlimoncelli tlimoncelli merged commit 5dbe5e8 into main Jan 13, 2025
20 checks passed
@tlimoncelli tlimoncelli deleted the tlim_linting202501 branch January 13, 2025 16:33
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.

10 participants