Closed Bug 1828796 Opened 2 years ago Closed 2 years ago

Move weather suggestion keywords back to remote settings

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

VERIFIED FIXED
115 Branch
Tracking Status
firefox114 + verified
firefox115 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

Nive wants to enable the weather suggestion by default on Nightly. That means we can't rely on storing keywords in a Nimbus recipe. I talked with Nan and we decided to move them back to remote settings, but we'll also keep the Nimbus variables so they can override the data in remote settings.

This modifies Firefox to look for weather keywords and the minimum keyword
length in remote settings. It will still prefer the keywords and length in
Nimbus, falling back to remote settings when Nimbus doesn't define them. That
will allow us to store default values in remote settings while making sure an
experiment population uses a specific set of keywords for the duration of the
experiment.

As before, if no keywords are defined or the minimum keyword length is zero, the
suggestion will be shown on zero prefix.

Previously when we were planning to store keywords in remote settings, we were
going to store them in the quick suggest config data. After talking with Nan, we
decided to create a new data type instead, which should be more robust and is
the right way to do it. The weather record in remote settings will look like
this:

{
  "keywords": ["weather", "forecast"],
  "min_keyword_length": 3
}

This also adds a new pref called weather.minKeywordLength. This pref does not
exist by default. Each time the user chooses "show less often", this value will
be incremented. I will do that in a follow up.

I also cp'ed test_weather.js to test_weather_keywords.js to keep keyword-related
tasks in one file. The original file was getting big.

Attachment #9329177 - Attachment description: Bug 1828796 - Move weather suggestion keywords back to remote settings. → Bug 1828796 - Modify weather suggestions to look for keywords in remote settings.
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5229fecb11a1 Modify weather suggestions to look for keywords in remote settings. r=daisuke

STR for QA:

  1. Enable the weather suggestion: browser.urlbar.weather.featureGate = true
  2. If you are testing a build with bug 1831657 fixed, also set browser.urlbar.weather.ignoreVPN = true to make it easier to test on a VPN
  3. Click in the urlbar and verify the weather suggestion does not appear [Edit: Please see comment 6]
  4. Type a few weather keywords (which are stored in remote settings) and verify the suggestion does appear, for example: weather, forecast, windy. The minimum prefix length is set to 3 in remote settings, so the suggestion should appear after you type 3 characters in any of these keywords.

If steps 3 and 4 fail, make sure Firefox is set up to fetch the production remote settings. The weather config is currently in production remote settings.

If you have time, please also test that Nimbus overrides the remote settings config. If you install a Nimbus experiment that sets different keywords (using the weatherKeywords variable) and/or a different minimum prefix length (using weatherKeywordsMinimumLength), Firefox should use those values instead of the values in remote settings.

Flags: qe-verify+
Flags: in-testsuite+

Comment on attachment 9329177 [details]
Bug 1828796 - Modify weather suggestions to look for keywords in remote settings.

Beta/Release Uplift Approval Request

  • User impact if declined: This bug is necessary for the Firefox Suggest weather suggestion feature we intend to ship in 114.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Please see comment 3
  • List of other uplifts needed: Bug 1831656 must be uplifted first
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small patch that only affects the Firefox Suggest weather feature. Has automated tests.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9329177 - Flags: approval-mozilla-beta?

[Tracking Requested - why for this release]: This bug is necessary for the Firefox Suggest weather suggestion feature we intend to ship in 114.

(In reply to Drew Willcoxon :adw from comment #3)

  1. Click in the urlbar and verify the weather suggestion does not appear

I just realized that the suggestion will appear until Firefox syncs remote settings, at least on a new profile. It can take a minute. So when you do the STR, you'll need to wait until settings are synced. An easy way to tell is to just keep clicking in the urlbar until the suggestion stops appearing. I'll file a follow up for this. [Edit: Filed bug 1831971]

Blocks: 1831971
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

Comment on attachment 9329177 [details]
Bug 1828796 - Modify weather suggestions to look for keywords in remote settings.

Approved for 114 beta 2, thanks.

Attachment #9329177 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I have verified this issue on the latest Firefox Nightly 115.0a1 (Build ID: 20230508214159), on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • The weather result is triggered when using the keywords from the Remote Settings.
  • The weather result is triggered only if typing minimum 3 characters of any of the weather keywords in the Address Bar.
  • We also verified that by enrolling into a Nimbus experiment that sets different keywords, Firefox will use those values instead of the values in Remote Settings.

I have verified this issue on the latest Firefox Beta 114.0b2 (Build ID: 20230509180058), on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • The weather result is triggered when using the keywords from the Remote Settings.
  • The weather result is triggered only if typing a minimum of 3 characters of any of the weather keywords in the Address Bar.
  • We also verified that by enrolling into a Nimbus experiment that sets different keywords, Firefox will use those values instead of the values in Remote Settings.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: