Alias: Do not inherit the GVL ID from the parent by default#4641
Alias: Do not inherit the GVL ID from the parent by default#4641sigma-software-prebid wants to merge 1 commit intoprebid:masterfrom
Conversation
| aliasBidderInfo.ExtraAdapterInfo = parentBidderInfo.ExtraAdapterInfo | ||
| } | ||
| if aliasBidderInfo.GVLVendorID == 0 { | ||
| if aliasBidderInfo.GVLVendorID == nil { |
There was a problem hiding this comment.
Wouldn't this still have the behavior of inheriting the GVL ID from the parent by default?
There was a problem hiding this comment.
@SyntaxNode According to the requirements in #4463, we now will have 3 cases:
- If we do not have GVL ID in configs and it is
nilthen we inherit from parent (default behavior). - If we have GVL ID == 0 then we do not inherit from parent and use zero as value.
- If GVL ID != 0 meaning it is present and is not equal to zero then we have own value and we use it (also do not inherit from parent).
There was a problem hiding this comment.
@SyntaxNode perhaps we should tweak the requirements so an alias never inherits the GVL ID to be safe? If the alias has the same GVL ID as its parent it would need to explicitly declare that GVL ID. Thoughts?
There was a problem hiding this comment.
@bsardo Yes, I think so. The use of nil and 0 is clever, but confusing and is an "opt-out" where the alias needs to take action to not inherit. I agree your suggestion would be simpler to never inherit the GVLID.
To avoid breaking existing adapters, can we update aliases to match their parent as a one time migration with this change?
🔧 Type of changes
✨ What's the context?
#4463
🧠 Rationale behind the change
An alias should not inherit the GVL ID from the parent by default. There should be a way to detect GVL ID presence in the alias config. If not provided, inherit from the parent. If set to 0, that indicates no GVL ID and do not inherit from the parent.
In scope of this change
GVLVendorID's type has been changed to pointer.🧪 Test plan
Functionality is covered by
TestAliasGVLVendorIDInheritanceunit test inconfig/bidderinfo_test.go.