feat: configurable file write timeouts#1653
Conversation
This commit adds a write timeout configuration parameter. As it is part of the downloading cycle, it is available under `blocking/loading/downloads`. The default value comes from `server/http.go` line 23. Refs: 0xERR0R#1606
|
I have some lingering questions. Should the read timeouts that are currently hardcoded also be migrated to configurable values (possibly in a separate PR)? |
I would say, it is always better to have some parameters configurable for power user and default values which are ok for the most cases ;) We don't have any tests which cover http timeouts |
0xERR0R
left a comment
There was a problem hiding this comment.
LGTM, Thanks for your contribution! Should I merge your change or do you want to add something?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1653 +/- ##
==========================================
+ Coverage 93.88% 93.91% +0.02%
==========================================
Files 78 80 +2
Lines 6361 6572 +211
==========================================
+ Hits 5972 6172 +200
- Misses 300 316 +16
+ Partials 89 84 -5 ☔ View full report in Codecov by Sentry. |
I'll do that.
IMO, this PR is ready for merging; I intend to add both configuration parameters in separate PRs. If you prefer having them in one bigger PR, I can add the commits here. |
This commit adds a request read timeout configuration parameter. As it is part of the downloading cycle, it is available under `blocking/loading/downloads`. The default value comes from `server/http.go` line 22. Refs: 0xERR0R#1653
This commit adds a request header read timeout configuration parameter. As it is part of the downloading cycle, it is available under `blocking/loading/downloads`. The default value comes from `server/http.go` line 21. Refs: 0xERR0R#1653
* feat(config): read read timeout value This commit adds a request read timeout configuration parameter. As it is part of the downloading cycle, it is available under `blocking/loading/downloads`. The default value comes from `server/http.go` line 22. Refs: #1653 * feat(server): get read timeout from config * feat(docs): document additional config parameter * refactor(server): remove superfluous spaces
* feat(config): read read header timeout value This commit adds a request header read timeout configuration parameter. As it is part of the downloading cycle, it is available under `blocking/loading/downloads`. The default value comes from `server/http.go` line 21. Refs: #1653 * feat(server): get read header timeout from config * feat(docs): document additional config parameter
This pull request introduces changes to the HTTP server configuration to make it more flexible and configurable. The change include adding a new configuration parameter for write timeouts, updating the HTTP server initialization to use this new parameter, and adjusting the server creation logic accordingly.
This PR answers issue #1606.