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

Events prebid bid extension was added #298

Merged
merged 6 commits into from
Mar 7, 2019

Conversation

BraslavskiyAndrey
Copy link
Contributor

No description provided.

@@ -1053,13 +1063,24 @@ private BidResponse toBidResponseWithCacheInfo(List<BidderResponse> bidderRespon
.build();
}

private String getPublisherId(Site site, App app) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is already a method publisherId for doing exactly the same. Also is it possible to pass publisherId that is calculated in holdAuction method?

@@ -93,6 +95,9 @@
private static final String PREBID_EXT = "prebid";
private static final String CACHE = "cache";
private static final String DEFAULT_CURRENCY = "USD";
private static final String EVENT_CALLBACK_URL_PATTERN = "%s/event?type=%s&bidid=%s&bidder=%s";
Copy link
Contributor

Choose a reason for hiding this comment

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

What about extracting event construction logic (even though it's tiny) to a separate service?


@Test
public void shouldNotAddExtPrebidEventsWhenAccountsEnabledDoesNotContainPublisherId() {
// given
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong indentation

@@ -135,3 +135,4 @@ analytics.log.enabled=true
gdpr.host-vendor-id=1
gdpr.vendorlist.filesystem-cache-dir=src/test/resources/org/prebid/server/ApplicationTest/gdpr-vendorlist
gdpr.geolocation.maxmind.db-archive-path=/org/prebid/server/geolocation/GeoLite2-test.tar.gz
events.accounts-enabled=1001
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's improve one of the /openrtb2/auction and /openrtb2/amp test in AppliationTest to verify functionality implemented

@@ -173,14 +174,16 @@ public void setUp() {
metricsContext = MetricsContext.of(MetricName.openrtb2web);

exchangeService = new ExchangeService(bidderCatalog, httpBidderRequester, responseBidValidator, cacheService,
bidResponsePostProcessor, currencyService, gdprService, metrics, clock, false, 0);
bidResponsePostProcessor, currencyService, gdprService, new EventsService(null, "http://external.org"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not use real EventsService in this class at all in favor of a mock

@schernysh schernysh merged commit 96bdb32 into master Mar 7, 2019
@schernysh schernysh deleted the add-event-callback-ext-to-bids branch March 7, 2019 11:27
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.

2 participants