-
Notifications
You must be signed in to change notification settings - Fork 739
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
Removed old 2.5 location usages #3923
Conversation
The functions |
adapters/algorix/algorix.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to modify the adapters. Adapters may not support 2.6. We're updating core to work with 2.6 but will down convert to 2.5 for adapters that don't declare 2.6 support. Even if an adapter does declare 2.6 support in their YAML file, I think we should leave it to the bidder to update their adapter since they must also support 2.5 at this point in time. Thoughts?
Any opinions on how to handle those adapters that do declare 2.6 support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline. For now, we will only update adapters that have declared 2.6 support in their YAML. In the future, once this feature has been rolled out, any new adapter PRs that declare 2.6 support will also require a review of their adapter to ensure they are accessing only 2.6 fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adapters reverted.
@@ -174,15 +174,11 @@ func (l *AgmaLogger) extractPublisherAndSite(requestWrapper *openrtb_ext.Request | |||
} | |||
|
|||
func (l *AgmaLogger) shouldTrackEvent(requestWrapper *openrtb_ext.RequestWrapper) (bool, string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting case that could require us to support both 2.5 and 2.6. Analytics modules could be called before the up convert occurs if there is an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upconvert happens right after the wrapper is created in all three endpoints. So if the module is operating on the openrtb struct, we can be confident that it has the 2.6 version. If it is operating on the byte array, it is getting whatever was sent to the endpoint, which could be anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have requestWrapper *openrtb_ext.RequestWrapper
as input to this function.
Do we still want to check old locations?
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
We will need to update |
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
exchange/gdpr_test.go
Outdated
description: "User Ext Consent is not empty", | ||
giveUser: &openrtb2.User{Ext: json.RawMessage(`{"consent": "BOS2bx5OS2bx5ABABBAAABoAAAAAFA"}`)}, | ||
description: "User Consent is not empty", | ||
giveUser: &openrtb2.User{Consent: "BOS2bx5OS2bx5ABABBAAABoAAAAAFA"}, | ||
wantConsent: "BOS2bx5OS2bx5ABABBAAABoAAAAAFA", | ||
}, | ||
{ | ||
description: "User Ext Consent is empty", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change description name to "User consent is empty"
schain/schainwriter.go
Outdated
} else { | ||
sourceCopy := *req.Source | ||
req.Source = &sourceCopy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need this to avoid shared memory issues since Source
is a pointer and we will only have made shallow copies of the request for each bidder.
schain/schainwriter.go
Outdated
schain := openrtb_ext.ExtRequestPrebidSChain{ | ||
SChain: *selectedSChain, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right that we need to delete this block, however, notice that we were copying the value of the selected schain, which I believe was being done to protect against shared memory issues. Following this logic, when we make the assignment below:
req.Source.SChain = selectedSChain
I think we should instead be copying the value of selectedSChain
to req.Source.SChain
.
I suggest the following approach to accomplish this as I think it is clearer than the alternative:
- Change
var selectedSChain *openrtb2.SupplyChain
tovar selectedSChain openrtb2.SupplyChain
- Update the
selectedSChain
assignments so values are copied to it instead of memory addresses - Change
req.Source.SChain = selectedSChain
toreq.Source.SChain = &selectedSChain
schain/schainwriter_test.go
Outdated
}, | ||
}, | ||
}, | ||
Ext: json.RawMessage(`{` + seller2SChain + `}`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change the description of this test from:
Use schain for bidder in ext.prebid.schains; ensure other ext.source field values are retained
to:
Use schain for bidder in ext.prebid.schains; ensure other source field values are retained
And to reduce confusion, perhaps change:
Ext: json.RawMessage(`{` + seller2SChain + `}`),
to:
Ext: json.RawMessage(`{"some":"data"}`),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the test case:
description: "Use source schain -- no bidder schain or wildcard schain in nil ext.prebid.schains",
so source.schain
is set and unmodified instead of source.ext.schain
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update description or test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops sorry if this wasn't clear. I wasn't asking for you to update the description but rather was pointing out that I think we should update this particular test case so source.schain
is set in givenRequest
instead of source.ext.schain
and that we confirm it is not modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! Sorry I confused myself :) Added.
privacy/gdpr/consentwriter.go
Outdated
@@ -19,21 +19,18 @@ func (c ConsentWriter) Write(req *openrtb2.BidRequest) error { | |||
reqWrap := &openrtb_ext.RequestWrapper{BidRequest: req} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need to wrap the request if we aren't using exts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This writer appears to only be used on the AMP endpoint and it is being instantiated prior to the upconvert. I assume we want to make these changes anyway so that we set the consent string in the 2.6 location rather than relying on the upconvert logic so that we can get rid of this 2.5 logic.
privacy/ccpa/consentwriter.go
Outdated
} | ||
} | ||
|
||
// do we need to rebuild req here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need to wrap the request if we aren't using exts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need to wrap the request on line 19 if we aren't using exts.
userExt, err := reqWrapper.GetUserExt() | ||
if err == nil && userExt != nil && userExt.GetConsent() != nil { | ||
b.macros[MacroKeyConsent] = *userExt.GetConsent() | ||
//is this happening after upconvert? | ||
if reqWrapper.User != nil && len(reqWrapper.User.Consent) > 0 { | ||
b.macros[MacroKeyConsent] = reqWrapper.User.Consent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. I can reach out to the event framework author to see what their intent is. Depending on their answer we will either need to look at both the 2.5 and 2.6 locations or just the 2.6 location.
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
# Conflicts: # endpoints/openrtb2/amp_auction_test.go
Code coverage summaryNote:
openxRefer here for heat map coverage report
|
No description provided.