Skip to content

New Adapter: Matterfull#4343

Open
Matterfull wants to merge 31 commits into
prebid:masterfrom
Matterfull:matterfull-bidder-adapter
Open

New Adapter: Matterfull#4343
Matterfull wants to merge 31 commits into
prebid:masterfrom
Matterfull:matterfull-bidder-adapter

Conversation

@Matterfull
Copy link
Copy Markdown

@Matterfull Matterfull commented May 19, 2025

Comment thread adapters/matterfull/matterfull.go Outdated
return nil, fmt.Errorf("unable to parse endpoint url template: %v", err)
}

bidder := &MatterfullAdapter{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can call this simply "adapter", the MatterfullAdapter identification is already supplied by the package name. As you have it, referencing your adapter from outside the package would be MatterfullAdapter.MatterfullAdapter which looks a little redundant. See example below:

  package foo

  type adapter struct {
    endpoint string
  }
  
  func  Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
    return &adapter{endpoint: "https://www.foo.com"}, nil
  }

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 93e1c5f

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:23:	MakeRequests		83.3%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:53:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:83:	validateImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:91:	compatImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:99:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:118:	getImpressionExt	85.7%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:134:	buildAdapterRequest	83.3%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:159:	createBidRequest	75.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:180:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:186:	MakeBids		84.2%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:220:	getMediaTypeForImpID	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:230:	Builder			100.0%
total:										(statements)		89.7%

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 8164201

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:23:	MakeRequests		83.3%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:53:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:83:	validateImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:91:	compatImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:99:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:118:	getImpressionExt	85.7%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:134:	buildAdapterRequest	83.3%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:159:	createBidRequest	75.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:180:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:186:	MakeBids		84.2%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:220:	getMediaTypeForImpID	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:230:	Builder			100.0%
total:										(statements)		89.7%

@bsardo bsardo added the adapter label Jun 4, 2025
@bsardo
Copy link
Copy Markdown
Collaborator

bsardo commented Jun 13, 2025

@ShriprasadM can you please review?

@Matterfull
Copy link
Copy Markdown
Author

@ShriprasadM Hi! Can you please tell me the status of our adapter and what we need to do next?

@Matterfull
Copy link
Copy Markdown
Author

@ShriprasadM Please let us know if you need anything from our side in order to complete the review.

Comment thread adapters/matterfull/matterfull.go Outdated
Comment thread adapters/matterfull/matterfull.go Outdated
// MakeRequests prepares request information for prebid-server core
func (adapter *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
errs := make([]error, 0, len(request.Imp))
if len(request.Imp) == 0 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While I appreciate the defensive programming, this check is not necessary. Adapters will always be called with at least one impression.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed

Comment thread adapters/matterfull/matterfull.go Outdated
Comment thread adapters/matterfull/matterfull.go Outdated
Comment thread adapters/matterfull/matterfull.go Outdated
errors = append(errors, err)
continue
}
if res[*impExt] == nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line may not be necessary, as append will create a slice if it's nil. Can you try removing this check?

Comment thread static/bidder-params/matterfull.json Outdated
"description": "A schema which validates params accepted by the Matterfull adapter",
"type": "object",
"properties": {
"pubid": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be pid to match the required field?

Comment thread adapters/matterfull/matterfull.go
Comment thread adapters/matterfull/matterfull.go Outdated
return nil
}

func getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpMatterfull, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider returning a value type instead of a reference to simplify the map key in the context above. It's a good approach in Go to stick with value types by default and only move to pointers if it needs to be modified or is very large.

Comment thread adapters/matterfull/matterfull.go Outdated
@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 51aeccd

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:22:	MakeRequests		80.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:49:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:74:	compatImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:82:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:101:	getImpressionExt	85.7%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:117:	buildAdapterRequest	83.3%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:142:	createBidRequest	75.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:163:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:169:	MakeBids		84.2%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:203:	getMediaTypeForImpID	100.0%
github.com/prebid/prebid-server/v3/adapters/matterfull/matterfull.go:213:	Builder			100.0%
total:										(statements)		88.6%

@ShriprasadM
Copy link
Copy Markdown
Contributor

@ShriprasadM Please let us know if you need anything from our side in order to complete the review.

@Matterfull : Was busy with some other work. I will look into this today

@Matterfull
Copy link
Copy Markdown
Author

@ShriprasadM Do we have any updates?

Comment thread adapters/matterfull/matterfull.go Outdated
resImps := make([]openrtb2.Imp, 0, len(imps))
res := make(map[openrtb_ext.ExtImpMatterfull][]openrtb2.Imp)

for _, imp := range imps {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: avoid shallow copies of imps in a loop.

Suggested change
for _, imp := range imps {
for imp := range iterutil.SliceValuePointers(imps) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Can you please help me with this situation, I can't import iterutil because the folder name and package name are different.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

image image image image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@scr-oath Can you please help with this question?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@MaksymTeqBlaze Can you please assist with the question?

Copy link
Copy Markdown
Contributor

@scr-oath scr-oath Jul 21, 2025

Choose a reason for hiding this comment

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

UPDATE #4447 is merged now, please merge latest with your fork/branch and it should work now.

Comment thread adapters/matterfull/matterfull.go Outdated
Comment thread adapters/matterfull/matterfull.go Outdated
Comment on lines +192 to +194
for i := 0; i < len(seatBid.Bid); i++ {
bid := seatBid.Bid[i]
bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: Can you comment why you need a copy of the seatBid? Is it being altered in some way? Could you use iterutils.SliceValuePointers to get the pointer to the bid that's in the seatBid.Bid without needing the shallow-copy?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You are right, a copy of seatBid is not needed here, I will rework it to use iterutils.SliceValuePointers.

Comment thread adapters/matterfull/matterfull.go Outdated

// getMediaTypeForImp figures out which media type this bid is for
func getMediaTypeForImpID(impID string, imps []openrtb2.Imp) openrtb_ext.BidType {
for _, imp := range imps {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: Do you need shallow copies of the imps here? Can you use iterutils.SliceValuePointers

Comment thread static/bidder-info/matterfull.yaml
@Matterfull Matterfull requested a review from scr-oath July 15, 2025 07:25
@bsardo bsardo assigned MaksymTeqBlaze and unassigned ShriprasadM Jul 15, 2025
Comment thread adapters/akcelo/akcelo.go
return "", err
}
if bidExt.Prebid != nil {
return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider this as a suggestion. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, recommends implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

@Matterfull
Copy link
Copy Markdown
Author

@scr-oath I fixed the errors according to the last code review. Tell me, I think I incorrectly brought to the current version of the repository and pushed.

Copy link
Copy Markdown
Contributor

@scr-oath scr-oath left a comment

Choose a reason for hiding this comment

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

Hmm… I started to review changes in other adapters and then realized - is this merged properly? Why are we picking up other changes and not merely changes to the materfull adapter?

Comment thread adapters/adagio/adagio.go
bidderResponse.Currency = bidResponse.Cur
}

for _, seatBid := range bidResponse.SeatBid {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: Please avoid deep copies; consider using iterutil.SlicePointerValues here

Note that an iterator over a slice is merely assigned the value of each element and, since each is a (large) struct, it's less work to use the pointer. The iterutil helps with this.

Suggested change
for _, seatBid := range bidResponse.SeatBid {
for seatBid := range iterutil.SlicePointerValues(bidResponse.SeatBid) {

Comment thread adapters/adagio/adagio.go
Comment on lines +77 to +78
for i := range seatBid.Bid {
bid := seatBid.Bid[i]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: You can also use iterutil here for both of these lines and, in fact, what you have here is still a copy. I'm not sure if that was intended or not - but you are shallow copying the element in this assignment.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Outdated comment from another commit. Not relevant now.

Comment thread adapters/adagio/adagio.go
bidExt, bidExtErr := getBidExt(bid.Ext)
if bidExtErr != nil {
errs = append(errs, &errortypes.FailedToUnmarshal{
Message: fmt.Errorf("bid ext, err: %w", bidExtErr).Error(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion (style):
Use %w to wrap errors only when you need to return or propagate an error type, allowing callers to use errors.Is/errors.As for error inspection. Here, since the formatted error message is being converted to a string (not returned as an error), %v is more appropriate. Wrapping with %w is only meaningful in functions that return an error value.

Reference: https://golang.org/pkg/fmt/#hdr-Printing

Example:

// Good: wrapping when returning an error
return fmt.Errorf("context: %w", err)

// Good: using %v when embedding error in a string
Message: fmt.Sprintf("bid ext, err: %v", bidExtErr)

suggestion - why do this and not merely Sprintf?

Suggested change
Message: fmt.Errorf("bid ext, err: %w", bidExtErr).Error(),
Message: fmt.Sprintf("bid ext, err: %v", bidExtErr),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Outdated comment from another commit. Not relevant now.

Comment on lines +17 to +19
if err != nil {
t.Fatalf("Builder returned unexpected error %v", err)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please use testify

Suggested change
if err != nil {
t.Fatalf("Builder returned unexpected error %v", err)
}
require.NoError(t, "Builder returned unexpected error")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Outdated comment from another commit. Not relevant now.

Comment thread adapters/conversant/conversant.go Outdated
Comment on lines +195 to +200
if imp.Video != nil {
bidType = openrtb_ext.BidTypeVideo
}
if imp.Audio != nil {
bidType = openrtb_ext.BidTypeAudio
switch {
case imp.Native != nil:
return openrtb_ext.BidTypeNative
case imp.Audio != nil:
return openrtb_ext.BidTypeAudio
case imp.Video != nil:
return openrtb_ext.BidTypeVideo
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question: why are these diffs showing up? Is there some way this could be merged with main so that the files diffed here are only your changes?

Copy link
Copy Markdown
Author

@Matterfull Matterfull Jul 25, 2025

Choose a reason for hiding this comment

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

@scr-oath
I don't know what to do in this situation, I downloaded the changes from the master to my branch, because I needed the current version of the utilities, and all the commits that were during this time appeared. Tell me, maybe I should recreate the pull request from the current version?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll pull this down and take a look… FYI, I enjoy using https://github.com/git-up/GitUp which is a great tool to visualize local branches…

Copy link
Copy Markdown
Contributor

@scr-oath scr-oath Jul 25, 2025

Choose a reason for hiding this comment

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

Hmm… These files don't show up in its view of the diff… I wonder why GH is getting confused…

image

Copy link
Copy Markdown
Contributor

@scr-oath scr-oath Jul 25, 2025

Choose a reason for hiding this comment

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

:copilot: says:

git fetch origin
git merge origin/master
# or alternatively:
# git rebase origin/master
git push --force-with-lease

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please try that? @Matterfull ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Already fixed.

Comment thread adapters/akcelo/akcelo.go
return "", err
}
if bidExt.Prebid != nil {
return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider this as a suggestion. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, recommends implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Outdated comment from another commit. Not relevant now.

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 54e69d8

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		84.6%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	80.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:128:	buildAdapterRequest	83.3%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:153:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:176:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:182:	MakeBids		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:216:	getMediaTypeForImpID	83.3%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:229:	Builder			100.0%
total:										(statements)		92.6%

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, dc2ae18

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		84.6%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	80.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:128:	buildAdapterRequest	83.3%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:153:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:176:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:182:	MakeBids		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:216:	getMediaTypeForImpID	83.3%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:229:	Builder			100.0%
total:										(statements)		92.6%

@Matterfull
Copy link
Copy Markdown
Author

Hi @SyntaxNode @hhhjort @scr-oath pls check the updated pr

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, e7d7e3e

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:128:	buildAdapterRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:153:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:176:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:182:	MakeBids		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:216:	getMediaTypeForImpID	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:229:	Builder			100.0%
total:										(statements)		100.0%

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 24e280c

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:128:	buildAdapterRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:153:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:176:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:182:	MakeBids		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:216:	getMediaTypeForImpID	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:229:	Builder			100.0%
total:										(statements)		100.0%

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 20a730c

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:128:	buildAdapterRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:153:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:176:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:182:	MakeBids		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:216:	getMediaTypeForImpID	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:229:	Builder			100.0%
total:										(statements)		100.0%

@Matterfull
Copy link
Copy Markdown
Author

Matterfull commented Apr 16, 2026

Hi team @SyntaxNode , @hhhjort , @scr-oath
Could you please check the updated pr?

@Matterfull
Copy link
Copy Markdown
Author

Hi @SyntaxNode , @scr-oath , @bsardo , @hhhjort

Just a gentle follow-up on this PR. All review comments have been addressed, and the adapter is now fully ready (including 100% test coverage).

Would really appreciate a re-review and approval when you have time

@Matterfull
Copy link
Copy Markdown
Author

Matterfull commented Apr 27, 2026

Hi @ShriprasadM , @scr-oath , @bsardo , @hhhjort

Quick ping on this PR — all review comments have been addressed and tests are complete.
Could you please take another look when you get a chance?

Copy link
Copy Markdown
Contributor

@scr-oath scr-oath left a comment

Choose a reason for hiding this comment

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

Re-review (re-requested by @VolodymyrKapatsyn / @Matterfull).

The bottom line: Adapter code is in great shape — but this PR includes an out-of-scope CI workflow change that should be split out before merge.

What's improved since the prior approval (which was auto-dismissed by the master merge)

  • Coverage rose 85.3% → 92.6%. New tests cover previously-uncovered paths: buildEndpointURL failure, jsonutil.Marshal failure (NaN), compatBannerImpression (missing/single/multi-format incl. deep-copy verification), compatImpression without banner, getMediaTypeForImpID (banner/video/missing).
  • The multiple formats deep copy subtest at matterfull_test.go:146 mutates originalFormats[1] after the call to prove the copy is independent — exactly right.
  • v3 → v4 import bumps came in via the master merge (#4710); mechanical and correct.
  • All adapter code is otherwise unchanged from the previously-approved state.

Blocker: out-of-scope change

.github/workflows/adapter-code-coverage.yml is modified by commit dc2ae180 ("Implement retry logic for pushing coverage preview branch"). That commit is not on prebid/master — it was authored on the matterfull branch and is being carried into this PR. Adapter PRs should be scoped to the adapter; CI/infrastructure changes deserve their own PR so the right reviewers (CI owners) see them.

The retry logic itself looks reasonable for handling concurrent pushes to coverage-preview, and may even be welcomed as a standalone PR — but please drop it from this branch (e.g. git rebase -i and remove dc2ae180c, or push without that commit) and open it separately.

Praise

  • Responsive iteration through many rounds. The diff is finally clean and well-tested.
  • Good test design: subtests with descriptive names, deep-copy verification proves the invariant rather than just the visible output.

One non-blocking note (carried over)

matterfull.go:203 — outer for _, seatBid := range bidResp.SeatBid still copies the SeatBid struct. iterutil.SlicePointerValues(bidResp.SeatBid) would match the inner loop on line 204 for consistency. Not blocking.


Once dc2ae180c is dropped, this is ready to merge from my side. Sorry for the long round-trip.

git add $directory/*
git commit -m 'Add coverage files'
git push origin coverage-preview
for attempt in 1 2 3; do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (blocking): Out-of-scope CI workflow change — please split into a separate PR.

This block (and commit dc2ae180) is not on prebid/master and is unrelated to the matterfull adapter. Adapter PRs should only touch their adapter; CI/infra changes deserve their own PR so the right reviewers see them.

The retry logic itself looks reasonable for concurrent pushes to coverage-preview — feel free to open it separately and it can be evaluated on its own merits.

@github-actions
Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 5054430

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:121:	buildAdapterRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:146:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:169:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:175:	MakeBids		90.5%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:214:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:233:	getMediaTypeForImpID	88.9%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:255:	getMediaTypeForImp	73.3%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:280:	Builder			100.0%
total:										(statements)		94.9%

@Matterfull
Copy link
Copy Markdown
Author

@scr-oath @SyntaxNode @hhhjort thanks for the review. I pushed updates addressing the requested changes in commit 5054430.

  • Removed the out-of-scope coverage workflow retry change from the final PR diff.
  • Removed the redundant runtime validation for empty pid, since the bidder params schema already requires pid with minLength.
  • Updated bid type resolution to prefer bid.mtype from the adapter response, and to reject ambiguous multi-format bids when mtype is missing.

Verified with go test ./adapters/matterfull.

@Matterfull Matterfull requested a review from scr-oath April 30, 2026 17:59
@Matterfull
Copy link
Copy Markdown
Author

@scr-oath I realized I may have missed the nuance in your earlier comment about dropping commit dc2ae18 itself, not only removing the workflow change from the final diff.

Right now the out-of-scope CI workflow change is removed from the PR files: .github/workflows/adapter-code-coverage.yml matches prebid/master again, so the final merge diff no longer includes the coverage-preview retry logic. I handled it with a follow-up commit rather than rewriting the branch history.

My understanding is that this should address the practical blocker because the PR no longer changes CI/infra code. If you strongly prefer the branch history to be cleaned up so dc2ae18 is no longer present at all, I can do that as well with a history rewrite/force-push. I avoided doing that initially because the PR has a long history with prior merges and reviews, and the final diff is already scoped back to the adapter.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, b9ecd13

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:121:	buildAdapterRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:146:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:169:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:175:	MakeBids		90.5%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:214:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:233:	getMediaTypeForImpID	88.9%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:255:	getMediaTypeForImp	73.3%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:280:	Builder			100.0%
total:										(statements)		94.9%

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, edfffdc

matterfull

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:23:	MakeRequests		100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:45:	getImpressionsInfo	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:66:	compatImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:74:	compatBannerImpression	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:104:	getImpressionExt	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:121:	buildAdapterRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:146:	createBidRequest	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:169:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:175:	MakeBids		90.5%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:214:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:233:	getMediaTypeForImpID	88.9%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:255:	getMediaTypeForImp	73.3%
github.com/prebid/prebid-server/v4/adapters/matterfull/matterfull.go:280:	Builder			100.0%
total:										(statements)		94.9%

@Matterfull
Copy link
Copy Markdown
Author

@scr-oath @SyntaxNode @hhhjort gentle follow-up on this PR when you have a chance.

The latest checks are passing, and the final PR diff no longer includes the out-of-scope CI workflow change. I also left a note above about the remaining question around commit dc2ae18: if the clean final diff is sufficient, I think this should be ready for re-review; if you would still prefer that commit removed from the branch history entirely, I can do that as well.

Thanks again for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants