Skip to content

Conversation

@zxPhoenix
Copy link
Contributor

🔧 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?

New Ogury adapter (Port PR from PBS-Go)
#3700

🧠 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 (I believe this happened go-side. this is a port)
  • 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?
Unit tests with decent coverage

🏎 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?

@zxPhoenix zxPhoenix changed the title New adapter: Port Ogury adapter from PBS-Go Port Ogury: New Adapter Feb 26, 2025
@osulzhenko osulzhenko requested a review from CTMBNara February 26, 2025 16:50
@osulzhenko osulzhenko changed the title Port Ogury: New Adapter Ogury: port new adapter from Go Feb 28, 2025
@osulzhenko osulzhenko linked an issue Feb 28, 2025 that may be closed by this pull request
@zxPhoenix zxPhoenix requested a review from CTMBNara March 7, 2025 13:26
@zxPhoenix zxPhoenix requested a review from CTMBNara March 12, 2025 09:26
@zxPhoenix zxPhoenix requested a review from CTMBNara March 12, 2025 20:01
Comment on lines 93 to 108
@Test
public void makeHttpRequestsShouldReturnErrorWhenRequestDoesNotHaveOguryKeys() {
// given
final ObjectNode bidder = mapper.createObjectNode();
bidder.putIfAbsent("bidder", mapper.createObjectNode());
final BidRequest bidrequest = givenBidRequest(bidRequest ->
bidRequest.imp(List.of(Imp.builder().ext(bidder).build())));

// when
final Result<List<HttpRequest<BidRequest>>> result = target.makeHttpRequests(bidrequest);

// then
assertThat(result.getErrors()).isNotEmpty()
.contains(BidderError.badInput(
"Invalid request. assetKey/adUnitId or request.site.publisher.id required"));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add more tests that cover scenarios:

  • impWithOguryParams + site.publisher.id + impWithoutOguryParams
  • invalid impWithOguryParams + site.publisher.id + impWithoutOguryParams
  • impWithoutOguryParams
  • imp.tagId copied from imp.id
  • price tests (for each edge case)
  • test that checks imp.ext fields aren't lost, and new fields are added/replaced by impExtBidderHoist fields

@zxPhoenix zxPhoenix requested a review from CTMBNara March 17, 2025 17:28
@CTMBNara CTMBNara merged commit b6efb77 into prebid:master Apr 1, 2025
8 checks passed
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: Ogury

3 participants