-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
env variables for ACTION_HISTORY limits #1262
Conversation
b079a17
to
65478d9
Compare
AppSettings seems more future-proof and already raises error when passed value is not a number. We also introduce minValue and maxValue so we can constraint the configured value to be within a certain range and avoid erratic behavior when the value has not been expected.
Co-authored-by: Vincent Viers <[email protected]>
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 except for 1 typo
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.
Please correct the value of 100GB to 1GB as suggested by @vviers
for GRIST_ACTION_HISTORY_MAX_BYTES
Thank you for the tests :)
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.
Excellent, thanks, and especially appreciate the AppSettings tests.
Context
Partial fix of #1121
As a self-hoster, I want to be able to parameterize ACTION_HISTORY max sizes (both as rows and as disk space)
Proposed solution
Introduce 2 env variables to make those limits configurable.
I made these two values require to be strictly positive.
Also I introduced check for minimum values (
minValue
) and for the maximum values (maxValue
) forAppSettings.readInt()
/AppSettings.requireInt()
and took the opportunity to force the timeout for OIDC to be positive.Also as I introduced some changes in AppSettings, I started testing this module. I felt like it would take some time to test everything, so I start small with this test and only test properly the methods related to integers (
readInt
andrequireInt
).Related issues
Fixes #1121
Has this been tested?