Commit Graph

26 Commits

Author SHA1 Message Date
Thomas Anderson e99c98b4c2
feat: log the rule which is the cause of blocking (#1460)
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2024-04-24 12:58:29 -04:00
Kwitsch debac9eaa8
Refactoring/linter (#1447)
* update golangci-lint to v1.57.2

* linter fixes
2024-04-12 16:44:50 -04:00
ThinkChaos 321680250a style(tests): `Should(Not(x))` -> `ShouldNot(x)` 2023-12-01 15:53:11 -05:00
ThinkChaos eae99ec550 refactor: make use of contexts in more places
- `CacheControl.FlushCaches`
- `Querier.Query`
- `Resolver.Resolve`

Besides all the API churn, this leads to `ParallelBestResolver`,
`StrictResolver` and `UpstreamResolver` simplification: timeouts only
need to be setup in one place, `UpstreamResolver`.

We also benefit from using HTTP request contexts, so if the client
closes the connection we stop processing on our side.
2023-11-21 12:21:35 -05:00
ThinkChaos d52c598546
fix(tests): properly silence log output (#1259)
* fix(tests): properly silence log output

Using `init` allows it to also work for benchmarks.
And `log.Silence` was sometimes getting overridden by `log.init`.

* squash: fix(server): don't setup the logger again
2023-11-19 17:51:49 -05:00
ThinkChaos b498bc5094
feat(lists): add support for wildcard lists using a custom Trie (#1233) 2023-11-17 15:58:35 +01:00
Kwitsch 8ece708fe9
devcontainer & unit test refactoring (#1220)
* extension cleanup & added ginkgo watch

* added gcov2lcov

* added test explorer and reworked scripts

* go mod tidy

* use package cache volume

* script rework

* defined tasks

* defined launch

* don't try to convert if test was canceld

* generate lcov only in devcontainer

* disable coverage upload on forks

* wip: make lcov

* fixed unit tests for parallel

* parallel test for lists

* fix serve test for parallel

* parallel test fixes

* deleted accident commit

* wip: make lcov

* restructured settings location

* start script refactoring

* added GetProcessPort

* fixed parallel ports

* race fix

* changed port for github runner binding

* fixed local list var in test

* more local vars in tests fix

* less local vars

* run test & race parallel

* removed invalid error check

* fixed error  check

* less local variables

* fixed timing problem

* removed gcov2lcov

* added generate-lcov

* added GINKGO_PROCS to makefile

* fixed workflow

* run generate-lcov on save *.go

* added tooltitude
2023-11-11 11:58:31 -05:00
Dimitri Herzog 33ea933015
refactor: pass context for goroutine shutdown (#1187) 2023-10-07 16:21:40 -04:00
Dimitri Herzog d77f0ed54f
feat: add API endpoint to flush the DNS Cache (#1178) 2023-09-30 16:13:01 -04:00
Dimitri Herzog 497bd0d0fd
chore(refactor): refactor cache implementation (#1174)
* chore(refactor): refactor cache implementation

* chore: use atomic.Uint32 as prefetch names query count

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>

---------

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2023-09-30 17:14:59 +02:00
Kwitsch 68a8476e48
chore(build): Automation workflows (#972)
* Added fork sync workflow(syncs the main branch with upstream every 30 minutes)
* Added monthly workflow run deletion(all skipped or canceld and runs older than 30days will be deleted)
* Removed Docker image build for main branch on forks
* Added documentation how to enable sync and docker build workflows
2023-04-03 16:33:16 +02:00
Dimitri Herzog 3b9fd7bafe
refactor: use groupedCache to optimize cache access (#944)
* refactor: use groupedCache to optimize cache access

* refactor: fix review findings
2023-03-27 13:23:01 +02:00
Dimitri Herzog 0157f4ce56
refactor: add generics to ExpiringCache (#933) 2023-03-15 20:32:35 +01:00
ThinkChaos 36160e916e refactor: don't use a regex to check a string cache entry is a regex 2023-02-07 09:35:53 -05:00
Kwitsch 9abeaeddea
Added gofumpt (#805)
* fix linter errors

* added gofumpt

* Makefile cleanup

* gofumpt run

* Update Makefile

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>

* go mod tidy

* fmt + lint

* go mod tidy

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2022-12-26 22:11:45 +01:00
Dimitri Herzog f78a57a94d
chore(build): add additional linters (#774)
* chore(build): add nolintlint linter

* chore(build): add usestdlibvars linter
2022-11-29 21:58:26 +01:00
Dimitri Herzog 48dbc5bc13 update: github.com/onsi/gomega 2022-09-03 23:43:26 +02:00
Dimitri Herzog 2aee3cec9b improved LRU cache operations (avoid expensive iteration in TotalCount) 2022-06-03 22:29:41 +02:00
Dimitri Herzog fd8c61c57c improved LRU cache operations (avoid write lock on TotalCount) 2022-06-02 22:58:52 +02:00
Dimitri Herzog 6772438760
Memory optimization internal blacklist/whitelist cache (#513) (#514) 2022-05-12 12:05:05 +02:00
Dimitri Herzog a4b89537db
update golangci-lint (#510)
* update golangci-lint

* enable gomnd linter

* enable asciicheck linter

* enable bidichk linter

* enable durationcheck linter

* enable errchkjson linter

* enable errorlint linter

* enable exhaustive linter

* enable gomoddirectives linter

* enable gomodguard guard

* enable grouper linter

* enable grouper and ifshort linters

* enable importas linter

* enable makezero linter

* enable nestif linter

* enable nilerr linter

* enable nilnil linter

* enable nlreturn linter

* enable nolintlint linter

* enable predeclared linter

* enable sqlclosecheck linter

* enable tenv linter

* enable wastedassign linter
2022-05-10 09:09:50 +02:00
Dimitri Herzog 41febafd41
chore: test cleanup and refactoring (#509)
test: added additional assertions, introduced channels for bus event tests, refactoring, eliminating race conditions in tests, enable race check in tests
2022-05-06 22:34:08 +02:00
ThinkChaos 62c7816ab3
Support of DoH/DoT as bootstrap DNS (#485) 2022-04-22 22:12:35 +02:00
Dimitri Herzog 108d5ba9f7 test: increased the timeout 2022-03-22 22:11:13 +01:00
ThinkChaos 27c8cbf2b7
Update to gingko v2 (#447) 2022-03-03 11:27:27 +01:00
Dimitri Herzog 759f55d89c
Rewrite DNS response cache (#378) (#413) 2022-01-20 16:45:29 +01:00