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

core: allow bid adapters to return null fledgeAuctionConfigs #11271

Merged
merged 3 commits into from Apr 3, 2024

Conversation

dgirardi
Copy link
Collaborator

Type of change

  • Bugfix

Description of change

Allow adapters to return an object with null/undefined paapi configs (e.g. {bids: [...]}), to avoid boilerplate that unwraps return values from ortbConverter.

@dgirardi dgirardi force-pushed the allow-object-adapter-response branch from 807dfa0 to b0ce604 Compare March 28, 2024 19:59
Copy link
Collaborator

@robertrmartinez robertrmartinez left a comment

Choose a reason for hiding this comment

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

Is there a plan to migrate to something different than fledgeAuctionConfigs at all?

Not involved in this project much but I know the name fledge has gone away.

Should we add support for a key paapiConfigs?

@dgirardi
Copy link
Collaborator Author

dgirardi commented Apr 2, 2024

Excellent suggestion @robertrmartinez. As a punishment for it, you'll need to review again.

@dgirardi dgirardi force-pushed the allow-object-adapter-response branch from e6d2edd to e6fa848 Compare April 2, 2024 16:47
@dgirardi dgirardi force-pushed the allow-object-adapter-response branch from e6fa848 to a514701 Compare April 2, 2024 16:50
Copy link
Collaborator

@robertrmartinez robertrmartinez left a comment

Choose a reason for hiding this comment

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

LGTM

throw new Error(`Adapter response should use ${PAAPI_RESPONSE_PROPS[0]} over ${PAAPI_RESPONSE_PROPS[1]}, not both`);
}
return paapi ?? fledge;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

niiiiice

bids: bids,
[paapiProp]: [paapiConfig]
});
bidder.callBids(bidRequest, addBidResponseStub, doneStub, ajaxStub, onTimelyResponseStub, wrappedCallback);
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe a test for prefers 'paapiAuctionConfigs' over 'fledgeAuctionConfigs' if both defined?

Prob not a real life scenario though so maybe not!

Copy link
Collaborator

@Rothalack Rothalack left a comment

Choose a reason for hiding this comment

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

Looks good!

@dgirardi dgirardi merged commit b8786a9 into prebid:master Apr 3, 2024
4 checks passed
mefjush pushed a commit to adhese/Prebid.js that referenced this pull request Apr 8, 2024
…11271)

* core: allow bid adapters to return null fledgeAuctionConfigs

* Accept paapiAuctionConfigs from adapters

* add test case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants