Commit Graph

58 Commits

Author SHA1 Message Date
Alessandro (Ale) Segala 59858c49fb
Nameresolvers: add support for ResolveIDMulti (#3284)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2024-01-08 10:17:22 -08:00
Alessandro (Ale) Segala 79adc565c1
SQLite: allow enabling foreign keys in `GetConnectionString` (#3253)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-12-04 21:03:58 +00:00
Bernd Verst 9095b0e7e7
Switch to Go 1.21, Updates linter, updates workflows, adds sarama 1.42.1 (#3251)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-11-28 18:13:09 -08:00
Alessandro (Ale) Segala 934e86c4f7
Rename folder "internal" to "common" (#3225)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-11-14 11:36:38 -08:00
Bernd Verst fe466beaa2
Fix 3204: consul to accept hostnames again (#3211)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-11-06 13:11:51 -08:00
Alessandro (Ale) Segala f4e73b0e65
Update dapr/kit (#3205)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <github@bernd.dev>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-11-02 16:20:56 -07:00
Alessandro (Ale) Segala 8680e2785a
Local file-based name resolver with SQLite (#3178)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Josh van Leeuwen <me@joshvanl.dev>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-11-01 15:49:22 -07:00
Abdulaziz Elsheikh b3436837f2
Consul name resolution in-memory cache (#3121)
Signed-off-by: Abdulaziz Elsheikh <abdulaziz.elsheikh@gmail.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2023-10-13 08:52:54 -07:00
Alessandro (Ale) Segala 81e2e05f38
Remove unused "dns" nameresolver (#3175)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-10-13 07:43:57 -07:00
Artem Bakuta fe5ce08349
[WIP] ipv6 formatting fixed (#3075)
Signed-off-by: Jhoysbou <neeroll21@gmail.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-09-01 21:46:29 +00:00
Yaron Schneider a8aa194329
Add insecureskipverify warnings (#3090)
Signed-off-by: yaron2 <schneider.yaron@live.com>
2023-08-18 16:23:51 +00:00
Alessandro (Ale) Segala 608e4cb8a9
Add appId to consul default checks (re-do of #2490) (#2980)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: AlbertHuang <r.albert.huang@gmail.com>
2023-07-20 10:47:54 -07:00
Alessandro (Ale) Segala d067c13350
Update some dependencies (#2996)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <github@bernd.dev>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-07-18 23:10:53 +00:00
Max Schäfer 7ab8fde494
feat(nameresolution/kubernetes): add ability for templating the dns name resolution (#2883)
Signed-off-by: Max Schäfer <max-schaefer-lg@gmx.de>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2023-06-25 23:36:26 +00:00
Alessandro (Ale) Segala c4567ca2b1
Small perf tweaks to K8s nameresolver (#2703)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-25 01:07:25 +00:00
Alessandro (Ale) Segala 050ee73d61
Remove now-unused metadata properties (#2637)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-06 21:52:58 +00:00
Bernd Verst 4c6a87c7df
Merge branch 'master' into consul-improv 2023-02-24 14:19:55 -08:00
ItalyPaleAle b4aecdfef7 Resolve long-standing TODO in mDNS component
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-24 20:26:28 +00:00
ItalyPaleAle 87a27a437e 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-24 19:13:58 +00:00
ItalyPaleAle 002d77c8ac Reverted changes and fixed tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-24 01:07:17 +00:00
ItalyPaleAle 2cc740cfaf Set DeregisterCriticalServiceAfter
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-24 00:32:26 +00:00
ItalyPaleAle 184aa66543 Fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-24 00:16:40 +00:00
ItalyPaleAle d0a1efaca3 De-register service before attempting to register again
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-23 21:54:16 +00:00
ItalyPaleAle 83717272a2 Significant improvements to shuffling of results
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-23 19:52:40 +00:00
ItalyPaleAle 5e44a2a4e0 Misc fixes to consul nameresolver
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-23 19:45:10 +00:00
ItalyPaleAle 7af9c90735 mdns: shut down on context cancelation and not on signal
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-26 12:15:37 -08:00
zhangzhongliang@kanzhun.com 4cf523bc45 fix kubernetes nameresolution customize configuration 2022-11-08 16:19:55 +08:00
ItalyPaleAle 286856ed70 Fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-25 18:06:49 +00:00
ItalyPaleAle b9265ea3a9 Fixes to mDNS resolver
1. If the host doesn't support IPv6 (or supports only IPv6), allow the client to resolve IPs
2. Do not re-create a resolver in the hot path every time, but only if there's an error
3. Better concurrency handling with picking an address from the list via round-robin
4. Use one less background goroutine

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-24 23:58:14 +00:00
Crypt Keeper b379f80b75
middleware: changes wasm basic to use waPC (#1833)
Updates wasm basic middleware and simplifies some code inside of it,
notably by using [waPC](https://github.com/wapc/wapc-go).

This changes the entrypoint function to be named "rewrite" and
uses a pool because known memory allocators are not goroutine
safe.

Signed-off-by: Adrian Cole <adrian@tetrate.io>

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2022-09-13 17:12:59 -07:00
Alessandro (Ale) Segala bcea284c7b
Components' init functions should return interfaces (#1997)
* Components' init functions should return interfaces

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* pin latest berndverst contrib fork

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Fixed component registration in tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated all cert tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-25 18:27:45 -07:00
Marcos Candeia 8964d8bf41
Define common metadata across components (#1994)
* Add base metadata for all components

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Fix lint issues on consul and mysql tests

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Pin candeia/dapr runtime version

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Add replace directive to use mcandeia/dapr on all go submodules

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Fixed runtime config instantiation

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
2022-08-25 10:10:53 -07:00
Bernd Verst e87cd5e4cb
Go 1.19 support and linter fixes (#1975)
* Go 1.19 support and linter fixes

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update workflows for Go1.19 and new linter version

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Remove unnecessary space in nolint directive

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* disable additional linters which aren't used because of Go generics

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* enable gosec linter again

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/zeebe/command/publish_message_test.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/output_binding.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Use prepared statement for mysql table creation

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Ping is not ping

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* c'mon linter

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Fix MySQL gosec issue

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* revert mysql to be fixed later

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-18 00:45:23 -07:00
Alessandro (Ale) Segala 4bf6cc4ca6
Updated development docs (#1835)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-06-30 22:23:41 -07:00
shiling02404 6d0636ebab
add id when registering services to consul (#1802) 2022-06-21 06:41:07 -07:00
Alessandro (Ale) Segala e6c67356cd
Updated to Go 1.18 (#1697)
* Updated to Go 1.18

Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>

* Added go.work file
With Go 1.18, this allows gopls (the Go language server used for example in VS Code) to work inside test apps too.
See: https://go.dev/doc/tutorial/workspaces

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Removed go.work

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-05-06 13:44:45 -07:00
Wang Bing db99b43068
Use revive instead of golint (#1685)
Signed-off-by: pigletfly <wangbing.adam@gmail.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-05-06 12:55:17 -07:00
Phil Kedy 195901f1b3
Add size to channel to fix blocking when .Close is called. (#1632)
Signed-off-by: Phil Kedy <phil.kedy@gmail.com>
2022-04-01 08:20:43 -07:00
Joni Collinge addb2f57bf
update mdns name resolver to resolve feedback (#1607)
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-03-21 15:04:07 -07:00
Joni Collinge fe96d92bdc
Sync mDNS first browse (#1591)
* add waiter pool for first browse

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* remove waiter

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* fix up refresh channel and test

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* add more tests

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* update comments

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* push to done chan on early error

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* add closer and stop goroutine leaks in tests

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* go mod tidy

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* increase make test timeout

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* provide fallback if subscriber never receives from chans

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* use counter for sub id and drain results on context done

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* reduce concurrent test iterations to 1000

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* add comment to explain expected behaviour

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* do not remove subscribers, clear them at the end

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* update outdated comment

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* reduce concurrent test iterations to 1000

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* run cleanup in background

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* reduce concurrent test iterations to 100

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* update comment to explain cache recheck better

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
2022-03-21 09:18:56 -07:00
Bernd Verst f06254f8f4 Update Consul API to v1.11.0
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-03-14 13:36:59 -07:00
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
Joni Collinge e457b307b6
Improve mDNS nameresolver code quality (#1179)
* remove benchmark

* explicitly use zero value

* initialize slice to 0 len

* fix loop closure

* use basic int for counter

* reduce diff

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-10-06 12:16:40 -07:00
Long Dai 988fed05ab
ci: standard linter config (#1102)
* ci: standard linter config

Signed-off-by: Long <long.dai@intel.com>

* Update utils.go

* fix pulsar issue

Signed-off-by: Long <long.dai@intel.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-21 15:21:59 -07:00
Phil Kedy 8e6b36ecdf
Importing the retry and config packages from kit instead of internal (#940)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-06-22 09:38:55 -07:00
Phil Kedy a28587ed98
Resolving gofumpt issues (#932) 2021-06-09 15:18:50 -07:00
Abdulaziz Elsheikh 92846ab691
nr_consul_typo fixed malformed yaml (#907)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-06-04 12:27:36 -07:00
Long Dai 4ee732e0bd
ci: enable gofumt linter (#887)
Signed-off-by: Long Dai <long0dai@foxmail.com>
2021-05-27 22:21:24 -07:00
Phil Kedy 1b30e75e60
Configurable retry (#854)
* no message

* Switching over usages of retry to the new package and making use of the DecodeConfig function

* Added decoding configuration using settings with a specific prefix

* Linter fixes

* Fixing linter error

* time.Sleep is the enemy

* Fix typo in comment

* Moving config to a pointer parameter so that the component can pass in the config with default values that make sense for that component.

* Renamed config struct

* Fix comment

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-05-06 09:43:57 -07:00
meijin 8ea1f1bb44
fix calc ipv6num use ipv4 slice (#838)
Co-authored-by: Charlie Stanley <charlie.stanley@microsoft.com>
2021-05-04 18:25:19 -07:00