Commit graph

105 commits

Author SHA1 Message Date
Jason Du
5556180ac6
Repo controlled Go version (#6526)
* Repo controlled Go version

Signed-off-by: xdu31 <jasonxdu@amazon.com>

* Bump to go1.21.8 for CVE update

Signed-off-by: xdu31 <jasonxdu@amazon.com>

---------

Signed-off-by: xdu31 <jasonxdu@amazon.com>
2024-03-07 14:23:13 -05:00
Rahil Bhimjiani
2c0a74fc5c
Makefile: allow to use custom GITCOMMIT & BUILDOPTS (#6384)
?= means If GITCOMMIT/BUILDOPTS is defined then use that otherwise fallback to default

Signed-off-by: Rahil Bhimjiani <rahil3108@gmail.com>
2023-11-05 19:30:00 -08:00
Cyb3r Jak3
f2a6484614
Made it so Makefile will use existing CGO_ENABLED variable (#4975) 2021-11-09 22:12:52 -08:00
Olivier Lemasle
033c341517
Makefile: add go get to install external plugins (#4846)
Fixes #4845

Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com>
2021-09-14 11:35:33 -06:00
Miek Gieben
cd5ee7d1f0
Remove travis and move to github workflow (#4267)
Add github testing workflow, simplify the Makefile because that was
complex because of Travis. Remove the fuzzing, needs to be re-added when
that works properly with go modules (it has been disabled for quite some
time). Multiple builds and files have been added so these tests can all
run in parallel. Our testing now tests a couple of minutes, the codeql
is by far the more expensive.

Move metric's naming test to test/presubmit_test.go

Add longer sleep in the TestAutoAXFR.

Bye bye travis!

Closes: #4266

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-06 14:14:26 +01:00
Zou Nengren
4166dcc2fe
using promauto package to ensure all created metrics are properly registered (#4025)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-07-25 08:06:28 -07:00
Zou Nengren
8647592786
format and add newline (#3969)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-06-24 07:48:39 -07:00
Miek Gieben
f66c2bac25
Remove all shell presubmits (#3631)
This ports the shell presubmit to Go and makes them better; esp the
Errorf/Logf/Fatalf one because it actually parses the code and works of
the AST.

These error will now show up in the travis/circle CI runs where they
belong.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-28 19:07:11 +00:00
Miek Gieben
cd5aeecb43
Makefiles: remove GO111MODULE (#3326)
* Makefiles: remove GO111MODULE

This is the default in 1.13 it can be removed; also make the test out
log less, so failure are more pronounced in the travis out, hide
coverage stats for instance.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Kill -v as wel

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-30 09:01:19 +01:00
Miek Gieben
2332467b87
Fuzz: fix forward build (#3200)
* Fuzz: fix forward build

Signed-off-by: Miek Gieben <miek@miek.nl>

* Flag not released yet, wget quiet

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-08-26 09:33:20 +00:00
Miek Gieben
8bc4b85b1f
fuzz: use new fuzzit (#3193)
Upgrade to new version and add if-not-exists to the cmdline

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-08-26 08:15:05 +00:00
Miek Gieben
6f028d0427
fuzz: some cleanups (#3143)
* fuzz: some cleanups

Signed-off-by: Miek Gieben <miek@miek.nl>

* smaller

Signed-off-by: Miek Gieben <miek@miek.nl>

* documentation

Signed-off-by: Miek Gieben <miek@miek.nl>

* comments

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-08-19 08:06:25 +00:00
Yevgeny Pats
c33fc9e3b0 Add Continuous Fuzzing Integration to Fuzzit (#3093)
This feature introduce continuous fuzzing with the following
features:

* Ruzzing: fuzz-targets are run continuously on master
( the fuzzers are updated every time new code is pushed to master)
* Regresion: In addition to unit-tests travis runs all fuzz
targets through the generated corpus to catch bugs early  on
in the CI process before merge.
2019-08-18 08:40:59 +00:00
Miek Gieben
5cff7d5790
Remove etcd unit testing from travis (#2672)
* Remove etcd unit testing from travis

Remove these from the travis unit testing. (to speed up travis)

See #2671

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add build tag

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-13 07:33:38 +00:00
Yong Tang
9d39ea51a7
Add go mod support (#2503)
* Remove vendor and go-dep

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add go.mod

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update Makefile and .travis.yml

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-03 11:56:26 -08:00
Miek Gieben
2743c8eab1
Upgrade caddy to 0.11.X (#2541)
* Upgrade caddy to 0.11.2

Redo of #2505 (cherry-picked commit)

Signed-off-by: Miek Gieben <miek@miek.nl>

* .4 has been released

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-17 15:11:19 +00:00
Miek Gieben
f59b414a7e Update to dns/1.1.4 (#2521)
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-02 05:08:40 +08:00
Miek Gieben
003355e18e new dns version (#2456)
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-12 04:17:13 -08:00
jmpcyc
c56603ea79 update zplugin.go path && add .PHONY for all target (#2433)
* update zplugin.go path && add .PHONY for all target

* update zplugin.go path && add .PHONY for all target

* update zplugin.go target
2019-01-04 20:09:26 +00:00
Miek Gieben
4f9fade38e new miekg/dns (#2435)
New release, kick of tests.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-04 12:00:50 -08:00
Miek Gieben
fc667b98e0
Fix EDNS0 compliance (#2357)
* Fix EDNS0 compliance

Do SizeAndDo in the server (ScrubWriter) and remove all uses of this
from the plugins. Also *always* do it. This is to get into compliance
for https://dnsflagday.net/.

The pkg/edns0 now exports the EDNS0 options we understand; this is
exported to allow plugins add things there. The *rewrite* plugin used
this to add custom EDNS0 option codes that the server needs to
understand.

This also needs a new release of miekg/dns because it triggered a
race-condition that was basicly there forever.

See:
* https://github.com/miekg/dns/issues/857
* https://github.com/miekg/dns/pull/859

Running a test instance and pointing the https://ednscomp.isc.org/ednscomp
to it shows the tests are now fixed:

~~~
EDNS Compliance Tester
Checking: 'miek.nl' as at 2018-12-01T17:53:15Z

miek.nl. @147.75.204.203 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok
miek.nl. @2604:1380:2002:a000::1 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok

All Ok
Codes
ok - test passed.
~~~

Signed-off-by: Miek Gieben <miek@miek.nl>

Signed-off-by: Miek Gieben <miek@miek.nl>

* typos in comments

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-06 21:18:11 +00:00
Yong Tang
e5f5da4297 Update Prometheus to 0.9.1 (#2360)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-12-01 22:38:03 +00:00
Miek Gieben
95c9e14dcf Remove benchmark from travis (#2350)
We're not doing anything with the data so stop doing it. Also makes
travis 20% faster.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-29 12:29:37 -08:00
Miek Gieben
50ef7409d1
Up to DNS version 1.1.0 (#2346)
Upgrade to new dns lib version; that saw multiple improvements; some
patch releases are in the pipeline.

The big thing here is the removal of ErrTruncated, so we need to deal
with this slightly different in the forward plugin. It removed the
entire truncated.go logic and just checks the message for .Truncated (if
there is a message) and retries with tcp.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-29 20:02:32 +00:00
Yong Tang
e94ce7a12a
Update caddy to 0.11.1 (#2321)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-11-19 11:04:33 -08:00
Miek Gieben
1ad002c9f3
dns: bump to 1.0.15 (#2268)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-03 10:01:45 +00:00
Miek Gieben
e8e8187a64
plugin/file: Use new zone parser API (#2219)
* plugin/file: Use new zone parser API

Use new dns lib 1.0.14 and default to using the new zone parser that
does not leak go-routines.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Use new API

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-23 20:19:36 +01:00
Chris O'Haver
49c776df4c
rename VERBOSE to be more generic (#2172) 2018-10-10 09:39:31 -04:00
Chris O'Haver
cbcc38bcb5
add cgo option to Makefile (#2171) 2018-10-09 14:36:42 -04:00
Billie Cleek
e197830245 update Caddy to v0.10.13 (#2154)
Update Caddy to v0.10.13 so that environment variables may be used after
Go template (e.g. in template's answer). v0.11.0 has been released, but
v0.10.13 is a smaller set of changes and has the necessary fix.

Fixes #2153
2018-09-29 23:48:12 +01:00
Manuel Alejandro de Brito Fontes
0e8977761d Dep helper (#2151)
* Add dep task to update go dependencies

* Update go dependencies
2018-09-29 23:47:07 +01:00
Miek Gieben
8f8b81f56b
Update to new version (#2150)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-29 18:18:16 +01:00
Yong Tang
a0396e2673
Add benchmark result to GitHub PR (#2123)
* Add benchmark result to GitHub PR

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Post benchmark to comments

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Test Stuff

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update using jq.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-09-25 15:04:27 -07:00
Miek Gieben
b89006dda1 Use miekg/dns 1.0.10 (#2127)
Update to latest version.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22 12:03:39 -07:00
Miek Gieben
7b40b14e96 Benching (#2121)
* Benchmark stuff

Signed-off-by: Miek Gieben <miek@miek.nl>

* Makefile changes

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fixes

Signed-off-by: Miek Gieben <miek@miek.nl>

* fix

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add benchmark test

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add master branch

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22 07:17:17 -07:00
Miek Gieben
6e1c02c4ac Make presubmit actually fail the build (#2013)
The exit code wasn't properly acted upon in the makefile.
Make filename-hyphen actually return an non-zero exit code.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-29 23:41:52 -07:00
Miek Gieben
395be9adfc
Makefile: remove goimports (#2008)
This downloads gometalinter (which is now breaking in the CI tests).
Also the goimports target is run with ||true, so nothing will break
if this flags anything (done because of gofmt changes in between
release).

Probably I will setup something to use github's linter API:
https://github.com/markstory/lint-review

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-27 15:01:27 +01:00
Miek Gieben
ad8021230c Makefile fixes: (#1892)
Correctly set the path for the presubmits, fix some typos and make
the goimport target do the linting to the lint target can be removed.

Also don't make it a fatal error because gofmt changes between releases.
2018-06-21 04:34:02 -07:00
Miek Gieben
d6288c25ba
Bump dns version to 1.0.8 (#1873)
Bump the version, allows #691 to get merged.
2018-06-13 10:38:24 +01:00
Miek Gieben
4f0b36e57e
Extend presubmit to covert test and request (#1846)
Fix the casing *and* fix use of context as we were still referencing
the non-std lib context - no wondering how this could have worked...
2018-06-01 15:12:49 +01:00
Yong Tang
67c9075331 Enforcing gofmt -s on linter check (#1820)
This fix enforces gofmt -s on linter check in Makefile,
and fixes `plugin/kubernetes/handler_test.go` and
`plugin/tls/tls_test.go` with `gofmt -s`
2018-05-21 09:52:42 -04:00
Yong Tang
a40345d65f Fix make check dependency error (#1818)
While invoking `make check` from a fresh new environment
the following failure occured:
```
[ec2-user@..... coredns]$ docker run -i -t --rm -v $PWD:/go/src/github.com/coredns/coredns -w /go/src/github.com/coredns/coredns golang:1.10
root@e2d6a6c17132:/go/src/github.com/coredns/coredns# make check
** presubmit/context
** presubmit/test-lowercase
( gometalinter --deadline=2m --disable-all --enable=goimports --vendor --exclude=^pb/ ./... || true )
/bin/sh: 1: gometalinter: not found
go generate coredns.go
```

This fix fixes the issue in Makefile so that deps could be installed first.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-05-19 23:03:32 +01:00
Miek Gieben
1e471a353e Dep ensure (#1803)
* vendor: don't vendor the context stuff

We don't need to vendor this anymore as we moved to the std lib for
these.

* new stuff showing up with dep ensure

* remove go-shlex
2018-05-16 13:17:06 -07:00
Miek Gieben
940b7f2e8c
Up miekg/dns to 1.0.6 (#1792)
This was just tagged and has the worker patch that improves performance.
2018-05-10 21:13:36 +01:00
Miek Gieben
41f1a1434a Pr 1770 (#1771)
* make pb

* Makefile for pb

Move the Makefile into the pb directory to remove some clutter from the
main Makefile.
2018-05-05 12:01:17 -04:00
Miek Gieben
3ce4fc8fe4
Do ' go vet' after we have fetch the repos (#1744)
Do ' go vet' after we have fetched the repos
2018-04-26 13:03:31 +01:00
Miek Gieben
c9b5cedbe9 Presubmit (#1719)
* build: add presubmits

We didn't have a way to encode presubmit; with this hack we can just
run a bunch of script on the build; this allows us to automatically
capture things like using the wrong context and maybe other fluff.

This allows us to cut down on code reviews and just have the build fail.

* hook it up

* put presubmit in checks; so we do it for tests as well

* Add explicit exit 1 if things fails
2018-04-23 08:45:49 -07:00
Miek Gieben
cd7928f180 make: default to default go path (#1681)
if GOPATH is not set use $HOME/go which is the current default in Go.

Fixes #1642
2018-04-15 09:14:18 -07:00
Miek Gieben
f5435b3884
make: use dns 1.0.5 (#1649)
Tagged an new release; has some fixes.
2018-04-01 14:29:59 +01:00
Yong Tang
604c0045e7 Update go dep (#1560)
This fix updates go dep with `dep ensure --update` as well as the following:
- Removed github.com/ugorji/go restriction in Gopkg.toml (fixes  #1557)
- Added github.com/flynn/go-shlex in Makefile (neede by Caddy, maybe removed later)

This fix fixes #1557

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-23 20:10:34 +00:00