-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify StoredRequest configs, add validation for all data typesBefore …
…the change, prebid-server starts and can crash```I0821 18:22:59.943387 50156 config.go:50] Connecting to Postgres for Stored Video. DB=blah, host=, port=0, user=F0821 18:22:59.947503 50156 config.go:282] Failed to ping Video postgres: dial tcp 127.0.0.1:5432: connect: connection refusedgoroutine 1 [running]:github.com/golang/glog.stacks(0xc00048d600, 0xc000138280, 0x81, 0xa0)```After the change```F0821 18:19:50.035239 50048 main.go:37] Configuration could not be loaded or did not pass validation: validation errors are: stored_video_req: postgres.poll_for_updates.refresh_rate_seconds must be > 0 stored_video_req: postgres.poll_for_updates.timeout_ms must be > 0 stored_video_req: postgres.poll_for_updates.query must contain exactly one wildcard stored_video_req: cache_events must be disabled if in_memory_cache=none stored_video_req: postgres.poll_for_updates.query must be empty if in_memory_cache=none```With this bad config```yamlstored_video_req: in_memory_cache: type: none cache_events: enabled: true endpoint: "/foo" postgres: connection: dbname: "blah" fetcher: query: "blah" poll_for_updates: query: "blah" timeout_ms: 0```
- Loading branch information
Showing
6 changed files
with
220 additions
and
311 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
Oops, something went wrong.