-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fix deprecated IdleTimeout config #2143
Conversation
Before the --idletimeout or top level idleTimeout setting in the TOML was not respected anymore and not used. This PR fixes this. Also it changes the semantics so that the legacy option is preferred while issuing a warning about the deprecation when its used.
in order to align the process with RespondingTimeouts.
when no interval is specified but the health check is activated via the config.
@timoreimann as you were also involved in this, do you want to have a look? :) |
Just to be super sure, I'd also test this kind of case: # deprecated option *other* new option specified
idleTimeout="42s"
[respondingTimeouts]
readTimeout="23s" This should cause an effective idle timeout of 42 seconds to be applied. |
Thanks for the note Timo. I verified it successfully and added it in my PR description above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR fixes loading of the deprecated top-level option
IdleTimeout
. Also, it changes the semantics so that the deprecated option is now preferred and a warning is logged when it is used.All the different configuration constellations I also verified via the matching CLI parameters as well.
I tried the following configs and they deliver now the expected results:
# default config, nothing specified
-> default timeout of 30 seconds is used
-> deprecated option of 42 seconds is used
-> deprecated option of 42 seconds is used
-> deprecated option of 42 seconds is used
-> deprecated option of 42 seconds is used
-> new option of 23 seconds is used
While working on this PR I realized that also the health check has "problems" with its default interval, given it is configured in the following way (imho no one would do such a thing, but still...). As this was at related code places as my change I decided to include it in this PR:
-> interval is initialised with 0 and will lead to
Error in Go routine: non-positive interval for NewTicker