Skip to content

Align Missena adapter request payload with PBS Go - #4509

Open
ysfbsf wants to merge 6 commits into
prebid:masterfrom
missena-corp:fix/missena-sample-param
Open

Align Missena adapter request payload with PBS Go#4509
ysfbsf wants to merge 6 commits into
prebid:masterfrom
missena-corp:fix/missena-sample-param

Conversation

@ysfbsf

@ysfbsf ysfbsf commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • align the Missena Java adapter outbound payload with the PBS Go adapter
  • replace the Missena bidder param test with sample
  • forward apiKey in params, plus top-level debug and userEids
  • update the Missena bidder schema, unit test, and integration fixtures

Testing

  • git diff --check -- src/main/java/org/prebid/server/bidder/missena src/main/java/org/prebid/server/proto/openrtb/ext/request/missena src/main/resources/static/bidder-params/missena.json src/test/java/org/prebid/server/bidder/missena src/test/resources/org/prebid/server/it/openrtb2/missena
  • jq empty src/main/resources/static/bidder-params/missena.json src/test/resources/org/prebid/server/it/openrtb2/missena/test-auction-missena-request.json src/test/resources/org/prebid/server/it/openrtb2/missena/test-missena-bid-request.json

@ysfbsf
ysfbsf force-pushed the fix/missena-sample-param branch from bb332db to a5365df Compare May 20, 2026 15:05
@ysfbsf ysfbsf changed the title Update Missena sample parameter handling Align Missena adapter request payload with PBS Go May 20, 2026
@Net-burst
Net-burst requested review from CTMBNara and osulzhenko June 15, 2026 16:24
@ysfbsf
ysfbsf requested a review from CTMBNara June 18, 2026 14:17
ysfbsf added 2 commits July 29, 2026 17:53
The adapter built bids without w/h, so every bid tripped creative size
validation with size 'nullxnull' and produced no hb_size targeting. The
Missena ad server already returns width and height in the response body;
parse them and map them onto the bid.
Resolves conflict in test-missena-bid-request.json: upstream reformatted
the fixture and added ext.prebid.server.http_method; reapplied the
apiKey param and the test -> sample rename on top.
@ysfbsf

ysfbsf commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@CTMBNara friendly ping for a re-review when you get a chance 🙏

The requested passthrough test was added back in June: makeBidsShouldReturnBidWithoutSizeWhenResponseHasNoSize covers the null-size path, and the makeBids assertions cover width/height reaching Bid.w/Bid.h. The branch was merged with upstream master on Jul 29 and is currently MERGEABLE.

Some context on why the size passthrough matters to us in production. With w/h unset, ResponseBidValidator.bannerSizeIsNotValid() treats the bid as invalid (bidW == null || bidW > maxSize.getW() || ...), so a live publisher currently gets:

BidResponse validation `warn`: bidder `missena` response triggers creative size validation
for bid <id>, account=<id>, max imp size='320x100', bid response size='nullxnull'

On warn the bid survives but reaches the ad server with no hb_size targeting key, so size-keyed line items can't match. On any account configured with enforce, every Missena banner bid is dropped as RESPONSE_REJECTED_INVALID_CREATIVE_SIZE_NOT_ALLOWED.

Happy to make any further changes needed to get this over the line.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@CTMBNara The bid server expects name@version (Prebid.js sends prebid.js@<version>, Go sends prebid-server@<version>). PrebidVersionProvider yields pbs-java/<version>, so I reshape it in resolveVersion() rather than touching the shared provider. Kept -java so Go and Java traffic stay distinguishable. Falls back to prebid-server-java@unknown, with a test for that case.

Comment on lines +165 to +168
final JsonNode body = mapper.readTree(result.getValue().getFirst().getBody());
assertThat(body.at("/params/apiKey").asText()).isEqualTo("apiKey1");
assertThat(body.at("/debug").asBoolean()).isTrue();
assertThat(body.at("/userEids/0/source").asText()).isEqualTo("id-source");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This checks are redundant

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@CTMBNara Agreed, removed. containsExactly(expectedPayload) above already covers them. Also dropped the now-unused JsonNode/IOException imports.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add givenBidRequest(UnaryOperator<BidRequest.BidRequestBuilder> bidRequestCustomizer, Imp... imps)
method and use it instead of givenBidRequest(...).toBuilder()...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added, and all .toBuilder() call sites now use it. The old givenBidRequest(UnaryOperator<Imp.ImpBuilder>...) had to become givenBidRequest(Imp... imps), since keeping both made givenBidRequest(imp -> ...) ambiguous. Call sites now pass givenImp(...), as in VisibleMeasuresBidderTest.

ysfbsf added 2 commits August 13, 2026 16:43
Send the version as `prebid-server-java@<version>` to follow the
`name@version` convention the bid server already receives from Prebid.js
(`prebid.js@<version>`) and Prebid Server Go (`prebid-server@<version>`),
while keeping Go and Java traffic distinguishable. Falls back to
`prebid-server-java@unknown` when the version record is unavailable.

Drop the JSON body assertions in makeHttpRequestsShouldMakeRequestForFirstValidImp;
the preceding containsExactly(expectedPayload) already compares the whole
payload, so they were redundant.

Add givenBidRequest(UnaryOperator<BidRequest.BidRequestBuilder>, Imp...) and
use it in place of givenBidRequest(...).toBuilder(). The existing imp-customizer
overload is replaced by givenBidRequest(Imp...) as in VisibleMeasuresBidderTest,
since two overloads both taking a lambda first are ambiguous at the call site.
@ysfbsf
ysfbsf requested a review from CTMBNara August 13, 2026 16:42
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.

2 participants