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

go get fails #29

Open
chris-edwards-pub opened this issue Oct 24, 2023 · 5 comments
Open

go get fails #29

chris-edwards-pub opened this issue Oct 24, 2023 · 5 comments

Comments

@chris-edwards-pub
Copy link

I am having an issue with "go get github.com/coredns/alternate" It looks like its failing to find the proxy plugin.

github.com/coredns/coredns/plugin/pkg/proxy: cannot find module providing package github.com/coredns/coredns/plugin/pkg/proxy

#12 [builder  8/12] RUN echo "alternate:github.com/coredns/alternate" >> /go/coredns/plugin.cfg
#12 DONE 0.3s

#13 [builder  9/12] RUN go get github.com/coredns/alternate
#13 1.962 go: downloading github.com/coredns/alternate v0.0.0-20230808153232-6204d80011e7
#13 74.71 go: downloading github.com/miekg/dns v1.1.55
#13 74.71 go: downloading golang.org/x/net v0.14.0
#13 74.72 go: downloading google.golang.org/grpc v1.57.0
#13 74.73 go: downloading github.com/prometheus/client_golang v1.16.0
#13 74.74 go: downloading github.com/dnstap/golang-dnstap v0.4.0
#13 75.29 go: downloading google.golang.org/protobuf v1.31.0
#13 75.49 go: downloading golang.org/x/sys v0.11.0
#13 75.49 go: downloading github.com/farsightsec/golang-framestream v0.3.0
#13 75.50 go: downloading golang.org/x/tools v0.9.1
#13 75.64 go: downloading github.com/cespare/xxhash/v2 v2.2.0
#13 75.64 go: downloading github.com/prometheus/client_model v0.4.0
#13 75.64 go: downloading github.com/prometheus/common v0.44.0
#13 75.86 go: downloading github.com/prometheus/procfs v0.10.1
#13 75.89 go: downloading google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130
#13 75.90 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.4
#13 75.99 go: downloading github.com/golang/protobuf v1.5.3
#13 76.07 go: downloading golang.org/x/text v0.12.0
#13 76.57 go: downloading golang.org/x/mod v0.10.0
#13 77.31 go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230720185612-659f7aaaa771
#13 82.04 go: github.com/coredns/alternate imports
#13 82.04       github.com/coredns/coredns/plugin/pkg/proxy: cannot find module providing package github.com/coredns/coredns/plugin/pkg/proxy
#13 82.43 go: downloading cloud.google.com/go/compute v1.20.1
#13 82.48 go: downloading github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
#13 82.48 go: downloading github.com/Azure/go-autorest/autorest v0.11.29
#13 82.48 go: downloading github.com/Azure/go-autorest/autorest/adal v0.9.22
#13 82.48 go: downloading github.com/Azure/go-autorest/autorest/azure/auth v0.5.12
#13 82.60 go: downloading github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.1
#13 82.60 go: downloading github.com/DataDog/datadog-go/v5 v5.1.1
#13 82.60 go: downloading github.com/Microsoft/go-winio v0.5.2
#13 82.67 go: downloading github.com/antonmedv/expr v1.12.7
#13 82.67 go: downloading github.com/aws/aws-sdk-go v1.44.317
#13 82.68 go: downloading github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534
#13 82.69 go: downloading github.com/dustin/go-humanize v1.0.1
#13 82.73 go: downloading github.com/emicklei/go-restful/v3 v3.10.2
#13 82.75 go: downloading github.com/go-logr/logr v1.2.4
#13 82.76 go: downloading github.com/go-openapi/jsonpointer v0.19.6
#13 82.97 go: downloading github.com/go-openapi/jsonreference v0.20.1
#13 82.98 go: downloading github.com/go-openapi/swag v0.22.3
#13 83.04 go: downloading github.com/golang-jwt/jwt/v4 v4.5.0
#13 83.04 go: downloading github.com/golang/glog v1.1.0
#13 83.05 go: downloading github.com/google/go-cmp v0.5.9
#13 83.10 go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.5
#13 83.10 go: downloading github.com/googleapis/gax-go/v2 v2.12.0
#13 83.10 go: downloading github.com/kr/pretty v0.3.1
#13 83.12 go: downloading github.com/onsi/ginkgo/v2 v2.9.5
#13 83.17 go: downloading github.com/onsi/gomega v1.27.6
#13 83.18 go: downloading github.com/openzipkin-contrib/zipkin-go-opentracing v0.5.0
#13 83.25 go: downloading github.com/openzipkin/zipkin-go v0.4.1
#13 83.26 go: downloading github.com/oschwald/geoip2-golang v1.9.0
#13 83.27 go: downloading github.com/oschwald/maxminddb-golang v1.11.0
#13 83.28 go: downloading github.com/philhofer/fwd v1.1.2
#13 83.32 go: downloading github.com/stretchr/objx v0.5.0
#13 83.33 go: downloading github.com/stretchr/testify v1.8.4
#13 83.35 go: downloading github.com/tinylib/msgp v1.1.8
#13 83.38 go: downloading go.etcd.io/etcd/api/v3 v3.5.9
#13 83.42 go: downloading go.etcd.io/etcd/client/pkg/v3 v3.5.9
#13 83.44 go: downloading go.etcd.io/etcd/client/v3 v3.5.9
#13 83.45 go: downloading go.opencensus.io v0.24.0
#13 83.49 go: downloading go.uber.org/atomic v1.11.0
#13 83.53 go: downloading golang.org/x/crypto v0.12.0
#13 83.54 go: downloading golang.org/x/oauth2 v0.10.0
#13 83.57 go: downloading golang.org/x/sync v0.3.0
#13 83.59 go: downloading golang.org/x/term v0.11.0
#13 83.73 go: downloading golang.org/x/time v0.3.0
#13 83.74 go: downloading golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
#13 83.74 go: downloading google.golang.org/api v0.134.0
#13 83.74 go: downloading gopkg.in/DataDog/dd-trace-go.v1 v1.53.0
#13 83.81 go: downloading inet.af/netaddr v0.0.0-20220811202034-502d2d690317
#13 83.81 go: downloading k8s.io/api v0.27.4
#13 83.95 go: downloading k8s.io/apimachinery v0.27.4
#13 84.06 go: downloading k8s.io/client-go v0.27.4
#13 84.38 go: downloading k8s.io/klog/v2 v2.100.1
#13 84.48 go: downloading k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f
#13 84.54 go: downloading k8s.io/utils v0.0.0-20230209194617-a36077c30491
#13 84.68 go: downloading sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
#13 84.76 go: downloading sigs.k8s.io/yaml v1.3.0
#13 ERROR: process "/bin/sh -ec go get github.com/coredns/alternate" did not complete successfully: exit code: 1
------
 > [builder  9/12] RUN go get github.com/coredns/alternate:
83.74 go: downloading gopkg.in/DataDog/dd-trace-go.v1 v1.53.0
83.81 go: downloading inet.af/netaddr v0.0.0-20220811202034-502d2d690317
83.81 go: downloading k8s.io/api v0.27.4
83.95 go: downloading k8s.io/apimachinery v0.27.4
84.06 go: downloading k8s.io/client-go v0.27.4
84.38 go: downloading k8s.io/klog/v2 v2.100.1
84.48 go: downloading k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f
84.54 go: downloading k8s.io/utils v0.0.0-20230209194617-a36077c30491
84.68 go: downloading sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
84.76 go: downloading sigs.k8s.io/yaml v1.3.0
------
Dockerfile:17
--------------------
  15 |     RUN go get github.com/cloud66-oss/coredns_mysql
  16 |     RUN echo "alternate:github.com/coredns/alternate" >> /go/coredns/plugin.cfg
  17 | >>> RUN go get github.com/coredns/alternate
  18 |     RUN go generate
  19 |     RUN CGO_ENABLED=1 go build
--------------------
@chris-edwards-pub
Copy link
Author

chris-edwards-pub commented Oct 24, 2023

It started working fine when I did the "go get github.com/coredns/alternate" before "go get github.com/cloud66-oss/coredns_mysql".

@mayurgorani
Copy link

mayurgorani commented Nov 7, 2023

Getting the same error, I don't have any plugin to add before it or after it
image

@SuperQ
Copy link
Contributor

SuperQ commented Nov 7, 2023

https://github.com/coredns/alternate#building-coredns-with-alternate

$ git diff plugin.cfg
diff --git a/plugin.cfg b/plugin.cfg
index 407a668e..62c41142 100644
--- a/plugin.cfg
+++ b/plugin.cfg
@@ -64,6 +64,7 @@ auto:auto
 secondary:secondary
 etcd:etcd
 loop:loop
+alternate:github.com/coredns/alternate
 forward:forward
 grpc:grpc
 erratic:erratic

@mayurgorani
Copy link

mayurgorani commented Nov 7, 2023

@SuperQ , yes I've added alternate before forward only

@SuperQ
Copy link
Contributor

SuperQ commented Nov 7, 2023

I have cut v0.2.0 with updated Go module dependencies. Please try go generate again. Also make sure your source for CoreDNS is up to date with v1.11.1.

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

No branches or pull requests

3 participants