d2iq-archive / mesos-dns

DNS-based service discovery for Mesos.
https://mesosphere.github.com/mesos-dns
Apache License 2.0
483 stars 137 forks source link

Adding dockerized build environment #463

Closed bradbeam closed 7 years ago

bradbeam commented 8 years ago

Part of work that was mentioned in #439

This adds support for using docker as a build environment. I've left the go version at 1.6.3 since 1.7 was just released last week.

There are two dockerfiles included

The makefile is fairly minimal, if desired we can pull in additional commands from circle.yml.

mesosphere-ci commented 8 years ago

Can one of the admins verify this patch?

sargun commented 8 years ago

Can you make our Circle-CI build invoke he Makefile?

bradbeam commented 8 years ago

Went to the extreme of moving most all of the build steps from circle.yml to the Makefile. If it's too much we can revert or with your guidance pick out the bits we want in each.

Looks like the btrfs / Error deleting container errors are a known issue that shouldn't effect builds - https://circleci.com/docs/docker-btrfs-error/

Added a .dockerignore file to try to skip some of the rebuilding of the container ( seems to be missing the cache hit during the COPY step ), but I couldn't find any differences in the working directory that would have caused the cache miss.

sargun commented 8 years ago

@jdef What do you think? I like it, especially because the Jenkins are coming.

@bradbeam Do you want to update the README?

sargun commented 8 years ago

@bradbeam Is there a way to make it so that it also allows you to build outside Docker? I primarily develop on Mac OS X, and it puts a real snag into things when Docker comes into play.

sargun commented 8 years ago

Alpine uses musl. Musl has some interesting bugs. I'd rather not explore those. -- Also, I almost want to say Ubuntu Xenial.

timcharper commented 8 years ago

Hmm; I've been running alpine for almost everything built by Go and it has worked really well. To which "interesting bugs" are you referring? There are some differences in behaviors for musl, but I wouldn't call those bugs. And, Go fat binaries ship with their own DNS client etc. so I think it's even less likely to be an issue for mesos-dns.

bradbeam commented 8 years ago

Yeah I can update the README. I'll look into making the docker part optional. I think I've got a couple ideas to explore with that.

sargun commented 8 years ago

Yeah, it's not so much of a problem when running Go binaries, but there are issues like Musl times out DNS requests in 200ms. In certain environments this is problematic. We've also seen it improperly handle DNS responses. This is less of an issue for the resultant binary, but potential side-effects could occur when things like git or other tools run.

This has been a massive headache for other teams at Mesosphere, as debugging your libc is hard.

timcharper commented 8 years ago

Sort of getting off topic, and this certainly isn't the appropriate place to debate the behavior of Musl, so this'll be my last post on the subject.

issues like Musl times out DNS requests in 200ms

I'd love to learn more about this if you have any reading material you can share.

We've also seen it improperly handle DNS responses.

I wonder if this is more subjective. Musl differs from glibc DNS resolution implementation for good reasons; as far as I'm aware, musl is standards compliant.

I certainly won't pretend to understand the magnitude of the problems you've encountered with Musl; I do think it is well written software and that deploying it has helped me to better avoid relying on unspecified behavior.

bradbeam commented 8 years ago

Should be all set.

jdef commented 8 years ago

I like having a Makefile that can drive the build process. Using Docker as a cleanroom for building things is great. Using Docker to run mesos-dns is something I'm not very excited about and is something that I'd like to avoid promoting (this is an old debate we've had both publicly and internally). It's very easy to run it WRONG when using Docker to run mesos-dns.

Tentatively lgtm: I'd rather go without Dockerfile.build (and related make target). I'll let @sargun make that call.

sargun commented 8 years ago

@jdef I agree on that point. I think that if we ever do decide to make Mesos-DNS runnable from a Docker container, the image creation process probably should live in those set of tools, and be responsible for that entire flow (upload to a Docker repo, build, etc..).

bradbeam commented 8 years ago

I'm indifferent on including the Dockerfile for running mesos-dns in a container. I had initially included it since we're running mesos-dns in a container and wanted to create a generic stub to update through subsequent PRs. I'll get an update going to remove those references.

@jdef I'm not sure that I've heard much against running mesos-dns in a container. Any resources you could point me to regarding that?

timcharper commented 8 years ago

@sargun especially agree wrt to running mesos-dns in Docker. There's really not much advantage to doing so (deploy mesos-dns with three files: a config file, an executable, and a service definition) and mesos-dns isn't one of those services you just run anywhere.

cheuschober commented 8 years ago

@timcharper / @sargun Not all environments use mesos containerizer and many use the docker-registry as a image repo. Without it we'd have to have a new orchestration system to push images onto servers where mesos-dns could run (under marathon). That advantage alone should be sufficient for running it in a container. Our team is planning on moving to the mesos containerizer but I'm doubtful we'll ever drop the docker registry for the deployment trouble it saves.

cheuschober commented 8 years ago

To give you a sense of what we've been running:

In this way, our mesos-dns can live anywhere in the cluster and appropriately benefit from marathon's rescheduling/health guarantees.

sargun commented 8 years ago

I tested this Makefile by just running make, and it ran into a bunch of errors:


3c075477e55e:mesos-dns sdhillon$ make
gofmt -l . | \
                                awk '!/^vendor/ { print ; err=1 }; END{ exit err }'
gometalinter \
                            --vendor \
                            --concurrency=6 \
                            --cyclo-over=12 \
                            --tests \
                            --exclude='TLS InsecureSkipVerify may be true.' \
                            --exclude='Use of unsafe calls should be audited' \
                            --deadline=300s ./...
httpcli/iam/iam.go:10:2:warning: could not import github.com/dgrijalva/jwt-go (cannot find package "github.com/dgrijalva/jwt-go" in any of: (aligncheck)
httpcli/iam/    /usr/local/go/src/github.com/dgrijalva/jwt-go (from $GOROOT)
    /Users/sdhillon/go/gopath/src/github.com/dgrijalva/jwt-go (from $GOPATH))
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/httpcli/iam/iam.go:41:12:warning: undeclared name: jwt (aligncheck)
httpcli/iam/iam.go:41:20:warning: undeclared name: jwt (aligncheck)
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/httpcli/iam/iam.go:10:2:warning: could not import github.com/dgrijalva/jwt-go (cannot find package "github.com/dgrijalva/jwt-go" in any of: (aligncheck)
records/    /usr/local/go/src/github.com/dgrijalva/jwt-go (from $GOROOT)
    /Users/sdhillon/go/gopath/src/github.com/dgrijalva/jwt-go (from $GOPATH))
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/httpcli/iam/iam.go:41:12:warning: undeclared name: jwt (aligncheck)
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/httpcli/iam/iam.go:41:20:warning: undeclared name: jwt (aligncheck)
records/generator.go:25:2:warning: could not import github.com/tv42/zbase32 (cannot find package "github.com/tv42/zbase32" in any of: (aligncheck)
records/    /usr/local/go/src/github.com/tv42/zbase32 (from $GOROOT)
    /Users/sdhillon/go/gopath/src/github.com/tv42/zbase32 (from $GOPATH))
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/records/generator.go:304:9:warning: undeclared name: zbase32 (aligncheck)
auth.go:4:2:error: could not import github.com/mesosphere/mesos-dns/httpcli/basic (can't find import: github.com/mesosphere/mesos-dns/httpcli/basic) (gotype)
auth.go:5:2:error: could not import github.com/mesosphere/mesos-dns/httpcli/iam (can't find import: github.com/mesosphere/mesos-dns/httpcli/iam) (gotype)
auth.go:10:2:error: undeclared name: basic (gotype)
auth.go:11:2:error: undeclared name: iam (gotype)
main.go:92:30:error: cannot pass argument detect.NewMasters(masters, changed) (value of type *github.com/mesosphere/mesos-dns/detect.Masters) to parameter of type github.com/mesos/mesos-go/detector.MasterChanged (gotype)
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/httpcli/iam/iam.go:10:2:warning: could not import github.com/dgrijalva/jwt-go (cannot find package "github.com/dgrijalva/jwt-go" in any of: (aligncheck)
resolver/   /usr/local/go/src/github.com/dgrijalva/jwt-go (from $GOROOT)
    /Users/sdhillon/go/gopath/src/github.com/dgrijalva/jwt-go (from $GOPATH))
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/httpcli/iam/iam.go:41:12:warning: undeclared name: jwt (aligncheck)
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/httpcli/iam/iam.go:41:20:warning: undeclared name: jwt (aligncheck)
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/records/generator.go:25:2:warning: could not import github.com/tv42/zbase32 (cannot find package "github.com/tv42/zbase32" in any of: (aligncheck)
resolver/   /usr/local/go/src/github.com/tv42/zbase32 (from $GOROOT)
    /Users/sdhillon/go/gopath/src/github.com/tv42/zbase32 (from $GOPATH))
/Users/sdhillon/go/gopath/src/github.com/mesosphere/mesos-dns/records/generator.go:304:9:warning: undeclared name: zbase32 (aligncheck)
httpcli/doer.go:11:2:error: could not import github.com/mesosphere/mesos-dns/urls (can't find import: github.com/mesosphere/mesos-dns/urls) (gotype)
httpcli/doer.go:68:58:error: undeclared name: urls (gotype)
httpcli/doer.go:69:8:error: undeclared name: urls (gotype)
httpcli/doer.go:71:9:error: undeclared name: urls (gotype)
exchanger/forwarder_test.go:42:28:error: cannot use msg (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
exchanger/forwarder_test.go:44:11:error: cannot use msg (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
exchanger/forwarder_test.go:60:14:error: cannot return msg (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as value of type *github.com/miekg/dns.Msg (gotype)
exchanger/forwarder_test.go:65:11:error: cannot use msg (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
httpcli/basic/config.go:6:2:error: could not import github.com/mesosphere/mesos-dns/httpcli (can't find import: github.com/mesosphere/mesos-dns/httpcli) (gotype)
httpcli/basic/basic.go:7:2:error: could not import github.com/mesosphere/mesos-dns/httpcli (can't find import: github.com/mesosphere/mesos-dns/httpcli) (gotype)
httpcli/basic/config.go:19:35:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:33:18:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:33:57:error: undeclared name: httpcli (gotype)
httpcli/basic/config.go:20:17:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:12:2:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:12:19:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:12:38:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:12:66:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:12:107:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:13:25:error: undeclared name: httpcli (gotype)
httpcli/basic/basic.go:34:9:error: undeclared name: httpcli (gotype)
httpcli/iam/config.go:6:2:error: could not import github.com/mesosphere/mesos-dns/httpcli (can't find import: github.com/mesosphere/mesos-dns/httpcli) (gotype)
httpcli/iam/iam.go:10:2:error: could not import github.com/dgrijalva/jwt-go (can't find import: github.com/dgrijalva/jwt-go) (gotype)
httpcli/iam/iam.go:12:2:error: could not import github.com/mesosphere/mesos-dns/httpcli (can't find import: github.com/mesosphere/mesos-dns/httpcli) (gotype)
httpcli/iam/config.go:21:30:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:38:47:error: undeclared name: httpcli (gotype)
httpcli/iam/config.go:22:17:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:17:2:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:17:19:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:17:36:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:17:64:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:17:105:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:18:25:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:39:9:error: undeclared name: httpcli (gotype)
httpcli/iam/iam.go:41:12:error: undeclared name: jwt (gotype)
httpcli/iam/iam.go:41:20:error: undeclared name: jwt (gotype)
httpcli/iam/iam.go:70:16:error: undeclared name: httpcli (gotype)
records/config.go:15:2:error: could not import github.com/mesosphere/mesos-dns/httpcli (can't find import: github.com/mesosphere/mesos-dns/httpcli) (gotype)
records/config.go:16:2:error: could not import github.com/mesosphere/mesos-dns/httpcli/basic (can't find import: github.com/mesosphere/mesos-dns/httpcli/basic) (gotype)
records/config.go:17:2:error: could not import github.com/mesosphere/mesos-dns/httpcli/iam (can't find import: github.com/mesosphere/mesos-dns/httpcli/iam) (gotype)
records/generator.go:19:2:error: could not import github.com/mesosphere/mesos-dns/httpcli (can't find import: github.com/mesosphere/mesos-dns/httpcli) (gotype)
records/generator.go:24:2:error: could not import github.com/mesosphere/mesos-dns/urls (can't find import: github.com/mesosphere/mesos-dns/urls) (gotype)
records/config.go:81:19:error: undeclared name: basic (gotype)
records/config.go:87:16:error: undeclared name: httpcli (gotype)
records/config.go:89:22:error: undeclared name: httpcli (gotype)
records/generator.go:100:16:error: undeclared name: httpcli (gotype)
records/generator.go:101:16:error: undeclared name: urls (gotype)
records/config.go:167:19:error: undeclared name: httpcli (gotype)
records/config.go:171:21:error: undeclared name: iam (gotype)
records/config.go:179:9:error: undeclared name: httpcli (gotype)
records/config.go:171:3:error: iamConfig declared but not used (gotype)
records/config.go:238:7:error: undeclared name: httpcli (gotype)
records/config.go:239:54:error: invalid operation: c.MesosCredentials (variable with invalid type) has no field or method Principal (gotype)
records/config.go:240:7:error: undeclared name: httpcli (gotype)
records/config.go:242:7:error: undeclared name: httpcli (gotype)
records/config.go:243:6:error: invalid operation: c.MesosCredentials (variable with invalid type) has no field or method Principal (gotype)
records/generator.go:243:15:error: invalid operation: rg.stateEndpoint (variable with invalid type) has no field or method With (gotype)
records/generator.go:243:37:error: undeclared name: urls (gotype)
records/generator.go:254:15:error: invalid operation: rg.httpClient (variable with invalid type) has no field or method Do (gotype)
records/config.go:118:24:error: undeclared name: httpcli (gotype)
records/generator.go:138:26:error: undeclared name: httpcli (gotype)
records/generator.go:139:26:error: undeclared name: httpcli (gotype)
records/generator.go:144:13:error: undeclared name: httpcli (gotype)
records/generator.go:145:13:error: undeclared name: httpcli (gotype)
records/generator.go:149:22:error: invalid operation: rg.stateEndpoint (variable with invalid type) has no field or method With (gotype)
records/generator.go:150:4:error: undeclared name: urls (gotype)
resolver/resolver.go:35:21:error: Option not declared by package records (gotype)
resolver/resolver_test.go:97:12:error: cannot assign (func(m *dns.Msg, net string) (*dns.Msg, error) literal) (value of type func(m *github.com/miekg/dns.Msg, net string) (*github.com/miekg/dns.Msg, error)) to res.fwd (variable of type github.com/mesosphere/mesos-dns/exchanger.Forwarder) (gotype)
resolver/resolver_test.go:117:4:error: cannot use Message(Question("chronos.marathon.mesos.", dns.TypeA), Header(true, dns.RcodeSuccess), Answers(A(RRHeader("chronos.marathon.mesos.", dns.TypeA, 60), net.ParseIP("1.2.3.11")))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:126:4:error: cannot use Message(Question("cHrOnOs.MARATHON.mesoS.", dns.TypeA), Header(true, dns.RcodeSuccess), Answers(A(RRHeader("chronos.marathon.mesos.", dns.TypeA, 60), net.ParseIP("1.2.3.11")))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:135:4:error: cannot use Message(Question("_liquor-store._tcp.marathon.mesos.", dns.TypeSRV), Header(true, dns.RcodeSuccess), Answers(SRV(RRHeader("_liquor-store._tcp.marathon.mesos.", dns.TypeSRV, 60), "liquor-store-4dfjd-0.marathon.mesos.", 443, 0, 0), SRV(RRHeader("_liquor-store._tcp.marathon.mesos.", dns.TypeSRV, 60), "liquor-store-zasmd-1.marathon.mesos.", 80, 0, 0), SRV(RRHeader("_liquor-store._tcp.marathon.mesos.", dns.TypeSRV, 60), "liquor-store-zasmd-1.marathon.mesos.", 443, 0, 0), SRV(RRHeader("_liquor-store._tcp.marathon.mesos.", dns.TypeSRV, 60), "liquor-store-4dfjd-0.marathon.mesos.", 80, 0, 0)), Extras(A(RRHeader("liquor-store-4dfjd-0.marathon.mesos.", dns.TypeA, 60), net.ParseIP("10.3.0.1")), A(RRHeader("liquor-store-zasmd-1.marathon.mesos.", dns.TypeA, 60), net.ParseIP("10.3.0.2")))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:155:4:error: cannot use Message(Question("_car-store._udp.marathon.mesos.", dns.TypeSRV), Header(true, dns.RcodeSuccess), Answers(SRV(RRHeader("_car-store._udp.marathon.mesos.", dns.TypeSRV, 60), "car-store-zinaz-0.marathon.slave.mesos.", 31365, 0, 0), SRV(RRHeader("_car-store._udp.marathon.mesos.", dns.TypeSRV, 60), "car-store-zinaz-0.marathon.slave.mesos.", 31364, 0, 0)), Extras(A(RRHeader("car-store-zinaz-0.marathon.slave.mesos.", dns.TypeA, 60), net.ParseIP("1.2.3.11")))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:169:4:error: cannot use Message(Question("_car-store._udp.marathon.mesos.", dns.TypeA), Header(true, dns.RcodeSuccess), NSs(SOA(RRHeader("_car-store._udp.marathon.mesos.", dns.TypeSOA, 60), "ns1.mesos", "root.ns1.mesos", 60))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:178:4:error: cannot use Message(Question("non-existing.mesos.", dns.TypeSOA), Header(true, dns.RcodeSuccess), NSs(SOA(RRHeader("non-existing.mesos.", dns.TypeSOA, 60), "ns1.mesos", "root.ns1.mesos", 60))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:187:4:error: cannot use Message(Question("non-existing.mesos.", dns.TypeNS), Header(true, dns.RcodeSuccess), NSs(NS(RRHeader("non-existing.mesos.", dns.TypeNS, 60), "ns1.mesos"))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:195:4:error: cannot use Message(Question("missing.mesos.", dns.TypeA), Header(true, dns.RcodeNameError), NSs(SOA(RRHeader("missing.mesos.", dns.TypeSOA, 60), "ns1.mesos", "root.ns1.mesos", 60))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:204:4:error: cannot use Message(Question("chronos.marathon.mesos.", dns.TypeAAAA), Header(true, dns.RcodeSuccess), NSs(SOA(RRHeader("chronos.marathon.mesos.", dns.TypeSOA, 60), "ns1.mesos", "root.ns1.mesos", 60))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:213:4:error: cannot use Message(Question("missing.mesos.", dns.TypeAAAA), Header(true, dns.RcodeSuccess), NSs(SOA(RRHeader("missing.mesos.", dns.TypeSOA, 60), "ns1.mesos", "root.ns1.mesos", 60))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:222:4:error: cannot use Message(Question("google.com.", dns.TypeA), Header(false, dns.RcodeSuccess), Answers(A(RRHeader("google.com.", dns.TypeA, 60), net.ParseIP("1.1.1.1")), A(RRHeader("google.com.", dns.TypeA, 60), net.ParseIP("2.2.2.2")))) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver_test.go:231:18:error: cannot pass argument &rw (value of type *github.com/mesosphere/mesos-dns/dnstest.ResponseRecorder) to parameter of type github.com/miekg/dns.ResponseWriter (gotype)
resolver/resolver_test.go:232:41:error: cannot use got (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) as *github.com/miekg/dns.Msg value in struct literal (gotype)
resolver/resolver.go:150:54:error: cannot use ... in call to non-variadic records.NewRecordGenerator (gotype)
resolver/resolver.go:265:20:error: cannot pass argument r (variable of type *github.com/miekg/dns.Msg) to parameter of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg (gotype)
resolver/resolver.go:267:7:error: cannot assign new(dns.Msg).SetRcode(r, rcode(err)) (value of type *github.com/miekg/dns.Msg) to m (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) (gotype)
resolver/resolver.go:271:11:error: cannot pass argument m (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) to parameter of type *github.com/miekg/dns.Msg (gotype)
resolver/resolver_test.go:444:11:error: cannot pass argument genA(50) (value of type []github.com/miekg/dns.RR) to parameter of type []github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.RR (gotype)
resolver/resolver_test.go:446:18:error: cannot pass argument m (variable of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.Msg) to parameter of type *github.com/miekg/dns.Msg (gotype)
resolver/resolver_test.go:454:16:error: cannot assign A(RRHeader("example.com.", dns.TypeA, 60), ip) (value of type *github.com/mesosphere/mesos-dns/vendor/github.com/miekg/dns.A) to records[i] (variable of type github.com/miekg/dns.RR) (gotype)
resolver/resolver.go:40:24:error: Option not declared by package records (gotype)
resolver/resolver.go:41:3:error: WithConfig not declared by package records (gotype)
resolver/resolver.go:43:64:error: cannot use ... in call to non-variadic records.NewRecordGenerator (gotype)
resolver/resolver.go:73:4:error: cannot pass argument &(dns.Client literal) (value of type *github.com/miekg/dns.Client) to parameter of type github.com/mesosphere/mesos-dns/exchanger.Exchanger (gotype)
^Cmake: *** [metalinter] Error 2
sargun commented 8 years ago

New error:

# cd /Users/sdhillon/go/gopath/src/github.com/pborman/uuid; git pull --ff-only
From https://github.com/pborman/uuid
 * [new branch]      marshal    -> origin/marshal
   cccd189..b984ec7  master     -> origin/master
 * [new tag]         v1.0       -> v1.0
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/pborman/uuid: exit status 1
make: *** [deps] Error 1
insequent commented 8 years ago

Hey @sargun, I think you might have commented here by mistake? I don't see how you could end up in github.com/pborman/uuid from this PR's makefile.

EDIT: Since you haven't responded in a while, I looked again. Looks like github.com/pborman/uuid is a part of go get -u github.com/mattn/goveralls. If that particular go get is failing for you, I don't believe the issue is with this makefile, but something with your setup. You may want to troubleshoot getting that command working by itself first. If you think there's a better way to do that as well, we're certainly open to suggestions.

sargun commented 8 years ago

@insequent So, I can run that command directly, but when I try to run the Makefile, it doesn't work. I'm using MacOS 10.11.

Is there a way that we can make godeps pull this instead, and use the godeps version?

insequent commented 8 years ago

@sargun I apologize for the delay in responding. There's been some pretty drastic changes in the direction for our team, and it's complicated further by bradbeam being out on paternity leave.

I don't believe we're going to continue pushing for upstreaming these changes in mesos-dns. This makefile should be pretty easy to change for your use if you wish to continue, however the swappable backend needs some love ( aka https://github.com/mesosphere/mesos-dns/pull/464). Again, I apologize for the abrupt exit. Feel free to hit us up if you have any further questions.