UOE-12502: Disable country level filtering for adUnits onboarded in MBMF Phase 1#1090
Open
Pubmatic-Supriya-Patil wants to merge 12 commits intomasterfrom
Open
UOE-12502: Disable country level filtering for adUnits onboarded in MBMF Phase 1#1090Pubmatic-Supriya-Patil wants to merge 12 commits intomasterfrom
Pubmatic-Supriya-Patil wants to merge 12 commits intomasterfrom
Conversation
|
|
||
| if !m.pubFeatures.IsMBMFCountry(rctx.DeviceCtx.DerivedCountryCode) { | ||
| return nil | ||
| if !m.pubFeatures.IsPubIdMBMFPhase1Enabled(rctx.PubID) { |
Collaborator
There was a problem hiding this comment.
can we add UT for this ?
ShriprasadM
requested changes
May 31, 2025
|
|
||
| //if pub entry present with is_enabled=1 AND no pub in mbmf_enabled wrapper_feature-> apply mbmf | ||
| //if pub entry present as is_enabled=0 -> don't apply mbmf | ||
| if !m.pubFeatures.IsMBMFPublisherEnabled(rctx.PubID) { |
Collaborator
There was a problem hiding this comment.
@Pubmatic-Supriya-Patil : Here when pub is not enabled for mbmf, how are we logging it as mbmfrequest?
modules/pubmatic/openwrap/util.go
Outdated
| adunitFormat := getAdunitFormat(reward, imp) | ||
| //don't apply mbmf if pub is not enabled for adunitFormat | ||
| if adunitFormat != "" && !m.pubFeatures.IsMBMFEnabledForAdUnitFormat(rctx.PubID, adunitFormat) { | ||
| m.metricEngine.RecordMBMFRequests(rctx.PubIDStr, 3) |
Collaborator
There was a problem hiding this comment.
@Pubmatic-Supriya-Patil : move constant numbers to variables. This will make code more readable
| //fallback to adunitformat multifloors if adunitlevel floors not present in DB | ||
| } | ||
|
|
||
| if adunitFormat != "" { |
Collaborator
There was a problem hiding this comment.
@Pubmatic-Supriya-Patil : add comment mentioning, ad unit level MBMF not found. Hence, looking up at adformat level
Comment on lines
2235
to
+2236
| mockFeature.EXPECT().IsMBMFCountry("IN").Return(false) | ||
| mockFeature.EXPECT().IsPubIdMBMFPhase1Enabled(5890).Return(false) |
Collaborator
There was a problem hiding this comment.
@Pubmatic-Supriya-Patil : checks are not arranged in logical order. It's not making code readable.
- publevel
- countrylevel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please add change description or link to ticket, docs, etc.
Checklist:
header-biddingrepo with appropiate commit id.For Prebid upgrade, refer: https://inside.pubmatic.com:8443/confluence/display/Products/Prebid-server+upgrade