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

Ext Fields Exposed to Bidders #2331

Merged
merged 4 commits into from
Aug 10, 2022
Merged

Conversation

SyntaxNode
Copy link
Contributor

Resolves #2321

@@ -48,7 +48,7 @@ type bidExt struct {
}

type bidTtxExt struct {
MediaType string `json:mediaType,omitempty`
MediaType string `json:"mediaType,omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated issue discovered during this PR.

"districtm": "appnexus"
}
}
"prebid": {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is an existing behavior where if ext.prebid is empty the empty object is written to the request. It's easy to remove this field instead. Is that safe? I imagine the current functionality is an accident, but it does provide a signal downstream that the request was processed by PBS. Do you think it's important to preserve that behavior? I'd personally love to make the request as compact/small as possible.

}
}
}],
],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used a different json formatter, so there will be some of these minor changes. The VS Code Beautify plugin is no longer maintained.


CurrencyConversions *ExtRequestCurrency `json:"currency,omitempty"`
BidderConfigs []BidderConfig `json:"bidderconfig,omitempty"`
Experiment *Experiment `json:"experiment,omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I alphabetized the list for easy of reading, except for NoSale since it has a length commend which breaks the code flow.

return false
}
return true
return reqExt != nil && reqExt.Prebid.SChains != nil
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplifying while I came across it.

@bsardo bsardo self-requested a review August 2, 2022 15:10
@bsardo bsardo self-assigned this Aug 2, 2022
@bsardo bsardo requested a review from VeronikaSolovei9 August 2, 2022 17:30
Copy link
Contributor

@VeronikaSolovei9 VeronikaSolovei9 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@bsardo bsardo 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. Just a couple of comments.
Also I see on the corresponding issue that the following fields are also permitted:

ext.prebid.interstitial
ext.prebid.multibid (only their value)
ext.prebid.auctiontimestamp

I don't see any evidence that we support these at the moment, however, I do see that multibid is currently being worked on.

Comment on lines 402 to 403
sanitizedImpExt := make(map[string]json.RawMessage, 8)
sanitizedImpPrebidExt := make(map[string]json.RawMessage, 8)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the size of these be 6 and 2 respectively instead of 8 and 8?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

sanitizedImpExt[openrtb_ext.PrebidExtKey] = impExtPrebidJSON
} else {
return nil, fmt.Errorf("cannot marshal ext.prebid: %v", err)
}
}

// copy reserved imp[].ext fields known to bot be bidder names
Copy link
Collaborator

Choose a reason for hiding this comment

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

Super nitpick: typo "bot be"

@SyntaxNode
Copy link
Contributor Author

Looks good. Just a couple of comments. Also I see on the corresponding issue that the following fields are also permitted:

ext.prebid.interstitial
ext.prebid.multibid (only their value)
ext.prebid.auctiontimestamp

I don't see any evidence that we support these at the moment, however, I do see that multibid is currently being worked on.

ext.prebid.interstitial is a typo in the docs and should actually be device.ext.prebid.interstitial which does not need to be pruned because it's the only field in that ext.

ext.prebid.multibid is not yet implemented in PBS-Go.

ext.prebid.auctiontimestamp also doesn't exist in PBS-Go. Not sure why, we should look into that - but I think that's best handled separately.

Copy link
Collaborator

@bsardo bsardo left a comment

Choose a reason for hiding this comment

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

LGTM

@bsardo bsardo merged commit 5f46291 into prebid:master Aug 10, 2022
wwwyyy pushed a commit to wwwyyy/prebid-server that referenced this pull request Aug 12, 2022
* 'master' of https://github.com/wwwyyy/prebid-server:
  Add account-specific error metrics to setuid endpoint (prebid#2337)
  Add iframe usersync support for ix (prebid#2328)
  Ext Fields Exposed to Bidders (prebid#2331)
  Add redirect sync to richaudienceAdapter (prebid#2343)
pm-aadit-patil pushed a commit to PubMatic-OpenWrap/prebid-server that referenced this pull request Sep 22, 2022
pm-aadit-patil pushed a commit to PubMatic-OpenWrap/prebid-server that referenced this pull request Sep 22, 2022
pm-aadit-patil pushed a commit to PubMatic-OpenWrap/prebid-server that referenced this pull request Sep 22, 2022
jorgeluisrocha pushed a commit to jwplayer/prebid-server that referenced this pull request Sep 28, 2022
shunj-nb pushed a commit to ParticleMedia/prebid-server that referenced this pull request Nov 8, 2022
@SyntaxNode SyntaxNode deleted the scrub_prebid_ext branch April 20, 2023 20:45
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.

eidpermissions Exposed to Bidders
3 participants