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

Remove Restrictions for UUID Generation For Stored Bid Requests #2203

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

AlexBVolcy
Copy link
Contributor

This PR is a follow to two previous PRs #1938 and #2000

In those PRs, the goal was to generate a UUID for when an app or amp request had a stored bid request and that stored bid request had an ID = {{UUID}} or a config flag GenerateRequestId was set to true.

This update removes the restriction where the auction endpoint would check if the request was an app request, and instead, as long as the request has a stored request, and the macro {{UUID}} or the config flag is set to true, the UUID would be generated.

@@ -1879,7 +1879,7 @@ func TestStoredRequestGenerateUuid(t *testing.T) {
expectedID: "ThisID",
},
{
description: "GenerateRequestID is true, but rawData is a site request, we should not generate uuid",
description: "GenerateRequestID is true, and rawData is a site request, we should generate uuid",
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we should generate a uuid, then shouldn't expectedID be uuid?

return nil, nil, []error{err}
}
if isAppRequest && (deps.cfg.GenerateRequestID || bidRequestID == "{{UUID}}") {
if deps.cfg.GenerateRequestID || bidRequestID == "{{UUID}}" {
Copy link
Contributor

@SyntaxNode SyntaxNode Mar 28, 2022

Choose a reason for hiding this comment

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

The original feature request changed a few times, but I believe we decided to generate a new bid request id for app and amp auctions. I'm good with expanding this to any request type if the special {{UUID}} token is used in the stored request, but the deps.cfg.GenerateRequestID should still be scoped to app and amp requests, IMHO.

ie: something more akin to

(deps.cfg.GenerateRequestID && (isApp || isAmp)) || bidRequestID == "{{UUID}}"

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 This has been addressed. The amp endpoint handles the amp case by generating a request ID if deps.cfg.GenerateRequestID is set.

Copy link
Collaborator

@hhhjort hhhjort 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.

LGTM

@bsardo bsardo merged commit 2807ff1 into prebid:master Apr 4, 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
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.

4 participants