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?

Fix issue #3592. Bad Input Error if pbjs s2s config contains alias configuration for a disabled adapter.
Move unknown bidder and bidder is deactivated errors to warnings level.
Add unknown_bidder and deactivated_bidder metrics

🧠 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

Changes are covered by unit tests.

🏎 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 Bad Input Error if pbjs s2s config contains alias configuration for a disabled adapter Fix #3592. Bad Input Error if pbjs s2s config contains alias configuration for a disabled adapter Dec 23, 2024
@zxPhoenix zxPhoenix force-pushed the fix-fallen-auction-for-a-disabled-adapter branch from 22c0aa7 to ff61c81 Compare December 24, 2024 13:47
@osulzhenko
Copy link
Collaborator

The issue is in Community Review status, so we will wait for confirmation

.compose(httpRequest -> createBidRequest(httpRequest)
.map(bidRequest -> removeEmptyEids(bidRequest, initialAuctionContext.getDebugWarnings()))
.compose(bidRequest -> validateRequest(
initialAuctionContext.getAccount(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

initialAuctionContext.getAccount() will always return null here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can accept it this way, since we haven't supported Video endpoint for many months now.

Comment on lines 332 to 353
public void updateAdapterRequestDisabledBidderMetric(String bidder, Account account) {
forAdapter(bidder).request().incCounter(MetricName.disabled_bidder);
if (accountMetricsVerbosityResolver.forAccount(account)
.isAtLeast(AccountMetricsVerbosityLevel.detailed)) {
forAccount(account.getId()).adapter().forAdapter(bidder).request().incCounter(MetricName.disabled_bidder);
}
}

public void updateAdapterRequestUnknownBidderMetric(String bidder, Account account) {
forAdapter(bidder).request().incCounter(MetricName.unknown_bidder);
if (accountMetricsVerbosityResolver.forAccount(account)
.isAtLeast(AccountMetricsVerbosityLevel.detailed)) {
forAccount(account.getId()).adapter().forAdapter(bidder).request().incCounter(MetricName.unknown_bidder);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't like this solution. Someone can spam the server with invalid bidders and load the memory by creating new entries in the map (with many invalid bidders).

@osulzhenko
Copy link
Collaborator

@zxPhoenix could you please update this PR?

@zxPhoenix
Copy link
Contributor Author

@zxPhoenix could you please update this PR?

Sure. Sorry for the delay. I have prioritised this PR.

@zxPhoenix zxPhoenix force-pushed the fix-fallen-auction-for-a-disabled-adapter branch from ff61c81 to 3119f39 Compare February 4, 2025 14:53
@zxPhoenix zxPhoenix requested a review from CTMBNara February 5, 2025 10:05
@zxPhoenix zxPhoenix requested a review from CTMBNara February 10, 2025 09:00
@CTMBNara CTMBNara merged commit cd771c0 into prebid:master Feb 14, 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.

Bad Input Error if pbjs s2s config contains alias configuration for a disabled adapter

4 participants