caddy-dns / dnsmadeeasy

MIT License
1 stars 1 forks source link

Building latest caddy with this fails to build #2

Closed coandco closed 3 months ago

coandco commented 3 months ago

I'm using go version 1.22.3 and xcaddy 0.4.2.

$ go version
go version go1.22.3 linux/amd64
$ xcaddy build --with github.com/caddy-dns/dnsmadeeasy
2024/05/30 12:14:26 [INFO] absolute output file path: /home/coandco/caddy
2024/05/30 12:14:26 [INFO] Temporary folder: /tmp/buildenv_2024-05-30-1214.3652725441
2024/05/30 12:14:26 [INFO] Writing main module: /tmp/buildenv_2024-05-30-1214.3652725441/main.go
package main

import (
        caddycmd "github.com/caddyserver/caddy/v2/cmd"

        // plug in Caddy modules here
        _ "github.com/caddyserver/caddy/v2/modules/standard"
        _ "github.com/caddy-dns/dnsmadeeasy"
)

func main() {
        caddycmd.Main()
}
2024/05/30 12:14:26 [INFO] Initializing Go module
2024/05/30 12:14:26 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod init caddy
go: creating new go.mod: module caddy
go: to add module requirements and sums:
        go mod tidy
2024/05/30 12:14:26 [INFO] Pinning versions
2024/05/30 12:14:26 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/v2
go: added github.com/beorn7/perks v1.0.1
go: added github.com/caddyserver/caddy/v2 v2.8.1
go: added github.com/caddyserver/certmagic v0.21.2
go: added github.com/caddyserver/zerossl v0.1.3
go: added github.com/cespare/xxhash/v2 v2.2.0
go: added github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
go: added github.com/google/pprof v0.0.0-20231212022811-ec68065c825e
go: added github.com/google/uuid v1.6.0
go: added github.com/klauspost/cpuid/v2 v2.2.7
go: added github.com/libdns/libdns v0.2.2
go: added github.com/mholt/acmez/v2 v2.0.1
go: added github.com/miekg/dns v1.1.59
go: added github.com/onsi/ginkgo/v2 v2.13.2
go: added github.com/prometheus/client_golang v1.19.1
go: added github.com/prometheus/client_model v0.5.0
go: added github.com/prometheus/common v0.48.0
go: added github.com/prometheus/procfs v0.12.0
go: added github.com/quic-go/qpack v0.4.0
go: added github.com/quic-go/quic-go v0.44.0
go: added github.com/zeebo/blake3 v0.2.3
go: added go.uber.org/mock v0.4.0
go: added go.uber.org/multierr v1.11.0
go: added go.uber.org/zap v1.27.0
go: added go.uber.org/zap/exp v0.2.0
go: added golang.org/x/crypto v0.23.0
go: added golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
go: added golang.org/x/mod v0.17.0
go: added golang.org/x/net v0.25.0
go: added golang.org/x/sync v0.7.0
go: added golang.org/x/sys v0.20.0
go: added golang.org/x/term v0.20.0
go: added golang.org/x/text v0.15.0
go: added golang.org/x/time v0.5.0
go: added golang.org/x/tools v0.21.0
go: added google.golang.org/protobuf v1.34.1
2024/05/30 12:14:26 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/dnsmadeeasy github.com/caddyserver/caddy/v2
go: added github.com/caddy-dns/dnsmadeeasy v1.1.1
go: added github.com/go-resty/resty/v2 v2.11.0
go: added github.com/john-k/dnsmadeeasy v1.1.0
go: added github.com/libdns/dnsmadeeasy v1.1.1
2024/05/30 12:14:26 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v
2024/05/30 12:14:27 [INFO] Build environment ready
2024/05/30 12:14:27 [INFO] Building Caddy
2024/05/30 12:14:27 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -e
2024/05/30 12:14:27 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /home/coandco/caddy -ldflags -w -s -trimpath -tags nobadger
# github.com/libdns/dnsmadeeasy
/home/coandco/go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:34:18: cannot use dmeRecord.MxLevel (variable of type int) as uint value in assignment
/home/coandco/go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:36:18: cannot use dmeRecord.Priority (variable of type int) as uint value in assignment
/home/coandco/go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:56:23: cannot use record.Priority (variable of type uint) as int value in assignment
/home/coandco/go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:58:24: cannot use record.Priority (variable of type uint) as int value in assignment
2024/05/30 12:14:28 [INFO] Cleaning up temporary folder: /tmp/buildenv_2024-05-30-1214.3652725441
2024/05/30 12:14:28 [FATAL] exit status 1
coandco commented 3 months ago

I think I've tracked down the issue to libdns/dnsmadeeasy#1 and have opened libdns/dnsmadeeasy#2 to fix it.

CameronMunroe commented 1 month ago

I am still seeing this build fail. Likely we need to tag a new release 1.1.2?

#12 ...
#11 [linux/amd64 builder 2/2] RUN xcaddy build     --with github.com/caddy-dns/dnsmadeeasy
#11 52.16 2024/08/14 04:26:45 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2024-08-14-0425.2588684510
#11 52.16 2024/08/14 04:26:45 [FATAL] exit status 1
#11 ERROR: process "/bin/sh -c xcaddy build     --with github.com/caddy-dns/${CADDY_DNS}" did not complete successfully: exit code: 1
#12 [linux/arm64 builder 2/2] RUN xcaddy build     --with github.com/caddy-dns/dnsmadeeasy
#12 CANCELED
------
 > [linux/amd64 builder 2/2] RUN xcaddy build     --with github.com/caddy-dns/dnsmadeeasy:
18.04 go: downloading github.com/googleapis/enterprise-certificate-proxy v0.3.2
18.16 go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
18.34 2024/08/14 04:26:11 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /usr/bin/caddy -ldflags -w -s -trimpath -tags nobadger 
36.87 # github.com/libdns/dnsmadeeasy
36.87 /go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:34:18: cannot use dmeRecord.MxLevel (variable of type int) as uint value in assignment
36.87 /go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:36:18: cannot use dmeRecord.Priority (variable of type int) as uint value in assignment
36.87 /go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:56:23: cannot use record.Priority (variable of type uint) as int value in assignment
36.87 /go/pkg/mod/github.com/libdns/dnsmadeeasy@v1.1.1/client.go:58:24: cannot use record.Priority (variable of type uint) as int value in assignment
52.16 2024/08/14 04:26:45 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2024-08-14-0425.2588684510
52.16 2024/08/14 04:26:45 [FATAL] exit status 1
coandco commented 1 week ago

I think you're correct. @mholt, is that something you can do?

mholt commented 1 week ago

@John-K or @Monviech help maintain this repo, ideally if they have time to do it that'd be good :+1:

But I can if no one else is available.

CameronMunroe commented 2 days ago

Checking in on this.

Monviech commented 1 day ago

Im maintaining a large caddy build that gets tested nightly and I do not experience a build issue:

https://github.com/opnsense/tools/blob/c6112cfb7484f04a316a6e2d81b7620d9c4cef5a/config/24.7/make.conf#L124

CameronMunroe commented 1 day ago

Im maintaining a large caddy build that gets tested nightly and I do not experience a build issue:

https://github.com/opnsense/tools/blob/c6112cfb7484f04a316a6e2d81b7620d9c4cef5a/config/24.7/make.conf#L124

This is because you are tagging the hashed release version. If using the standard method, such as below, it will fail as it is using the last known good tag.

xcaddy build \
    --with github.com/caddy-dns/dnsmadeeasy
Monviech commented 1 day ago

I see, I cant create a tag or a release here since only people with write access to this repository can do that. It would be best if the creator of this module does it, since this here was only a quick fix.