caddy-dns / porkbun

MIT License
27 stars 8 forks source link

Build failing with caddy 2.8.4 #11

Closed gyzerok closed 3 months ago

gyzerok commented 3 months ago

Hello! I've tried upgrading from 2.7.6 to 2.8.4 and am getting the following error during the build:

114.3 2024/06/04 03:40:31 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /usr/bin/caddy -ldflags -w -s -trimpath -tags nobadger
175.9 # github.com/libdns/porkbun
175.9 /go/pkg/mod/github.com/libdns/porkbun@v0.1.2/models.go:51:13: cannot use priority (variable of type int) as uint value in struct literal
272.1 2024/06/04 03:43:09 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2024-06-04-0338.1235636482
272.1 2024/06/04 03:43:09 [FATAL] exit status 1
------
failed to solve: process "/bin/sh -c xcaddy build --with github.com/caddy-dns/porkbun" did not complete successfully: exit code: 1
princemaple commented 3 months ago

FYI this issue is also on many other dns packages

mholt commented 3 months ago

That's very interesting... :thinking: That field has been uint for 2 years: https://github.com/libdns/libdns/commit/3ef90aee33fd3fd66c29d85e311f4ea131f7e4a0#diff-10c498e19014064a3e01c989a7b76af186146b6173a14fc14185002d5e32bb8f

I am not sure why several packages are suddenly breaking...

EDIT: Ah, there's multiple Priority fields in different types, and I was looking at the wrong one. The Record type indeed changed Priority from int to uint for parity with the other record-type-specific types for proper interop.

princemaple commented 3 months ago

FYI https://github.com/princemaple/docker-caddy/actions/runs/9361463680

Monviech commented 3 months ago

I already issued PRs to fix netcup and porkbun. I have already noticed this issue in februrary.

EDIT: This might fix it https://github.com/caddy-dns/porkbun/pull/12

Niallfitzy1 commented 3 months ago

New releases of libdns/porkbun & caddy-dns/porkbun are now published that address this