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

Configurable Stored Request Fetch Timeout #3614

Merged

Conversation

AlexBVolcy
Copy link
Contributor

Implements #2362

@@ -159,6 +159,7 @@ func TestDefaults(t *testing.T) {
cmpBools(t, "adapter_connections_metrics", true, cfg.Metrics.Disabled.AdapterConnectionMetrics)
cmpBools(t, "adapter_gdpr_request_blocked", false, cfg.Metrics.Disabled.AdapterGDPRRequestBlocked)
cmpStrings(t, "certificates_file", "", cfg.PemCertsFile)
cmpInts(t, "stored_requests.timeout_ms", 50, cfg.StoredRequests.Timeout)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you update TestDefaults and the corresponding test config yaml so we can verify that this new field can be set to a value other than the default 50?

@@ -71,6 +71,8 @@ type StoredRequests struct {
// HTTPEvents configures an instance of stored_requests/events/http/http.go.
// If non-nil, the server will use those endpoints to populate and update the cache.
HTTPEvents HTTPEventsConfig `mapstructure:"http_events"`
// Timeout defines the number of milliseconds before a timeout occurs with stored requests fetch
Timeout int `mapstructure:"timeout_ms"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

The point was raised in one of the closed related issues (#1533 (comment)) that perhaps this should be a top level config. Moving it down a level as you have does increase flexibility though as it allows for different timeouts for each data type that may be fetched (requests, responses, accounts, categories, etc). Let's discuss with the group.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, we can bring this up tomorrow!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed Today: I'm investigating the tradeoff between leaving the timeout config at this level and updating the other various config variable usages that are also of type StoredRequests to utilize the timeout appropriately, or if it would be easier to just have this variable at the root level.

@bsardo bsardo merged commit 74fbb38 into prebid:master Apr 30, 2024
3 checks passed
@bsardo bsardo changed the title Make Stored Request Fetch Timeout Configurable Configurable Stored Request Fetch Timeout Apr 30, 2024
mefjush pushed a commit to adhese/prebid-server that referenced this pull request Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants