-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Support for multiple configuration files #534
Conversation
Interesting, test fails on something that hasn't been changed. @0xERR0R Any ideas? |
Codecov Report
@@ Coverage Diff @@
## development #534 +/- ##
===============================================
- Coverage 93.73% 93.51% -0.22%
===============================================
Files 36 36
Lines 3112 3131 +19
===============================================
+ Hits 2917 2928 +11
- Misses 145 149 +4
- Partials 50 54 +4
Continue to review full report at Codecov.
|
Is a flaky test which I can't reproduce locally ;( |
I created an issue to track it: #537 |
Thanks for your work! If I understand your idea right, splitted files should contain distinct part of the target YAML. I mean, basically, all YAMLs in the directory will be concatenated together to a big target file. That means, there is no logical "merge" with attribute overwrite between pieces, right? So following would (probably?) fail: upstream:
default:
- 5.9.164.112
- 1.1.1.1 config2.yaml upstream:
someclient:
- 1.2.3.4 I think, it can be a useful use case to separate config files per client or to split the blacklist configuration, but it could be technically difficult to merge the parts correct together (we have nested maps of maps in the config). What do you think? Maybe we can leave it (take your implementation) but improve the documentation, so that it becomes clear that all config parts should have no overlapping. In this case it doesn't matter if the files are read in the alphabetically order or not. |
Exactly, current functionality assumes no parts of config will overlap and as you point out, it will fail the YAML unmarshal, if it does overlap. I'll amend the documentation, to make it more clear. |
I think it would be better to support |
This adds support for multiple configuration files (in a single directory), as proposed in #512.