-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): Fix connection lifetime default and variable names. (#6509
) The apiserver config parser uses `viper.GetDuration` to parse the mysql connection lifetime variable. The `viper.GetDuration` function uses `cast.ToDuration`, which uses `cast.ToDurationE`, which assumes durations to be in nanoseconds if they don't explictly include a unit. Since the default lifetime in the kustomize manifest is `120`, we expire connections after 120ns, which is probably unintended. To make this more clear, this patch includes duration units in the default values, and drops the `Secs` suffix from the configuration variables, since the code doesn't assume that durations are in seconds. See https://github.com/spf13/cast/blob/22b2b540ce2e240dd3565d1238df82136be02051/caste.go#L68-L72.
- Loading branch information
Showing
4 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters