Closed vrslev closed 1 month ago
I will merge and release now, if you have objections or suggestions, add a comment. Thanks!
All modified and coverable lines are covered by tests :white_check_mark:
Flag | Coverage Δ | |
---|---|---|
unittests | 98.28% <100.00%> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files with missing lines | Coverage Δ | |
---|---|---|
microbootstrap/settings.py | 100.00% <100.00%> (ø) |
Why do you want to change it? By default, we launch service in debug mode, because first launch is all about development
This PR is relevant to #20 and actually does what that pr says
You've OKaid it before: https://github.com/community-of-python/microbootstrap/pull/20#issuecomment-2405870416
On the "why": I guess there's no right way to do it. I like when a software component is ready for production out-of-the-box.
Still, DX is important. And we should decide what is more important: starting with development right away, or making sure not to f-up when deploying to production
Yeah, but now this does not strike me as a logical solution. I think, one can be confused if he sends requests and does not receive any logs, cause memory logger works that way in non-debug mode. Also in debug mode you can see beautified table of enabled/disabled instruments, which can help in package understanding. I think, package should be a little bit more friendly to those, who is not familiar with our ecosystem. If this was innersource - no problem, but it isn't
Okay, but what would be the best practice for where to set service_debug
to false?
I think opensource is about ease of use and intuitive behavior. If we disable debug mode, this could led to confusion. Let the user disable it himself
but what would be the best practice for where to set service_debug to false?
I don't think it fits well in ServiceSettings
Should we enable reload by default as well then?
We've decided to set service_debug
and reload
to True by default
@insani7y has convinced me that the DX is more important in case of microbootstrap. It would be much more intuitive for newcomers
Actually disable debug by default.BaseServiceSettings
has to go first to make sure the default settings defined there are not overwritten.