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

🐞 Multiple prebid server endpoints - too strict validations #12723

Closed
muuki88 opened this issue Feb 3, 2025 · 1 comment · Fixed by #12727
Closed

🐞 Multiple prebid server endpoints - too strict validations #12723

muuki88 opened this issue Feb 3, 2025 · 1 comment · Fixed by #12727

Comments

@muuki88
Copy link
Collaborator

muuki88 commented Feb 3, 2025

Type of issue

🐞Bug
⚡Feature

Description

Configuring multiple prebid server instances is surprisingly tricky. I stumbled upon multiple layers of validation and unexpected side effects. Here's a quick summary with more details below.

  1. TCF restrictions for server-side bidders  #12084 , gvlMapping or vendorExceptions are necessary when the tcfConsentModule is active
  2. If you have multiple s2sConfig entries and set one to enabled: false, no requests will be sent to any s2sConfig instance
  3. If there's no client adapter, but the bid params a configured client-side, additional params and bid config properties need to be added

At the end I hope to finish prebid/prebid.github.io#5033

(1) TCF Mapping

#12084 sums it up perfectly. gvlMapping is a valid solution, while I need to document this more.

(2) Disabling a single entry, disables all entries

If you have two entries

{
                s2sConfig: [
                    {
                        enabled: true, // !! turn this false, and not pbs request are sent !!
                        bidders: ['bidderB'],

                        accountId: '123456',
                        endpoint: {
                            p1Consent: 'https://prebid.adnxs.com/pbs/v1/auction'
                        }
                    },
                    {
                        enabled: true,
                        bidders: ['bidderA'],

                        accountId: '123456',
                        endpoint: {
                            p1Consent: 'https://mp.4dex.io/pbs/openrtb2/auction',
                        }
                    }
                ]
}

and set enabled: false for one of them, no requests for both of them are sent. This because

const optionsValid = normalizedOptions.every((option, i, array) => {
formatUrlParams(option);
const updateSuccess = updateConfigDefaultVendor(option);
if (updateSuccess !== false) {
const valid = validateConfigRequiredProps(option);

yield false due to no default vendor being set

// this is how we can know if user / defaultVendor has set it, or if we should default to false
return option.enabled = typeof option.enabled === 'boolean' ? option.enabled : false;

I think this is a bug. If you want to have different prebid servers or pbs hosting companies, then disabling one should disable everything. Use cases are

  1. performance testing two vendors
  2. enabling different configs depending on geo
  3. run different subsets of bidders on different pbs instances

I know, that one could filter the array on the publisher side, but why is there an enabled flag then 😛 The demo page below can be used to test this.

(3) client-side adapter requirement

TASK FOR MUKI TO DOCUMENT

If you run a pbs auction on the server, there should be no client-side adapter necessary. There has been great progress:

I think it's working as shown on the test page. It seems the bid.params.configName and bid.module = 'pbsBidAdapter' are not necessary. Even though I had a certain state where it wasn't working, I thought I pinned it down to this

const s2sBids = adUnit.bids.filter((b) => b.module === PBS_ADAPTER_NAME && b.params?.configName === s2sConfig.configName);
if (s2sBids.length === 1) {
adUnit.s2sBid = s2sBids[0];
hasModuleBids = true;
adUnit.ortb2Imp = mergeDeep({}, adUnit.s2sBid.ortb2Imp, adUnit.ortb2Imp);

Test page

https://jsbin.com/legafiwoqe/edit?html,console

Expected results

If I set enable: false for one s2sConfig , the others are still enabled.

Actual results

All are disabled.

Platform details

Prebid 9.x

Other information

@dgirardi
Copy link
Collaborator

dgirardi commented Feb 4, 2025

The test page generates "missing undefined" errors for me because the PBS adapter expects each config's adapter option to be set. With #12727 those default to "prebidServer".

It seems the bid.params.configName and bid.module = 'pbsBidAdapter' are not necessary

They only affect "module" bids for stored impression scenarios, to decide which instance to route them to - since there's no bidders to use for that purpose. There's an example here

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

Successfully merging a pull request may close this issue.

2 participants