Closed Bug 1927625 Opened 2 years ago Closed 2 years ago

New "rectangle" ad type or other spoc can appear in a topsite position

Categories

(Firefox :: New Tab Page, defect, P1)

defect

Tracking

()

VERIFIED FIXED
134 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox132 --- unaffected
firefox133 --- verified
firefox134 --- verified

People

(Reporter: amy, Assigned: amy)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [hnt])

Attachments

(1 external file)

In bug 1926056 we accidentally introduced a bug

The reduce here: https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/DiscoveryStreamFeed.sys.mjs#1192-1204 is putting the merged results into the sponsored-topsites prop also.

Summary: New ad appears in third topsite position → New "rectangle" ad type appears in third topsite position also

Possible solutions:

We should also write a test.

Good people to tag for review are: mconley, dmueller, along with the #home-newtab-reviewers group

Summary: New "rectangle" ad type appears in third topsite position also → New "rectangle" ad type appears in third topsite position

I've tinkered with this a little bit, and I'm pretty convinced that any client using the UAPI codepath might hit this, even without the medium rectangle being fetched. A few bad random dice rolls for the share-of-voice calculation can still result in the "sponsored-topsites" placement getting filled with something from the spocs set fetched from UAPI.

I think we're going to want to nominate this fix for the 132 dot release, as we're planning on doing a controlled rollout for the UAPI endpoints for 132 in a few weeks.

[Tracking Requested - why for this release]:

We're planning on doing a controlled rollout for both 133 Beta and 132 Release to the new MARS UAPI endpoints. We've discovered a client bug that can result in a spoc being rendered in a Top Sites placement when using the UAPI codepaths, which we'd really like to avoid before the wider rollout.

Summary: New "rectangle" ad type appears in third topsite position → New "rectangle" ad type or other spoc can appear in a topsite position

It was pointed out that there's a Nimbus feature that lets us disable the placement in Top Sites that the UAPI is filling, which means we can workaround this behaviour on Beta and Release for the rollout. This reduces the need for us to patch the issue in the 132 planned dot release.

Assignee: nobody → achurchwell
Status: NEW → ASSIGNED

After some deeper analysis, it looks like this does not affect Release 132.

Blocks: 1928204
Pushed by achurchwell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93b69a8cf614 – New "rectangle" ad type or other spoc can appear in a topsite position. r=mconley,dmueller,home-newtab-reviewers,nbarrett
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch

The patch landed in nightly and beta is affected.
:amy, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox133 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(achurchwell)

Comment on attachment 9434038 [details]
Bug 1927625 – New "rectangle" ad type or other spoc can appear in a topsite position. r=#home-newtab-reviewers,mconley,dmueller

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: We're planning on doing a controlled rollout for both 133 Beta and 132 Release to the new MARS UAPI endpoints. We've discovered a client bug that can result in a spoc being rendered in a Top Sites placement when using the UAPI codepaths, which we'd really like to avoid before the wider rollout.

  • Is this code covered by automated tests?: No

  • Has the fix been verified in Nightly?: Yes

  • Needs manual test from QE?: Yes

  • If yes, steps to reproduce: In a new profile, set the following prefs:

    Set "browser.newtabpage.activity-stream.asrouter.devtoolsEnabled" to true
    Set "browser.newtabpage.activity-stream.unifiedAds.spocs.enabled" to true
    Set "browser.newtabpage.activity-stream.discoverystream.placements.spocs" to "newtab_spocs, newtab_rectangle"
    Set "browser.newtabpage.activity-stream.discoverystream.placements.spocs.counts" to "6, 1"
    Set "browser.newtabpage.activity-stream.newtabAdSize.variant-a" to true, or "browser.newtabpage.activity-stream.newtabAdSize.variant-b" to true

Open about:newtab#devtools
Click "Refresh Cache"

Then, start dismissing the default sponsored topsites, starting from the left-most one.
Expected result: No koala ever appears in top sites

The koala image is our test of the new ad.

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This change updates the way we populate sponsored topsites. This is non-critical user functionality, but does impact the way Firefox serves ads.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(achurchwell)
Attachment #9434038 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9434038 [details]
Bug 1927625 – New "rectangle" ad type or other spoc can appear in a topsite position. r=#home-newtab-reviewers,mconley,dmueller

Approved for 133.0b5

Attachment #9434038 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I have verified this issue using Firefox Nightly 134.0a1, build ID: 20241105092845 and Firefox Beta 133.0b5, build ID: 20241106091549 on Windows 10 x64, macOS 14.5 and Linux Mint 22.1 and I can confirm that the issue is no longer reproducible.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: