Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Stored Request Support (prebid#207)
* Added openrtb contract classes. * Normalized the documentation. * Ran gofmt. * fixed some more comments. * Added CacheURL to the openrtb types. * Bidder interface. * First pass at appnexus adapter implementation. * Limited the Appnexus adapter to only handle banner and video requests. * Made a first pass at Bidder interfaces. * Removed an unused class. * First pass at openrtb BidRequest cleaning * Added a return so that the code builds. * Renamed adapter.go to bidder.go * Changed appnexus adapter to implement the SingleHttpBidder. * Changed the Bidder type signature slightly. * Pass 2 of BidRequest cleaner * Updated API contract classes, and refactored the singleBidderAdapter so that it compiles again. * Wrote an http bidder which should work for everyone. * Replaced the old base bidder with one which works for both bidding strategies. * Updated the appnexus adapter so that it still implements the interface. * Updated documentation. * Added tests to http_bidder.go, and fixed some bugs. * Exchange probably compiles, but is not done * Swapped the order of the HoldAuction arguments. * Added an openrtb endpoint. Made an interface for Exchange. * End of the week commit. Should be in a relatively sane state * Fixed some build errors. * Fixed a bug in NewExchange. * Fixed some more bugs in the exchange. * Added an openrtb2/auction endpoint for end-to-end tests. * First exchange that can (theoretically) produce a bid response * Fixes for <adapter>.Bid() returning a null pointer * Fixes for <adapter>.Bid() null fix: keep existing debug info * Added input validation for incoming openrtb requests. * Fixes for <adapter>.Bid() : actually save debugging info now * Some input validation cleanup. * Added a test for a successful bid. * Fixed some more bugs. The auction with the appnexus adapter now works from end-to-end. * Made a BidderName enum type, and ported some method signatures to use it. * Removed silly newlines. * Removed some more dead code. * Starting to add exchange tests * Added lots of unit tests for input validation. * Renamed ServerCalls to HttpCalls everywhere. * pre-merge commit * Tests and fixes * Connected bidder param request validation to the json schemas * Fixed some bugs. * Undid some changes to the facebook json schema. * Updated glide.lock. Removed more unexpected changes. * Cleaned up the endpoint_test file. * Added more tests. Improved the endpoint class role to avoid glog.Fatals. * Added some tests for the bidder json-schema validation. * Improved handling of GetAllBids go routine and more tests * Added a benchmark for the openrtb endpoint. * Renamed the openrtb_auction package to openrtb2. * Added a markdown file describing the openrtb2 endpoint. * More tests in, including a null response from an adapter as their bid response. * Add proper error handling of the json Marshal errors to the exchange code. * Implemented the timeout. * Return a 500 if the exchange fails with an error. * Added lots of tests. More to come soon. * More appnexus tests. * Removed some of the TODOs. * Added tests for appnexus param validation * Added another test where unit coverage was spotty. * Deleted some unused code, including the Cache stuff. * Removed some dead comments. * Removed some more TODOs * Added a doc.go to the openrtb_ext package. * Refactoring and cleanup based on suggestions from Nicole. * Moved the appnexus imp.ext into its own file. * Renamed exchange.bidder to exchange.adaptedBidder. * Fixed more docs, and made more things private. * Replaced the response.seatbid.ext map with the contract class. * Added support for Targeting. Adding tests to CleanOpenRTBRequests, work needed here still. * Revert "Added support for Targeting. Adding tests to CleanOpenRTBRequests, work needed here still." This reverts commit f2efcca. * Adding tests to insure proper extensions get passed to adapters during the request cleaning stage. * Fixed docs based on the documentation writer's feedback * Fixed some spaces => tabs formatting. * Fixed go vet errors. * Added docs for adding a new bidder. * Linked the README to the adding a new bidder doc. * Relocated utils.go into exchange, and made the functions private. * Privitized internal exchange functions. * Code review improvements. * A few small fixes from PR comments * Optimizations in cleanOpenRTBRequests * Fixed a bug which resulted in empty seatbid.ext objects. * Starting a branch for processing stored configs. * Fixed some bugs in the contract classes. * Added some more docs, and updated the method signature to include errors. * Sync for auction config cache code * Made a ConfigFetcher which pulls from the filesystem. * Added an empty fetcher which doesn't support configs. Updated the auction_tests to compile again * Return an address. * Updated the glide.lock with the new json-patch dependency. * Made the openrtb-config backend configurable. * Added the openrtb2_config flies to the Dockerfile. * Moved and renamed some stuff to keep it separate from legacy stuff. * Added a postgres fetcher, and made the config fetcher configurable. * Basic config support and tests (working) * Moved some docs around. * Improved two of the unit tests. * Added a context to the config fetchers. * Fixed some minor bugs. Added glogs for config loading info. * Improved the error message for postgres config logging. * Made the APIs consistent with the spec. * Added a few tests, and logged unexpected DB connection errors. Also some doc/style updates. * Added docs for configuration and Stored Requests. * Fixed a naming issue. * Change request processing to hang on to the raw JSON request, so we can merge against the raw request rather than after it gets mangled by the json (Un)Marshal cycle. * Merged upstream changes and added default for max_request_size * Finish reading the request body & return an error message if it exceeded the limit. Made some small performance improvements. * Renamed all "config"-stuff to "stored requests". * Removed some unused contract classes in preference of jsonparser. * Missed a few renames. Optimized request ID finding. * More missed renames. * Removed all traces of account-scoped fetchers, which we dont need to support yet. * Replaced magic maxSize number with a constant. * Reformatted ugly json. Checked if cfg was nil. Renamed NewEagerFetcher to NewFileFetcher. * Lower-cased some HTTP request in the docs, and linked the first mention of Imp to the OpenRTB spec to help clarify things. * Fixed a bug which caused the server to return a 400 when the incoming request was the same as the max configured size.
- Loading branch information