Skip to content
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

[Merged by Bors] - fetch: make request timeout configurable #5464

Closed
wants to merge 3 commits into from

Conversation

ivan4th
Copy link
Contributor

@ivan4th ivan4th commented Jan 18, 2024

Motivation

After merging #5462, it might make sense to try and reduce request timeout, as the deadlines will no longer be hit due to long transfers

Changes

Add request-timeout key to the fetch config. Also, fix a typo

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (f38f2d1) 77.7% compared to head (fcb3fc3) 77.7%.

Files Patch % Lines
fetch/fetch.go 0.0% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #5464     +/-   ##
=========================================
- Coverage     77.7%   77.7%   -0.1%     
=========================================
  Files          267     267             
  Lines        30901   30901             
=========================================
- Hits         24019   24016      -3     
- Misses        5369    5371      +2     
- Partials      1513    1514      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@poszu poszu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RequestTimeout is already configurable. Specifying the tag is optional: https://pkg.go.dev/github.com/mitchellh/mapstructure#hdr-Field_Tags

When decoding to a struct, mapstructure will use the field name by default to perform the mapping.
(...)
You can change the behavior of mapstructure by using struct tags. The default struct tag that mapstructure looks for is "mapstructure" (...)

The "default tag" for this field is requestTimeout.

@fasmat
Copy link
Member

fasmat commented Jan 18, 2024

@poszu I think we should use IgnoreUntaggedFields just because it is unintuitive that non-tagged fields are already exported 🙂 see also #5466

@ivan4th
Copy link
Contributor Author

ivan4th commented Jan 19, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Jan 19, 2024
## Motivation
After merging #5462, it might make sense to try and reduce request timeout, as the deadlines will no longer be hit due to long transfers

## Changes
Add `request-timeout` key to the `fetch` config. Also, fix a typo
@spacemesh-bors
Copy link

Build failed:

@ivan4th
Copy link
Contributor Author

ivan4th commented Jan 19, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Jan 19, 2024
## Motivation
After merging #5462, it might make sense to try and reduce request timeout, as the deadlines will no longer be hit due to long transfers

## Changes
Add `request-timeout` key to the `fetch` config. Also, fix a typo
@spacemesh-bors
Copy link

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title fetch: make request timeout configurable [Merged by Bors] - fetch: make request timeout configurable Jan 19, 2024
@spacemesh-bors spacemesh-bors bot closed this Jan 19, 2024
@spacemesh-bors spacemesh-bors bot deleted the feature/adjustable-req-deadline branch January 19, 2024 13:18
ivan4th added a commit that referenced this pull request Jan 25, 2024
After merging #5462, it might make sense to try and reduce request timeout, as the deadlines will no longer be hit due to long transfers

Add `request-timeout` key to the `fetch` config. Also, fix a typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants