Skip to content
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

Config restructuring #771

Merged
merged 14 commits into from
Dec 2, 2022
Merged

Conversation

kwitsch
Copy link
Collaborator

@kwitsch kwitsch commented Nov 26, 2022

To declutter the global top level config options i propose the grouping of ports and logging options as child options of top level options.

Example:

ports:
  dns: 43
  http: 4000
  https: 4443
  tls: 853

log:
  level: warn
  format: json
  privacy: true
  timestamp: false

Full backward compatibility is provided through validateConfig and subsequently fixDeprecatedLog and fixDeprecatedPorts.

The documentation an unit tests are modified to use the new structure as default.

@kwitsch kwitsch requested a review from 0xERR0R November 26, 2022 00:09
@codecov
Copy link

codecov bot commented Nov 26, 2022

Codecov Report

Base: 92.93% // Head: 93.04% // Increases project coverage by +0.11% 🎉

Coverage data is based on head (03063e4) compared to base (4ad7670).
Patch coverage: 98.41% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #771      +/-   ##
===============================================
+ Coverage        92.93%   93.04%   +0.11%     
===============================================
  Files               41       41              
  Lines             4697     4744      +47     
===============================================
+ Hits              4365     4414      +49     
+ Misses             263      261       -2     
  Partials            69       69              
Impacted Files Coverage Δ
util/common.go 97.41% <0.00%> (ø)
cmd/root.go 61.29% <100.00%> (ø)
cmd/serve.go 63.79% <100.00%> (ø)
config/config.go 90.00% <100.00%> (+1.26%) ⬆️
server/server.go 79.41% <100.00%> (ø)
redis/redis.go 93.23% <0.00%> (+0.96%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@0xERR0R 0xERR0R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks very good!

docs/config.yml Outdated Show resolved Hide resolved
docs/config.yml Outdated Show resolved Hide resolved
kwitsch and others added 3 commits November 26, 2022 22:33
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
@0xERR0R 0xERR0R added the 🔨 enhancement New feature or request label Nov 28, 2022
@0xERR0R 0xERR0R added this to the 0.21 milestone Nov 28, 2022
@0xERR0R 0xERR0R added the 🧰 technical debts Technical debts, refactoring label Nov 28, 2022
@kwitsch
Copy link
Collaborator Author

kwitsch commented Dec 2, 2022

@0xERR0R ok i tried to resolve merge conflicts before merging but now the e2e test fails, did i do something wrong O.o
nevermind got it 🤦‍♂️

@kwitsch kwitsch merged commit b73cd3b into 0xERR0R:development Dec 2, 2022
@kwitsch kwitsch deleted the fb-config_restructuring branch December 2, 2022 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement New feature or request 🧰 technical debts Technical debts, refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants