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

IX: fix ix adapter handling of paapi config #3563

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

Conversation

oronno
Copy link

@oronno oronno commented Nov 21, 2024

🔧 Type of changes

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

✨ What's the context?

This is the fix of paapi auction config handling for IX Adapter as described in #3562

🧠 Rationale behind the change

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

This change aligns with how Index Exchange formats the auction configuration for the PAAPI response.

🔎 New Bid Adapter Checklist

  • verify email contact works
  • NO fully dynamic hosts
  • geographic host parameters are NOT required
  • NO 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?

Comment on lines 37 to 51
@Test
public void openrtb2AuctionShouldRespondWithBidsFromIxForPrivacySandboxRequest() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/ix-exchange"))
.withRequestBody(equalToJson(jsonFrom("openrtb2/ix/privacy-sandbox-test-ix-bid-request.json",
prebidVersionProvider)))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/ix/privacy-sandbox-test-ix-bid-response.json"))));

// when
final Response response = responseFor("openrtb2/ix/privacy-sandbox-test-auction-ix-request.json",
Endpoint.openrtb2_auction);

// then
assertJsonEquals("openrtb2/ix/privacy-sandbox-test-auction-ix-response.json", response, singletonList("ix"));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

do not need to create a separate integration test and a separate set of the json files, just use your json files for the existing test

Copy link
Author

Choose a reason for hiding this comment

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

Do you mean keeping only the Privacy Sandbox scenario test and deleting the regular one? I’d say having both makes sense, as the intention behind these two tests is different—one tests the Privacy Sandbox request scenario, while the other covers a regular (non-Privacy Sandbox) case.

Copy link
Collaborator

@AntoxaAntoxic AntoxaAntoxic Nov 25, 2024

Choose a reason for hiding this comment

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

Our integration tests are mainly for the bidder configuration verification. But, since your test case extends the regular one, I suggest using yours payloads instead. So please replace existing JSON payloads with yours.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, updated the base case.

@osulzhenko osulzhenko linked an issue Nov 25, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IX: Incorrect Handling of FledgeAuctionConfig in Bidder Response
2 participants