-
Notifications
You must be signed in to change notification settings - Fork 224
Port Mobkoi: New Adapter #3942
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
Port Mobkoi: New Adapter #3942
Conversation
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/proto/openrtb/ext/request/mobkoi/ExtImpMobkoi.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/spring/config/bidder/MobkoiConfiguration.java
Outdated
Show resolved
Hide resolved
src/test/resources/org/prebid/server/it/openrtb2/mobkoi/test-auction-mobkoi-request.json
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/test/java/org/prebid/server/bidder/mobkoi/MobkoiBidderTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/prebid/server/bidder/mobkoi/MobkoiBidderTest.java
Outdated
Show resolved
Hide resolved
|
@AntoxaAntoxic, do you think the failing test is related to my PR? I don't see the mobkoi keyword in the error output. |
|
@mbonnafon no worries, they are unstable from time to time |
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/mobkoi/MobkoiBidder.java
Outdated
Show resolved
Hide resolved
| private String resolveEndpoint(String customUri) { | ||
| try { | ||
| HttpUtil.validateUrl(customUri); | ||
| final URI uri = new URI(customUri); | ||
| return uri.resolve("/bid").toString(); | ||
| } catch (IllegalArgumentException | URISyntaxException e) { | ||
| return endpointUrl; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point 5.2: Fully dynamic hostnames in URLs aren't allowed in bid adapters.
Please, add a comment for that method:
// url is already validated with `bidder-params` json schema
Also, you can remove HttpUtil.validateUrl(customUri); step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CTMBNara, so we take the assumption that all custom URIs are valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbonnafon this check will be done by new Uri().toString()
src/test/java/org/prebid/server/bidder/mobkoi/MobkoiBidderTest.java
Outdated
Show resolved
Hide resolved
| if (customUri == null) { | ||
| return endpointUrl; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it outside of try catch block
| @Test | ||
| public void makeHttpRequestsShouldConstructorEndpointWhenTheCustomIsInvalidInMobkoiExtension() { | ||
| // given | ||
| final ObjectNode mobkoiExt = impExt("pid", "invalid-URI"); | ||
| final BidRequest bidRequest = givenBidRequest(impBuilder -> impBuilder.ext(mobkoiExt)); | ||
|
|
||
| // when | ||
| final Result<List<HttpRequest<BidRequest>>> result = target.makeHttpRequests(bidRequest); | ||
|
|
||
| // then | ||
| assertThat(result.getValue()).extracting(HttpRequest::getUri).containsExactly("https://test.endpoint.com/bid"); | ||
| assertThat(result.getErrors()).isEmpty(); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return this test
|
@AntoxaAntoxic @CTMBNara Thanks both for the reviews! What's the next step before merging? |
|
Hi @AntoxaAntoxic / @CTMBNara out of curiosity, do you have any visibility on the next release window? |
🔧 Type of changes
✨ What's the context?
New bidder adapter for Mobkoi, port from PBS-Go.
Maintainer: platformteam@mobkoi.com
Related Changes:
🔎 New Bid Adapter Checklist
🧪 Test plan
The endpoint is not yet in production, so no impact.
🏎 Quality check