Skip to content

UOE-12502: Disable country level filtering for adUnits onboarded in MBMF Phase 1#1090

Open
Pubmatic-Supriya-Patil wants to merge 12 commits intomasterfrom
UOE-12502
Open

UOE-12502: Disable country level filtering for adUnits onboarded in MBMF Phase 1#1090
Pubmatic-Supriya-Patil wants to merge 12 commits intomasterfrom
UOE-12502

Conversation

@Pubmatic-Supriya-Patil
Copy link
Copy Markdown
Collaborator

Description

Please add change description or link to ticket, docs, etc.

Checklist:

  • PR commit list is unique (rebase/pull with the origin branch to keep master clean).
  • JIRA number is added in the PR title and the commit message.
  • Updated the header-bidding repo with appropiate commit id.
  • Documented the new changes.

For Prebid upgrade, refer: https://inside.pubmatic.com:8443/confluence/display/Products/Prebid-server+upgrade


if !m.pubFeatures.IsMBMFCountry(rctx.DeviceCtx.DerivedCountryCode) {
return nil
if !m.pubFeatures.IsPubIdMBMFPhase1Enabled(rctx.PubID) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we add UT for this ?


//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) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Pubmatic-Supriya-Patil : Here when pub is not enabled for mbmf, how are we logging it as mbmfrequest?

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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@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 != "" {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Pubmatic-Supriya-Patil : checks are not arranged in logical order. It's not making code readable.

  1. publevel
  2. countrylevel

@Pubmatic-Supriya-Patil Pubmatic-Supriya-Patil changed the title Disable country level filtering for adUnits onboarded in MBMF Phase 1 UOE-12502: Disable country level filtering for adUnits onboarded in MBMF Phase 1 May 31, 2025
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.

3 participants