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

New Adapter: Pixfuture #4117

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Conversation

pixfuture-media
Copy link

This Pixfuture Prebid Server Adapter enables seamless integration with Pixfuture's ad exchange, allowing publishers to leverage their demand through server-side header bidding. The adapter formats outgoing bid requests, processes incoming bid responses, and adheres to OpenRTB standards for efficient and privacy-compliant ad delivery.

Copy link

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, 3f33089

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		85.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:49:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:64:	MakeBids		90.0%
total:									(statements)		91.4%

Copy link

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, 993f157

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:48:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:63:	MakeBids		90.0%
total:									(statements)		91.2%

@gargcreation1992 gargcreation1992 self-assigned this Dec 24, 2024
@pixfuture-media
Copy link
Author

pixfuture-media commented Dec 27, 2024 via email

@bsardo bsardo changed the title New Pixfuture adapter New Adapter: Pixfuture Jan 6, 2025
@bsardo bsardo added the adapter label Jan 6, 2025
@pixfuture-media
Copy link
Author

I would like to ask for your help with reviewing a pull request [New Adapter: Pixfuture #4117].
Your feedback would be greatly appreciated.
When do you think you might be able to review this?
Thank you in advance for your time and effort.

Copy link

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, 284c847

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:48:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:63:	MakeBids		90.0%
total:									(statements)		91.2%

@pixfuture-media
Copy link
Author

Bretg, the docs PR prebid/prebid.github.io#5915 has been fixed

@pixfuture-media
Copy link
Author

Hello Bretg,
I hope you are well.
Please let me know the next steps required from my side.
Vitali I.

@bretg bretg requested review from bsardo and guscarreon March 5, 2025 14:19
@bretg
Copy link
Contributor

bretg commented Mar 5, 2025

Requesting re-review from @bsardo and @guscarreon

@pixfuture-media
Copy link
Author

Dear Bretg,

I hope you are doing well.
I’m writing to kindly inquire about the current status of our adapter.
Please let me know when you have an update.

Best regards,
Vitali I.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you support video, please add a new video test called video.json.

Copy link

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, 1912ebd

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		90.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:59:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:74:	MakeBids		88.9%
total:									(statements)		91.4%

Copy link

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, 81c11fb

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		90.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:59:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:74:	MakeBids		88.9%
total:									(statements)		91.4%

continue
}
bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
Bid: &bid,

Choose a reason for hiding this comment

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

Found incorrect assignment made to Bid. bid variable receives a new value in each iteration of range loop. Assigning the address of bid (&bid) to Bid will result in a pointer that always points to the same memory address with the value of the last iteration. This can lead to unexpected behavior or incorrect results. Refer https://go.dev/play/p/9ZS1f-5h4qS
Consider using an index variable in the seatBids.Bid loop as shown below

  for _, seatBid := range response.SeatBid {
    for i := range seatBids.Bid {
      ...
      responseBid := &adapters.TypedBid{
        Bid: &seatBids.Bid[i],
        ...
      }
      ...
      ...
    }
  }

return "", err
}

switch ext.Prebid.Type {

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. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeBanner. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

return "", err
}

switch ext.Prebid.Type {

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. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeNative. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

return "", err
}

switch ext.Prebid.Type {

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. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend 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

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, 2f15c50

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:18:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:24:	MakeRequests		0.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:92:	MakeBids		0.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:133:	getMediaTypeForBid	0.0%
total:									(statements)		1.6%

Copy link

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, be83555

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:19:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:25:	MakeRequests		0.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:93:	MakeBids		0.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:136:	getMediaTypeForBid	0.0%
total:									(statements)		1.6%

Copy link

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, f8fddb7

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:19:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:25:	MakeRequests		93.5%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:93:	MakeBids		95.8%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:136:	getMediaTypeForBid	100.0%
total:									(statements)		95.3%

@pixfuture-media
Copy link
Author

I've addressed all the requested changes on my end. Could you please review it and let me know the next steps?
Thank you!

Copy link

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, 1aa2761

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:29:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:35:	MakeRequests		93.8%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:98:	MakeBids		95.8%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:141:	getMediaTypeForBid	100.0%
total:									(statements)		95.4%

@pixfuture-media
Copy link
Author

I've addressed all the requested changes on my end. Could you please review it and let me know the next steps?
Thank you!

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.

6 participants