Kwitsch
976d6198f1
Refactoring server.go ( #1277 )
...
* made Stop context aware
* added error check
* context aware OnRequest
* linter fix
* fixed some flakiness in tests
* made DoGetRequest context aware
* this doesn't belong there and produces flakyness
2023-11-28 07:02:51 +01:00
Kwitsch
fda2dbe9df
Refactoring Redis ( #1271 )
...
* RedisConfig -> Redis
* moved redis config to seperate file
* bugfix in config test during parallel processing
* implement config.Configurable in Redis config
* use Context in GetRedisCache
* use Context in New
* caching resolver test fix
* use Context in PublishEnabled
* use Context in getResponse
* remove ctx field
* bugfix in api interface test
* propperly close channels
* set ruler for go files from 80 to 111
* line break because function length is to long
* only execute redis.New if it is enabled in config
* stabilized flaky tests
* Update config/redis.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* fix ruler
* redis test refactoring
* vscode setting cleanup
* removed else if chain
* Update redis_test.go
* context race fix
* test fail on missing seintinel servers
* cleanup context usage
* cleanup2
* context fixes
* added context util
* disabled nil context rule for tests
* copy paste error ctxSend -> CtxSend
* use util.CtxSend
* fixed comment
* fixed flaky test
* failsafe and tests
---------
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2023-11-27 12:08:31 -05:00
Nahshon Unna Tsameret
15bd383460
ginkgolinter: enable all checks and fix findings ( #1274 )
...
ginkgolinter configuration argument names may be a bit misleading.
Assuming the linter added to use it, this PR remove all the
supress-warning configurations.
Two error checks now found by the linter and fixed as well.
2023-11-26 16:10:38 +01:00
ThinkChaos
270dc178dc
refactor(config): add `TLSVersion` type
2023-11-23 08:45:18 -05:00
ThinkChaos
7d93ffb80c
refactor: remove the `config` global
2023-11-23 08:45:18 -05:00
ThinkChaos
e4be0c0c86
refactor(config): remove `GetConfig` and its last uses
2023-11-23 08:45:18 -05:00
ThinkChaos
23359d1471
style(config): add `config/migration` to `dot-import` allow-list
2023-11-23 08:45:18 -05:00
ThinkChaos
02cf4903f3
refactor(util): use `LogPrivacy` global instead of `GetConfig`
...
A global is a global, but at least this one is more targeted.
2023-11-23 08:45:18 -05:00
ThinkChaos
9760735f3a
refactor(config): move `dohUserAgent` to `upstreams.userAgent`
...
That way it can be accessed without using `GetConfig`
2023-11-23 08:45:18 -05:00
ThinkChaos
4e89b44185
fix(util): make `FatalOnError` override `log.Silence`
2023-11-23 08:45:18 -05:00
ThinkChaos
b386e22ebe
refactor: embed `Upstreams` in `UpstreamGroup` to make values accessible
...
Move `startVerifyUpstream` to `upstreams.startVerify` so it's accessible
via `UpstreamGroup` and we don't need to pass `startVerify` to all
resolver constructors that call `NewUpstreamResolver`.
Also has the nice benefit of greatly reducing the usage of `GetConfig`.
2023-11-23 08:45:18 -05:00
ThinkChaos
08a3df6e64
fix(tests): don't make following requests wait on the first
...
This could cause tests with delays much longer than the timeout to
timeout multiple times in a row just because the first `answerFn` call
was stalled.
2023-11-23 08:45:18 -05:00
ThinkChaos
7feaba48c7
fix(docs): clarify `blocky_error_total` ( #1270 )
...
* fix(docs): clarify `blocky_error_total`
* squash: remove period to match other lines
2023-11-22 15:16:19 +01:00
Kwitsch
e30e852c86
ClientLookupConfig -> ClientLookup
2023-11-21 21:35:41 -05:00
Kwitsch
9a77dcdccc
BlockingConfig -> Blocking
2023-11-21 21:35:41 -05:00
Kwitsch
00d4341271
ConditionalUpstreamConfig -> ConditionalUpstream
2023-11-21 21:35:41 -05:00
Kwitsch
26d5f6215f
CustomDNSConfig -> CustomDNS
2023-11-21 21:35:41 -05:00
Kwitsch
72352a968a
UpstreamsConfig -> Upstreams
2023-11-21 21:35:41 -05:00
ThinkChaos
2c71f91aca
refactor: remove deprecated and no-op `SingleInflight`
2023-11-21 12:21:35 -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
e4ebc16ccc
fix(parallel_best): set `typeName` to "random" when appropriate
2023-11-21 12:21:35 -05:00
Kwitsch
1a1891c8b6
symbol name refactoring ( #1263 )
...
* ECSConfig -> ECS
* EdeConfig -> EDE
* EdeResolver -> EDEResolver
* SUDNConfig -> SUDN
* FqdnOnlyConfig -> FQDNOnly
* FqdnOnlyResolver -> FQDNOnlyResolver
2023-11-21 06:33:38 +01:00
Kwitsch
d37d18348f
EDNS: Client Subnet ( #1007 )
...
* added util for handling EDNS0 options
* disable caching if the request contains a netmask size greater than 1
* added config section for ECS handling and validation for it
*added ecs_resolver for enhancing and cleaning subnet and client IP information
2023-11-20 16:56:56 +01: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
DerRockWolf
94663eeaeb
feat: add upstream strategy `random` ( #1221 )
...
Also simplify code by getting rid of `resolversPerClient` and all surrounding logic.
2023-11-18 15:42:14 -05:00
Dimitri Herzog
4a5a395655
fix: log.privacy option no longer hides domain names being resolved ( #1255 )
2023-11-17 15:59:22 +01:00
ThinkChaos
b498bc5094
feat(lists): add support for wildcard lists using a custom Trie ( #1233 )
2023-11-17 15:58:35 +01:00
dependabot[bot]
f1a6fb0014
build(deps): bump github.com/miekg/dns from 1.1.56 to 1.1.57 ( #1253 )
...
Bumps [github.com/miekg/dns](https://github.com/miekg/dns ) from 1.1.56 to 1.1.57.
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release )
- [Commits](https://github.com/miekg/dns/compare/v1.1.56...v1.1.57 )
---
updated-dependencies:
- dependency-name: github.com/miekg/dns
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 10:41:53 +01:00
Kwitsch
6c000090b1
Unit test refactoring & devcontainer enhancement( #1245 )
...
* Whietlist dot imports for test packages
* improved generate-lcov script
* moved mock_call_sequence to helpertest
* removed default config for markdown
* generate seperate lcov.info for each directory
* path fix in lcov generation script
* ginkgo -> v2.13.1
* fixed redundant strings
* added exampleComKey
* added folder name to finish message
* hide lcov.info in devcontainer
* coverage plugin is bugged if lcov file is excluded
* moved all lcov files to coverage folder
* added requested toos #1251
2023-11-15 16:42:53 +01:00
dependabot[bot]
7edb856e67
build(deps): bump github.com/oapi-codegen/runtime from 1.0.0 to 1.1.0 ( #1250 )
...
Bumps [github.com/oapi-codegen/runtime](https://github.com/oapi-codegen/runtime ) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/oapi-codegen/runtime/releases )
- [Commits](https://github.com/oapi-codegen/runtime/compare/v1.0.0...v1.1.0 )
---
updated-dependencies:
- dependency-name: github.com/oapi-codegen/runtime
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 14:38:03 +01:00
dependabot[bot]
5fefca5732
build(deps): bump github.com/avast/retry-go/v4 from 4.5.0 to 4.5.1 ( #1249 )
...
Bumps [github.com/avast/retry-go/v4](https://github.com/avast/retry-go ) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/avast/retry-go/releases )
- [Commits](https://github.com/avast/retry-go/compare/4.5.0...4.5.1 )
---
updated-dependencies:
- dependency-name: github.com/avast/retry-go/v4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 08:55:03 +01:00
dependabot[bot]
6448be6667
build(deps): bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.1 ( #1237 )
...
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo ) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/onsi/ginkgo/releases )
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md )
- [Commits](https://github.com/onsi/ginkgo/compare/v2.13.0...v2.13.1 )
---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 08:53:16 +01:00
dependabot[bot]
7f7161f4c1
build(deps): bump github.com/abice/go-enum from 0.5.8 to 0.5.10
...
Bumps [github.com/abice/go-enum](https://github.com/abice/go-enum ) from 0.5.8 to 0.5.10.
- [Release notes](https://github.com/abice/go-enum/releases )
- [Changelog](https://github.com/abice/go-enum/blob/master/.goreleaser.yml )
- [Commits](https://github.com/abice/go-enum/compare/v0.5.8...v0.5.10 )
---
updated-dependencies:
- dependency-name: github.com/abice/go-enum
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-11-14 18:39:23 -05:00
Kwitsch
fb8c4192ab
Bugfix/GitHub workflows ( #1234 )
...
* added github-actions
* removed default config entries
* configured prettier as formatter for github workflows
* runs every day to prevent running into api limits
2023-11-14 17:22:27 -05:00
Kwitsch
7615584944
Feature/ginkgolinter ( #1235 )
...
* add ginkgolinter to golangci config
* fixed ginkgolinter errors
2023-11-12 13:40:55 -05:00
Kwitsch
dc66eff8e9
Bugfix/readme ( #1232 )
...
* delete old runs of frequently run workflows
* run cleanup every day
2023-11-11 19:44:31 -05: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
dependabot[bot]
42d6f21ceb
build(deps): bump golang.org/x/tools from 0.14.0 to 0.15.0 ( #1229 )
...
Bumps [golang.org/x/tools](https://github.com/golang/tools ) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/golang/tools/releases )
- [Commits](https://github.com/golang/tools/compare/v0.14.0...v0.15.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/tools
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-10 09:24:41 +01:00
dependabot[bot]
5e6f6c4e6a
build(deps): bump golang.org/x/net from 0.17.0 to 0.18.0 ( #1230 )
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.18.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 16:54:01 +01:00
dependabot[bot]
ad27adcdeb
build(deps): bump github.com/onsi/gomega from 1.29.0 to 1.30.0 ( #1228 )
...
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega ) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/onsi/gomega/releases )
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md )
- [Commits](https://github.com/onsi/gomega/compare/v1.29.0...v1.30.0 )
---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 12:24:54 +01:00
Kwitsch
d87e6b4157
fix: ANSI color codes being printed on Windows ( #1225 )
...
* added go-colorable
* fixed bug which prevented windows builds
2023-11-08 00:29:53 +01:00
dependabot[bot]
23ce44d457
build(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 ( #1223 )
...
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra ) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/spf13/cobra/releases )
- [Commits](https://github.com/spf13/cobra/compare/v1.7.0...v1.8.0 )
---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 08:18:36 +01:00
dependabot[bot]
68eeebeed4
build(deps): bump github.com/docker/docker ( #1216 )
...
Bumps [github.com/docker/docker](https://github.com/docker/docker ) from 24.0.6+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases )
- [Commits](https://github.com/docker/docker/compare/v24.0.6...v24.0.7 )
---
updated-dependencies:
- dependency-name: github.com/docker/docker
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 08:18:16 +01:00
dependabot[bot]
1aec7d633e
build(deps): bump github.com/testcontainers/testcontainers-go/modules/postgres ( #1214 )
...
Bumps [github.com/testcontainers/testcontainers-go/modules/postgres](https://github.com/testcontainers/testcontainers-go ) from 0.25.0 to 0.26.0.
- [Release notes](https://github.com/testcontainers/testcontainers-go/releases )
- [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.25.0...v0.26.0 )
---
updated-dependencies:
- dependency-name: github.com/testcontainers/testcontainers-go/modules/postgres
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 08:17:54 +01:00
dependabot[bot]
4c62b2ddcf
build(deps): bump github.com/testcontainers/testcontainers-go/modules/mariadb ( #1219 )
...
Bumps [github.com/testcontainers/testcontainers-go/modules/mariadb](https://github.com/testcontainers/testcontainers-go ) from 0.25.0 to 0.26.0.
- [Release notes](https://github.com/testcontainers/testcontainers-go/releases )
- [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.25.0...v0.26.0 )
---
updated-dependencies:
- dependency-name: github.com/testcontainers/testcontainers-go/modules/mariadb
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 14:13:27 +01:00
dependabot[bot]
fd8ee7cf40
build(deps): bump github.com/google/uuid from 1.3.1 to 1.4.0 ( #1218 )
...
Bumps [github.com/google/uuid](https://github.com/google/uuid ) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/google/uuid/releases )
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md )
- [Commits](https://github.com/google/uuid/compare/v1.3.1...v1.4.0 )
---
updated-dependencies:
- dependency-name: github.com/google/uuid
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 11:15:22 +01:00
dependabot[bot]
b2775069b3
build(deps): bump github.com/testcontainers/testcontainers-go/modules/redis ( #1215 )
...
Bumps [github.com/testcontainers/testcontainers-go/modules/redis](https://github.com/testcontainers/testcontainers-go ) from 0.25.0 to 0.26.0.
- [Release notes](https://github.com/testcontainers/testcontainers-go/releases )
- [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.25.0...v0.26.0 )
---
updated-dependencies:
- dependency-name: github.com/testcontainers/testcontainers-go/modules/redis
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 11:15:02 +01:00
dependabot[bot]
5ba1cc27e5
build(deps): bump github.com/onsi/gomega from 1.28.1 to 1.29.0 ( #1213 )
...
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega ) from 1.28.1 to 1.29.0.
- [Release notes](https://github.com/onsi/gomega/releases )
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md )
- [Commits](https://github.com/onsi/gomega/compare/v1.28.1...v1.29.0 )
---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 21:56:34 +02:00
dependabot[bot]
58bfe5acc2
build(deps): bump gorm.io/driver/postgres from 1.5.3 to 1.5.4 ( #1212 )
...
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres ) from 1.5.3 to 1.5.4.
- [Commits](https://github.com/go-gorm/postgres/compare/v1.5.3...v1.5.4 )
---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 21:55:33 +02:00
dependabot[bot]
18be1e99e2
build(deps): bump github.com/deepmap/oapi-codegen from 1.15.0 to 1.16.2 ( #1209 )
...
Bumps [github.com/deepmap/oapi-codegen](https://github.com/deepmap/oapi-codegen ) from 1.15.0 to 1.16.2.
- [Release notes](https://github.com/deepmap/oapi-codegen/releases )
- [Commits](https://github.com/deepmap/oapi-codegen/compare/v1.15.0...v1.16.2 )
---
updated-dependencies:
- dependency-name: github.com/deepmap/oapi-codegen
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 21:55:10 +02:00