-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
[🐛 BUG]: Config for RPC plugin does not work when included from another file #2017
Comments
Hey @Kaspiman 👋 |
As discused in Discord, this is a problem for me as well. I'm loading different paths/routes in my application depending on domain, which requires separate RR nodes. To simplify config, I use a parent config with this: version: "3"
rpc:
listen: tcp://127.0.0.1:6010
kv:
roadrunner:
driver: memory
config: {}
http:
address: 0.0.0.0:8080
pool:
allocate_timeout: 60s
num_workers: 2
logs:
level: debug
mode: development And a child config like version: "3"
server:
command: "php app-with-domain-specific-routes.php"
include:
- .rr.yaml But loading the
Having |
@rustatian Hi, maybe you have a little time for this bug? |
@Kaspiman Yes, sure, currently working on it. |
Ok, @nickdnk , I'll update the docs to handle this case with the memory driver, without forking viper, I can't find a way to get this key. |
You could consider just not requiring the config object at all since it doesn't do anything. Of course, this means if-else'ing where you load drivers to check if the type is kv memory. |
Yeah, and that what I'm trying to avoid. To have some special behavior for different drivers. I'm thinking about just mentioning this in docs, but, you know, this is not a super expected behavior. |
Ok, I've resolved this case with the in-memory KV plugin. Drivers now are solely responsible for the configuration parsing and sending errors in case of the empty configuration. Since there is no configuration at all in the in-memory plugin, it'll send a warning, that key was not found, but it'll be running since it does not require configuration. |
No duplicates 🥲.
What happened?
When splitting configs, forwarding the
rpc.listen
field or something like that doesn't work. The error says that the address is not specified, although I assume that the plugin did not start or the config cannot be read.Version (rr --version)
rr version 2024.2.1 (build time: 2024-09-12T16:25:02+0000, go1.23.1), OS: linux, arch: amd64
How to reproduce the issue?
.rr.base.yaml
:.rr.yaml
:then run
rr workers
Relevant log output
The text was updated successfully, but these errors were encountered: