Closed Bug 1878441 Opened 10 months ago Closed 10 months ago

Update the weather suggestions implementation to account for Rust

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

Weather, UrlbarProviderQuickSuggest, and related tests need updating to account for weather suggestions being implemented in Rust (bug 1877300).

This patch requires https://github.com/mozilla/application-services/pull/6089,
which hasn't been vendored yet, so it will be hard to test unless you locally
vendor. I've done that and verified that weather tests still pass.

Weather suggestions in Rust work like this: Rust stores the weather keywords in
the keywords table, and when the query matches a keyword, it returns a dummy
Weather suggestion that only contains a score. That means weather suggestions
are handled nearly like every other type of suggestion, except when Firefox
receives a weather suggestion from Rust, it must replace it with the actual
suggestion from Merino.

We also need to continue to support weather keywords defined in Nimbus. For
that, this patch continues to use UrlbarProviderWeather because I don't want
to add a special case to UrlbarProviderQuickSuggest just for this one type of
suggestion. When we stop experimenting with weather, we can remove that
provider.

I moved all the common code from UrlbarProviderWeather to Weather so both
providers can use it.

Some of the tests check minKeywordLength and can't use Rust yet. I'll handle
that in bug 1878444.

Depends on D200105

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/660b2bd332d3 Update the weather suggestions implementation to account for Rust. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: