Closed Bug 1811175 Opened 2 years ago Closed 2 years ago

Implement fallback protocol for sponsored tiles

Categories

(Fenix :: Top Sites, task)

All
Android
task

Tracking

(firefox110 unaffected, firefox111 unaffected, firefox112 wontfix, firefox113 verified)

VERIFIED FIXED
113 Branch
Tracking Status
firefox110 --- unaffected
firefox111 --- unaffected
firefox112 --- wontfix
firefox113 --- verified

People

(Reporter: aputanu, Assigned: aputanu)

References

Details

Attachments

(2 files)

If we do not successfully receive data from adM or Contile within our refresh period, we should serve content in its place until the situation is remedied. (“As a user, I don’t want my contextual experience degraded because of background issues.”)

The Contile: Fallback Protocol for Sponsored TopSites adds a header to the Contile response including extra “staleness” information.

Severity: -- → N/A
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: qe-verify+
Resolution: --- → FIXED

I've tested the following scenarios:

  1. On the latest Nightly 112.0a1 (2023-03-01) build I've activated the Sponsored Shortcuts feature by setting a target locale for it on a VPN.
    After checking that the Sponsored Shortcuts are displayed, I've closed both the VPN and the Nightly.
    I've set the time to 1h5m ahead and reopened Nightly to check if the Sponsored Shortcuts are no longer displayed.

  2. On a debug build created by Alexandru for this scenario I've activated the Sponsored Shortcuts feature.
    After checking that the Sponsored Shortcuts are displayed, I've closed the app.
    With the help of Alexandru using Postman to modify to get 204 status code, I then reopened Nightly again to see if the Sponsored Shortcuts are no longer displayed.

On both cases the Sponsored Shortcuts were no longer displayed.
Device used for testing: Google Pixel 7 (Android 13).
Marking the ticket as Verified Fixed.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Authored by https://github.com/Alexandru2909 https://github.com/mozilla-mobile/firefox-android/commit/fbc8302b4518107b78255058ee95249e5ad192fa [main] Bug 1811175 - Use sponsored tiles fallback protocol only when Contile outage is detected
Status: VERIFIED → RESOLVED
Closed: 2 years ago2 years ago
Flags: qe-verify+
Target Milestone: --- → 112 Branch

For the future, we typically prefer to track one patch per bug, specifically to avoid ambiguity like this case where one patch landed during the 112 cycle and another during the 113 cycle.

With that said, do we need to backport this second patch to 112 also? Please nominate for approval if so.

Flags: needinfo?(aputanu)
Target Milestone: 112 Branch → 113 Branch

Sorry about that, I'll open separate bugs from now on. I think we should uplift this to 112, will open the backport PR after QA verification.

Flags: needinfo?(aputanu)

Tested with Alex on a custom build and the following results were obtained:

  • Scenario 1: After launching the app, the Sponsored Shortcuts were displayed, as expected; (received a 200 Status Code);
  • Scenario 2: Alex then used Postman to get a 204 status code, after which the Sponsored Shortcuts initially available disappeared, as expected;
  • Scenario 3: Lastly, Alex used Postman again to get a 500 status code and set the max age to ~2 mins. However, the Sponsored Shortcuts that were displayed, did not disappear after the 2 minutes passed, nor after a much longer period of time (settings de device time several hours ahead).

Please create and nominate the backport PR for Beta uplift when you get a chance.

Flags: needinfo?(aputanu)
See Also: → 1822803

I'm afraid we'll need a follow-up patch, as described by @Delia, in Scenario 3, the sponsored tiles should have disappeared after the server specified max age. Opened 1822803 in this scope. Because of this needing a follow-up patch and since the patch which landed in 112 does not affect the existing refresh cadence, I think we should let it ride the trains.

Flags: needinfo?(aputanu)

Marking this ticket as "Verified Fixed" for 113 based on the testing conducted to validate Scenarios 1 & 2, and the comments above. Scenario 3 will be tested in the newly opened ticket.

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

Attachment

General

Creator:
Created:
Updated:
Size: