Skip to content

New Adapter: Matterfull RTB (#4647) - #4702

Open
phozhyi wants to merge 3 commits into
masterfrom
port-matterfull-rtb
Open

phozhyi wants to merge 3 commits into
masterfrom
port-matterfull-rtb

Conversation

@phozhyi

@phozhyi phozhyi commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

What's the context for the changes?

🧠 Rationale behind the change

Why did you choose to make these changes? Were there any trade-offs you had to consider?

🔎 New Bid Adapter Checklist

  • verify email contact works
  • NO fully dynamic hostnames
  • geographic host parameters are NOT required
  • direct use of HTTP is prohibited - implement an existing Bidder interface that will do all the job
  • if the ORTB is just forwarded to the endpoint, use the generic adapter - define the new adapter as the alias of the generic adapter
  • cover an adapter configuration with an integration test

🧪 Test plan

How do you know the changes are safe to ship to production?

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

@bukrain bukrain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are also another two things that differ between the go and java adapter:

  1. Go adapter clears the imp.ext
  2. Go adapter takes frist size from banner.format and puts it into banner.w/h

Comment on lines +70 to +74
httpRequests.add(BidderUtil.defaultRequest(
modifiedBidRequest,
getResolvedUrl(publisherIdImps.getKey()),
mapper
));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
httpRequests.add(BidderUtil.defaultRequest(
modifiedBidRequest,
getResolvedUrl(publisherIdImps.getKey()),
mapper
));
httpRequests.add(BidderUtil.defaultRequest(
modifiedBidRequest,
getResolvedUrl(publisherIdImps.getKey()),
mapper));

Comment on lines +100 to +106
private static Site modifySite(Site site) {
return site.toBuilder().publisher(null).build();
}

private static App modifyApp(App app) {
return app.toBuilder().publisher(null).domain("").build();
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[minor]
The go adapter does the opposite

  1. Site - set null publisher and empty the domain
  2. App - set only null publisher

Wondering if it's expected here?

Comment on lines +153 to +156
case 0 -> getMediaTypeForImpId(bid.getImpid(), imps);
case null, default -> throw new PreBidException(
String.format("Unsupported mtype %d for impression with ID: %s", mType, bid.getImpid()));
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If there is no mtype defined in the bidResponse, since it's of a type Integer the default value would be a null, so the bid would be dropped, without trying to infer the bid type from the imp.
Please confirm that it's expected behaviour, since in the go adapter, default value for an empty mtype would be 0.

@@ -0,0 +1,196 @@
package org.prebid.server.bidder.matterfull;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please use consistent package naming.
The bidder is under org.prebid.server.bidder.matterfull but the tests use org.prebid.server.bidder.matterfullrtb

import static org.assertj.core.api.Assertions.tuple;
import static org.prebid.server.bidder.model.BidderError.badServerResponse;

@ExtendWith(MockitoExtension.class)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since the tests doesn't seem to mock anything, we can remove this

Suggested change
@ExtendWith(MockitoExtension.class)

}

@Test
public void makeBidShouldReturnMediaTypeFromImpWhenBidMTypeEqualsZero() throws JsonProcessingException {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[typo]

Suggested change
public void makeBidShouldReturnMediaTypeFromImpWhenBidMTypeEqualsZero() throws JsonProcessingException {
public void makeBidsShouldReturnMediaTypeFromImpWhenBidMTypeEqualsZero() throws JsonProcessingException {

}

@Test
public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpInvalid() throws JsonProcessingException {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[typo]

Suggested change
public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpInvalid() throws JsonProcessingException {
public void makeBidsShouldReturnErrorWhenBidMTypeEqualsZeroAndImpInvalid() throws JsonProcessingException {

}

@Test
public void makeBidShouldReturnErrorWhenImpIsMultiformatAndMTypeEqualsZero() throws JsonProcessingException {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[typo]

Suggested change
public void makeBidShouldReturnErrorWhenImpIsMultiformatAndMTypeEqualsZero() throws JsonProcessingException {
public void makeBidsShouldReturnErrorWhenImpIsMultiformatAndMTypeEqualsZero() throws JsonProcessingException {

}

@Test
public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpNotFound() throws JsonProcessingException {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[typo]

Suggested change
public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpNotFound() throws JsonProcessingException {
public void makeBidsShouldReturnErrorWhenBidMTypeEqualsZeroAndImpNotFound() throws JsonProcessingException {

@Test
public void makeBidsShouldReturnBannerBidSuccessfully() throws JsonProcessingException {
// given
final Bid videoBid = givenBid(1);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
final Bid videoBid = givenBid(1);
final Bid bannerBid = givenBid(1);

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.

Port PR from PBS-Go: New Adapter: Matterfull RTB

2 participants