Skip to content

Conversation

@AntoxaAntoxic
Copy link
Collaborator

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

What's the context for the changes?

🧠 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

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?

…d-codes-in-modules

# Conflicts:
#	extra/modules/greenbids-real-time-data/src/main/java/org/prebid/server/hooks/modules/greenbids/real/time/data/v1/GreenbidsRealTimeDataProcessedAuctionRequestHook.java
@AntoxaAntoxic AntoxaAntoxic requested a review from And1sS February 25, 2025 09:20
@osulzhenko osulzhenko changed the title Support seatnonbid Codes in Modules Core: Support seatnonbid Codes in Modules Feb 28, 2025
…dules

# Conflicts:
#	extra/modules/greenbids-real-time-data/src/main/java/org/prebid/server/hooks/modules/greenbids/real/time/data/config/GreenbidsRealTimeDataConfiguration.java
#	extra/modules/greenbids-real-time-data/src/main/java/org/prebid/server/hooks/modules/greenbids/real/time/data/core/GreenbidsInvocationService.java
#	extra/modules/ortb2-blocking/src/test/java/org/prebid/server/hooks/modules/ortb2/blocking/core/BidsBlockerTest.java
#	extra/modules/pb-richmedia-filter/src/test/java/org/prebid/server/hooks/modules/pb/richmedia/filter/core/BidResponsesMraidFilterTest.java
#	src/main/java/org/prebid/server/analytics/reporter/greenbids/GreenbidsAnalyticsReporter.java
#	src/main/java/org/prebid/server/auction/BidResponseCreator.java
#	src/main/java/org/prebid/server/auction/model/BidRejectionTracker.java
#	src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java
#	src/test/java/org/prebid/server/auction/ExchangeServiceTest.java
#	src/test/java/org/prebid/server/auction/model/BidRejectionTrackerTest.java
return CollectionUtils.isEmpty(accounts) || accounts.contains(account);
}

//todo: should it be more strict? e.g. allowing rejecting only imps/bids on the particular stages
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment on lines 138 to 145
public Map<String, List<Rejected>> getAllRejected() {
final Map<String, List<Rejected>> missingImpIds = new HashMap<>();
for (String impId : involvedImpIds) {
final Set<String> succeededBids = succeededBidsIds.getOrDefault(impId, Collections.emptySet());
if (succeededBids.isEmpty() && !rejectedBids.containsKey(impId)) {
missingImpIds.computeIfAbsent(impId, key -> new ArrayList<>())
.add(Pair.of(null, BidRejectionReason.NO_BID));
.add(RejectedImp.of(impId, BidRejectionReason.NO_BID));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This method is only used in tests. Please, remove

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's used in the analytics as well

@Value(staticConstructor = "of")
public class RejectedBid implements Rejected {

BidderBid bid;
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to store whole bid meta, can be simplified to:

@Accessors(fluent = true)
@Value(staticConstructor = "of")
public class RejectedBid implements Rejected {

    String bidId;

    String impId;

    BidRejectionReason reason;

    public static RejectedBid of(BidderBid bid, BidRejectionReason reason) {
        return of(bid.getBid().getId(), bid.getBid().getImpid(), reason);
    }
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The whole bid might be needed for the analytics, because usually if a bid is rejected it's removed from the BidResponse, so this way the rejected bid is preserved.

@osulzhenko osulzhenko requested a review from And1sS September 18, 2025 14:32
@CTMBNara CTMBNara merged commit ae10a63 into master Sep 19, 2025
7 of 8 checks passed
@CTMBNara CTMBNara deleted the non-bid-codes-in-modules branch September 19, 2025 10:07
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.

5 participants