Closed Bug 841554 Opened 12 years ago Closed 11 years ago

Ensure FHR search engine works in non en-US locales

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect, P2)

defect

Tracking

(firefox21+ verified, firefox22 verified)

VERIFIED FIXED
Firefox 22
Tracking Status
firefox21 + verified
firefox22 --- verified

People

(Reporter: gps, Assigned: rnewman)

References

Details

Attachments

(4 files, 7 obsolete files)

9.79 KB, patch
Gavin
: review+
rnewman
: feedback+
Details | Diff | Splinter Review
15.89 KB, patch
gps
: review+
Details | Diff | Splinter Review
61.85 KB, text/plain
Details
1.63 KB, patch
gps
: review+
Details | Diff | Splinter Review
+++ This bug was initially created as a clone of Bug #828540 +++

In the comments in bug 828540, Gavin mentioned that the search engine name (which we take the lower case of to normalize to the FHR field name) is localized. If non en-US locales use a different search engine name (e.g. "Amazon" instead of the en-US of "Amazon.com"), these searches would inadvertently fall into the "other" bucket.

We should at least audit the search XML files in other locales and ensure the search engine name matches the en-US definition. We should further considering adding a constant-across-locales engine identifier and use that instead of name for bucketing into FHR.
Priority: -- → P1
Axel: I'm embarrassed to ask this, but I'm not sure how I can go about finding a build with localized search engine names. Could you please teach me how to fish? If you know of such a build offhand, please let me know!
Flags: needinfo?(l10n)
So the quick answer is, no, that won't work as is.

Amazon uses different domains in different regions.

I'm not sure why ebay isn't on the list? We also have partnerships with yandex, and a bunch of the plugins in Chinese and Japanese, IIRC.

Builds are http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central-l10n/, and you can mxr across locales on http://mxr.mozilla.org/l10n-mozilla-aurora/. If FHR is on aurora, http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora-l10n/ are the aurora builds, we have better l10n coverage on those, some of the l10n-central ones are not maintained.
Flags: needinfo?(l10n)
I took a look. As an example:

     <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
     <ShortName>Amazon.fr</ShortName>
     <Description>Recherche Amazon.fr</Description>
     <InputEncoding>ISO-8859-1</InputEncoding>
     <Image width="16" height="16">…
     <Url type="text/html" method="GET" template="http://www.amazon.fr/exec/obidos/external-search/">
       <Param name="field-keywords" value="{searchTerms}"/>
       <Param name="mode" value="blended"/>
       <Param name="tag" value="firefox-fr-21"/>
       <Param name="sourceid" value="Mozilla-search"/>
     </Url>
     <SearchForm>http://www.amazon.fr/</SearchForm>
     </SearchPlugin>

with the list being:

  google
  amazon-france
  bing
  wikipedia-fr
  eBay-france
  yahoo-france
  cnrtl-tlfi-fr


So no, a French user searching Amazon.fr will have their search reported in the "other" bucket.

There are a few possible courses of action here.

We could dump all of our partner search engines into the list (basically `grep ShortName */browser/searchplugins/*.xml` and munge), and treat them all separately: we'd have Amazon.co.uk, Amazon.fr, Amazon.com as partners, and rely on Metrics to combine them somehow. Brittle.

We could change our partner recognition logic to process searchplugins/list.txt and parse the XML files in that directory, rather than a hard-coded list of partners -- but again, we'd get a very scattered set of responses. Complex.

We could attempt to produce a set of sets, picking some partner identifier for each search provider. This identifier would have to be maintained somewhere, either in FHR as part of a mapping, or bottom-up in each locale's searchplugins files (e.g., extending the SearchPlugin XML format to include a partner identifier). Also crummy.

Either the second or third solution seems best to me, but it depends whether we want to get "Amazon" in our analytics, regardless of country, or whether we want the granularity.

Do we have a document/summary somewhere with all of our search partners, or are each of these partners added ad hoc to the l10n tree?

Anyone know who would know?
Relying on the output of localization is extremely brittle.

I think we should add an optional, constant, non-localized search engine ID to the XML files and use that as the FHR identifier. We still need to manage a "whitelist" of search engines in FHR because we a) only care about search engines Mozilla has an official relationship with b) we don't want to leak potentially privacy sensitive or user identifying search engine names in the payload.

This will probably involve some kind of test added to localization output to ensure all the relevant partners' XML files have the IDs defined.

This is going to be an ugly bug and I don't know where to start. I kind of doubt we'll get this in 21.
Dolske: I'm curious what your thoughts are here.
Flags: needinfo?(dolske)
The "engines we have a relationship with" requirement seems kind of fuzzy. Does this data collection really need to be that comprehensive? I agree there's no easy solution here.
Daniel, can you clarify what problem this reported data is trying to solve, and what kind of granularity we need to return?

The original FHR spreadsheet mentions "engines with a search partner agreement with Mozilla", but then provides a non-exhaustive list, and doesn't describe how those partners are to be identified.
Flags: needinfo?(deinspanjer)
The original set of requirements defined {Google, Yahoo, Bing, Amazon.com} as the search engines we care about. While some have theorized that this list may be expanded to include search engines like Yandex, no such requirements have been communicated to me. Let's assume the generic requirement is "some subset of the default search engines must be reliably reported on in FHR."
(In reply to Gregory Szorc [:gps] from comment #8)
> The original set of requirements defined {Google, Yahoo, Bing, Amazon.com}
> as the search engines we care about.

See preceding comment!

> Let's assume the generic
> requirement is "some subset of the default search engines must be reliably
> reported on in FHR."

I elected to ask, rather than assume :D
(In reply to Gregory Szorc [:gps] from comment #4)

> I think we should add an optional, constant, non-localized search engine ID
> to the XML files and use that as the FHR identifier. 

I don't have a strong opinion here, but that sounds reasonable. But I do think the first step is understanding exactly what the need is here (comment 7) so you can know if the solution is adequate or not.

> We still need to manage
> a "whitelist" of search engines in FHR because we a) only care about search
> engines Mozilla has an official relationship with b) we don't want to leak
> potentially privacy sensitive or user identifying search engine names in the
> payload.

I assume that's only relevant for non-default search plugins? I wonder if it would be useful to detect the plugin's origin, and only report info if it's a thing that's built-in.
Flags: needinfo?(dolske)
Thanks for asking.  gps is right that we provided a known subset that we had previously encountered questions about.

The purpose of this data is to ensure the correctness of the data that comes from our partners about the volume and type of traffic being directed to the partner.

Because the client only communicates directly with the partner, we have no ability to verify how many searches are being made through the various mechanisms.

In a couple of cases, we have wanted to verify that the numbers coming from the partners were accurate.  In one case, we were told by a partner that they found long after the fact they had been giving us incorrect numbers.

In another case, the partner asked us if we could supply the information to them because they were not set up to be able to capture and report on it themselves.

I couldn't say for sure what other engines should or shouldn't be added, nor at what stage/version it would be right to add them.  The only thing I can say with certainty is that we know we needed the data for the subset that the original spec called for.
Flags: needinfo?(deinspanjer)
So let me ask two concrete questions:

If I search through "Google SSL" (which we don't ship, but is a partner), should it be reported as Google, as "Google SSL", or as "Other"?

If I search through "Amazon.co.uk" (which we ship with en-GB builds, and is a partner), should it be reported as "Amazon.com" (or "Amazon", or whatever central identifier), as "Amazon.co.uk", or as "Other"?

Feel free to redirect this question to someone else if you don't feel like it's your call.
I can't say with any certainty.  We need to try to loop someone from bizdev in.
Assignee: nobody → rnewman
I have reached out to bizdev.
OK, here's the direction we plan to go: we'll report granular search providers individually, but only those with whom we have a partner agreement.

Joanne will be giving me that list, and I'll be figuring out how to integrate that filtering in a way that's least painful.

To ward off any privacy concerns…

The user value here is, as I see it, twofold:

* The community value accorded by improving our shipped set of partner providers, and tuning search UI. Same as for other Mozilla-centric value-adds in FHR.

* The ability to distinguish between different providers when making health recommendations (e.g., "maybe you should be using Google UK SSL", or "we stopped partnering with Joe's Evil Search Site in the UK, because they broke our privacy rules, but you're still using them; you should consider switching".

I also don't think there's a significant privacy cost to being granular here: there is likely already a strong correlation between the locale that we report (en_GB) and the search providers that a user uses (Google UK, Amazon UK). Coalescing providers would harm our ability to draw useful conclusions without significantly limiting our ability to make educated guesses about individual users, which is a poor tradeoff.
Attached patch Part 1, WIP. (obsolete) — Splinter Review
browser.js change: gives us access to the other search engine fields, not just the name.

Untested.
Attachment #727075 - Flags: feedback?(gps)
Attached patch Part 2: WIP. (obsolete) — Splinter Review
Most of the way there, I think.

This allows us to dump whatever's in the DB, and so the search count measurement only records fields for the current default engines. It intersects those with our defined 61 partner engines; and any other search goes in the "other" bucket.

Untested; I have only verified that this builds, not even passes existing tests.

I haven't restored SearchCountsProvider1 yet. Just putting this here as a WIP in case I get hit by a bus tomorrow.

Note also that this includes synchronous access to the search service right there in FHR's provider initialization. This might be a problem, in which case we will have to preprocess this file by parsing the locale-appropriate searchplugins/list.txt, or somehow delay field creation to immediately prior to recording a search.
Attachment #727076 - Flags: feedback?(gps)
Comment on attachment 727076 [details] [diff] [review]
Part 2: WIP.

>diff --git a/services/healthreport/providers.jsm b/services/healthreport/providers.jsm

>+  engineID: function (engine) {
>+    let file = engine.wrappedJSObject._file;
>+    let leaf = file.leafName;
>+
>+    return leaf.substring(0, leaf.lastIndexOf("."));

ew :(

Setting up some kind of ID outside of the search service (that relies on some of its implementation details!) doesn't seem like a great idea. If you need to expose a per-locale ID of some sort, let's do that more explicitly, in the search service itself.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #18)

> ew :(
> 
> Setting up some kind of ID outside of the search service (that relies on
> some of its implementation details!) doesn't seem like a great idea. If you
> need to expose a per-locale ID of some sort, let's do that more explicitly,
> in the search service itself.

Ew indeed, but this is something we want to ship in 21.

As I understand it, doing this "right" -- wiring the list.txt entry (the filename sans extension, which is the unique identifier) into each engine entry in a stable and supported way -- would involve a moderate amount of hackery to the search service and nsISearchEngine, maybe the search engine cache JSON format, and perhaps includes IDL changes (to expose the new property in a way that doesn't require wrappedJSObject).

I'd be less confident about getting Aurora (or even Beta) approval for that change.

Could you outline which broad changes to the search system you'd r+, and which you think are important enough to argue for uplift?
Flags: needinfo?(gavin.sharp)
Couldn't we instead just use the engine name+build locale(+default engine status) to identify engines, rather than basing it on the engine filename?
Flags: needinfo?(gavin.sharp)
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #20)
> Couldn't we instead just use the engine name+build locale(+default engine
> status) to identify engines, rather than basing it on the engine filename?

That's closer than just using the name, so thanks for the excellent suggestion! Alas, it's imperfect for two reasons:

* When the same engine appears in multiple locales, we'd like it to be the same identifier. That is, we don't want French users of Amazon.co.uk to be counted separately from UK users, unless we explicitly query for that in FHR queries (which we can do, because FHR reports locale).

* These values will be used in queries and appear in reports. The shorter and more stable the identifier, the better.

We might have another way out; stay tuned.
As long as we can identify the specific cases we care about on the client, we can have it report them however we'd like (e.g. by mapping all Amazon locale variants to report as just "Amazon").
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #22)
> As long as we can identify the specific cases we care about on the client,
> we can have it report them however we'd like (e.g. by mapping all Amazon
> locale variants to report as just "Amazon").

Figuring that out is why I roped in Joanne. We'd like to report each unique search provider separately, rather than rolling them up. (And rolling them up *well* would be a pain regardless.)

The constraints are:

* Different search providers have the same name, but should be reported as different. (E.g., eBay-de and eBay (US), both of which are named "eBay").

* The same search provider can exist unchanged in multiple locales, and should be reported as the same.

* The same search provider (by our internal conception) might have a different name in different locales, but again should be reported as the same. (No example to hand, but they could.)


That's why I converged on using the list.txt entry: they're fastidiously done, seem to be globally scoped, and I can get to them.


It now doesn't look like this work will be aiming for uplift. Given that change in scope, do you object to me wending the on-disk provider identifier through the search service?
(In reply to Richard Newman [:rnewman] from comment #23)
> * Different search providers have the same name, but should be reported as
> different. (E.g., eBay-de and eBay (US), both of which are named "eBay").
> 
> * The same search provider can exist unchanged in multiple locales, and
> should be reported as the same.

Reporting name+engine URL should satisfy these constraints.

> * The same search provider (by our internal conception) might have a
> different name in different locales, but again should be reported as the
> same. (No example to hand, but they could.)

If there are no examples at hand, I claim this isn't a v1 constraint.
Priority: P1 → P2
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #24)

> Reporting name+engine URL should satisfy these constraints.

Unless the URL is subtly different between different locales (due to outdated searchplugin XML files, for example) in a way that we don't care about from an analytics standpoint.

Also, I don't think it's realistic to report engine URLs. It breaks longitudinal correctness (every time we tweak a search param, it becomes a new engine), and it will inflate payloads -- each engine name is reported up to four unique times for 180 days. Compression helps, but that doesn't help prior to the wire.


All of this comes down to "there is a conception of 'same' -- both between locales and across time -- that is not present in the code".


Perhaps let's come at this from a different direction. For bizint reasons, I would like to attach an arbitrary partner identifier to 61 of the searchplugin files in the l10n repos, and report that partner identifier in FHR search counts. That partner identifier isn't the ShortName, and it isn't the URL. It can be the filename, but doesn't have to be.

How can I make that happen?
(In reply to Richard Newman [:rnewman] from comment #25)
> Perhaps let's come at this from a different direction. For bizint reasons, I
> would like to attach an arbitrary partner identifier to 61 of the
> searchplugin files in the l10n repos, and report that partner identifier in
> FHR search counts. That partner identifier isn't the ShortName, and it isn't
> the URL. It can be the filename, but doesn't have to be.
> 
> How can I make that happen?

Fair enough. Filename doesn't work very well (it's not clear that it has semantic value since it hasn't in the past; localizers can mis-manage it). Adding an attribute to our "MozSearch" format and exposing it via nsISearchEngine should be relatively straightforward, let me know if you want to discuss further (or if you discover otherwise).
fwiw, on the l10n drivers side, we're badly flooded. Managing updating several dozen searchplugins will take time, and isn't going to be high on our list of things to do.
We can commit the changes ourselves, right? But I understand that's still a pain. Given the pain involved, it still feels to me like we should push back on the requirements.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #28)
> We can commit the changes ourselves, right? But I understand that's still a
> pain. Given the pain involved, it still feels to me like we should push back
> on the requirements.

That's actually why I experimented to see if I could get the filename, because these look close to perfect to me:

http://rnewman.pastebin.mozilla.org/2234160

These are actually the values I would add to the XML files, because they're remarkably clean.

I'm happy to go either way, because I don't consider either of these painful: either exposing the filename through the API, or adding a partner identifier to the file contents for this set of providers and committing it myself. Both seem straightforward if you don't mind me extending the interfaces, and the latter is trivially scriptable.
It turns out that the search engine code *already* uses the filename as an internal unique identifier.

http://mxr.mozilla.org/mozilla-central/source/toolkit/components/search/nsSearchService.js#2314

I'm working on a patch now to simply factor out that identifier code into something a little more reusable, and expose it as an attribute on nsISearchEngine.
Status: NEW → ASSIGNED
This has a simple test, but not total coverage.

I believe I preserved the existing behavior of _id.
Attachment #727075 - Attachment is obsolete: true
Attachment #727076 - Attachment is obsolete: true
Attachment #727075 - Flags: feedback?(gps)
Attachment #727076 - Flags: feedback?(gps)
Attachment #728552 - Flags: review?(gavin.sharp)
Not much to it. Half the lines are cleanup.
Attachment #728553 - Flags: review?(gavin.sharp)
This needs a little more fleshing out, so just feedback for now.
Attachment #728554 - Flags: feedback?(gps)
Those three patches seem happy on the small try push I submitted:

https://tbpl.mozilla.org/?tree=Try&rev=e53438f00172
Actually, scratch part 2. It's not necessary. Updated patches this weekend.
Not sure if this changed, but uploading the current version nonetheless.
Attachment #728552 - Attachment is obsolete: true
Attachment #728552 - Flags: review?(gavin.sharp)
Attachment #729086 - Flags: review?(gavin.sharp)
Attachment #728553 - Attachment is obsolete: true
Attachment #728554 - Attachment is obsolete: true
Attachment #728553 - Flags: review?(gavin.sharp)
Attachment #728554 - Flags: feedback?(gps)
Attachment #729087 - Flags: review?(gps)
Attached patch tweaked part 1Splinter Review
Rather than submitting review comments, I just applied the patch and made some adjustments:
- make the "identifier" getter assume "app-provided" engines have leafNames (AFAICT this is always true - your patch handled getLeafName returning null when it never should)
- getLeafName -> _getLeafName (not a "public" API)
- refactored the _id getter to be a bit easier to read. Given my understanding of the invariants it should still be correct, but would appreciate a double-check.
- adjusted the test to avoid the "let's pretend" hack, and actually load an engine from a JAR in addition to from the profile.
Attachment #729086 - Attachment is obsolete: true
Attachment #729086 - Flags: review?(gavin.sharp)
Attachment #729094 - Flags: review+
Attachment #729094 - Flags: feedback?(rnewman)
Comment on attachment 729094 [details] [diff] [review]
tweaked part 1

>diff --git a/toolkit/components/search/tests/xpcshell/test_identifiers.js b/toolkit/components/search/tests/xpcshell/test_identifiers.js

>+    // Let's pretend that we shipped it. Set the install location and
>+    // blow away the cached identifier.
>+    do_check_eq(jarEngine.identifier, "bug645970");

This comment needs updating!
Comment on attachment 729094 [details] [diff] [review]
tweaked part 1

LGTM, and tests pass. Thanks!
Attachment #729094 - Flags: feedback?(rnewman) → feedback+
Comment on attachment 729087 [details] [diff] [review]
Part 2: alter search counts provider to record all of Mozilla's partner engines in each locale. v2

Review of attachment 729087 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Cancelling review until we have test coverage of shouldIncludeField for unknown search engines.

::: services/healthreport/providers.jsm
@@ +1139,5 @@
> +  },
> +
> +  _initialize: function () {
> +    // Don't create all of these for every profile.
> +    // There are 61 partner engines, translating to 244 fields. 

Nit: TWS

@@ +1173,5 @@
> +    if (!this._fieldSpecs) {
> +      this._initialize();
> +    }
> +    return this._fieldSpecs;
> +  },

And we're back to non-static field declarations. Boo.

@@ +1309,5 @@
> +   * data.
> +   */
> +  shouldIncludeField: function (field) {
> +    return true;
> +  },

Shouldn't this be on the measurement? This highlights the lack of test coverage!

::: services/metrics/dataprovider.jsm
@@ +336,5 @@
> +   * Allow subclasses to change this behavior, e.g., to implement a dynamic
> +   * fieldset.
> +   *
> +   * @return (boolean) true if the specified field should be included in
> +   *                   payload output.

Please document that this only applies to the default serializers.
Attachment #729087 - Flags: review?(gps)
Nits addressed, and we now are able to serialize types we don't know about (by assuming that they're counters).

Two tests added.
Attachment #729087 - Attachment is obsolete: true
Attachment #729240 - Flags: review?(gps)
Comment on attachment 729240 [details] [diff] [review]
Part 2: alter search counts provider to record all of Mozilla's partner engines in each locale. v3

Review of attachment 729240 [details] [diff] [review]:
-----------------------------------------------------------------

Yay tests!

::: services/healthreport/tests/xpcshell/test_provider_searches.js
@@ +91,5 @@
>    yield storage.close();
>  });
>  
> +add_task(function test_includes_other_fields() {
> +  let storage = yield Metrics.Storage("record");

You should use a test-specific name here.

@@ +105,5 @@
> +  let testField = "test.searchbar";
> +  let now = new Date();
> +  yield provider.enqueueStorageOperation(function record() {
> +    return m.storage.incrementDailyCounterFromFieldID(id, now);
> +  });

Nit: The enqueue shouldn't be necessary in these controlled conditions.

@@ +112,5 @@
> +  do_check_false(testField in m.fields);
> +
> +  // But we want to include it in payloads.
> +  do_check_true(m.shouldIncludeField(testField));
> +  

Nit: TWS
Attachment #729240 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/7e2f49fb5f4c
https://hg.mozilla.org/mozilla-central/rev/73dd524468a1
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed in services]
Target Milestone: --- → mozilla22
Should we uplift this to 21?
(In reply to Gregory Szorc [:gps] from comment #46)
> Should we uplift this to 21?

I would *like* to, because it makes our search metrics infinitely more accurate, but it's a UUID change to nsISearchEngine. I don't have enough information on how we feel about uplifting that kind of change very late in the Aurora cycle, and I'm not inclined to push if it's unusual.

Gavin?
Flags: needinfo?(gavin.sharp)
I don't know of any external native-code users of nsISearchEngine, and this is a purely additive change, so even if there were this shouldn't result in anything bad happening. And interface changes up to beta 1 should generally be tolerable. So no objection here.
Flags: needinfo?(gavin.sharp)
Comment on attachment 729094 [details] [diff] [review]
tweaked part 1

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
  828540

User impact if declined: 
  Not yet user facing; limitation on data collection in FHR. Non-US search providers will all be considered "other".

Testing completed (on m-c, etc.): 
  Has been on m-c for a little while; still need to do some analysis of submitted payloads to verify.

Risk to taking this patch (and alternatives if risky): 
  Slim.

String or UUID changes made by this patch: 
  One UUID change; see Gavin's last comment.
Attachment #729094 - Flags: approval-mozilla-aurora?
Comment on attachment 729240 [details] [diff] [review]
Part 2: alter search counts provider to record all of Mozilla's partner engines in each locale. v3

Second half of approval flag.
Attachment #729240 - Flags: approval-mozilla-aurora?
(In reply to Richard Newman [:rnewman] from comment #49)
> Comment on attachment 729094 [details] [diff] [review]
> tweaked part 1
> 
> [Approval Request Comment]
> Bug caused by (feature/regressing bug #): 
>   828540
> 
> User impact if declined: 
>   Not yet user facing; limitation on data collection in FHR. Non-US search
> providers will all be considered "other".
> 
> Testing completed (on m-c, etc.): 
>   Has been on m-c for a little while; still need to do some analysis of
> submitted payloads to verify.
> 
> Risk to taking this patch (and alternatives if risky): 
>   Slim.
> 
> String or UUID changes made by this patch: 
>   One UUID change; see Gavin's last comment.

For any IDL changes as long as the IID is revved with the corresponding interface we should be fine until Aurora.

This looks good to land as long as the risk is contained to FHR and it will be helpful to report a brief metrics search analysis data you are working on here as a proof of concept . Thanks !
Attachment #729094 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #729240 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(In reply to bhavana bajaj [:bajaj] from comment #51)
> This looks good to land as long as the risk is contained to FHR

To be clear, the risk isn't contained to FHR - this could break the search service, too. That seems relatively unlikely, but some targeted QA testing around search settings being properly maintained across updates with/without the patch would be a good idea.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #52)
> (In reply to bhavana bajaj [:bajaj] from comment #51)
> > This looks good to land as long as the risk is contained to FHR
> 
> To be clear, the risk isn't contained to FHR - this could break the search
> service, too. That seems relatively unlikely, but some targeted QA testing
> around search settings being properly maintained across updates with/without
> the patch would be a good idea.

err,sorry about misunderstanding the risk here & thanks for pointing that out Gavin :)

I also spoke offline to Gavin about this & he will be working with rnewman to get test coverage on this.CCing ashughes here as well as gavin may have some pointers around testing this for QA .
(In reply to bhavana bajaj [:bajaj] from comment #53)
 
> err,sorry about misunderstanding the risk here & thanks for pointing that
> out Gavin :)

No big deal -- I should have left a better comment than "Slim" :D

Will work with Gavin to make sure any risk is addressed.
Blocks: 855604
I've done some testing with the Nightly builds from before and after this landed on mozilla-central with some different search settings, search engines, and locales and did not encounter any problems. Since this just landed today on Aurora I will wait a couple days to test this on Aurora (probably Monday).
Backed out of Aurora for mochitest browser-chrome failures.
https://hg.mozilla.org/releases/mozilla-aurora/rev/dc9bc44e7f1c

https://tbpl.mozilla.org/php/getParsedLog.php?id=21210866&tree=Mozilla-Aurora

TEST-PASS | chrome://mochitests/content/browser/browser/base/content/test/browser_aboutHome.js | Searches provider is available.
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_aboutHome.js | Have data for today.
Stack trace:
    JS frame :: chrome://mochitests/content/browser/browser/base/content/test/browser_aboutHome.js :: onValues :: line 143
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: effort :: line 55
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolved :: line 117
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: then :: line 37
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolve :: line 143
    JS frame :: resource://gre/modules/HealthReport.jsm :: onSuccess :: line 2991
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: effort :: line 55
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolved :: line 117
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: then :: line 37
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolve :: line 143
    JS frame :: resource://gre/modules/HealthReport.jsm :: onSuccess :: line 2917
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: effort :: line 55
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolved :: line 117
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: then :: line 37
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolve :: line 143
    JS frame :: resource://gre/modules/Task.jsm :: TaskImpl_run :: line 220
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: effort :: line 55
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolved :: line 117
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: then :: line 37
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolve :: line 143
    JS frame :: resource://gre/modules/Task.jsm :: TaskImpl_run :: line 217
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: effort :: line 55
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolved :: line 117
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: then :: line 37
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolve :: line 143
    JS frame :: resource://gre/modules/Sqlite.jsm :: onResult :: line 494
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: effort :: line 55
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolved :: line 117
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: then :: line 37
    JS frame :: resource://gre/modules/commonjs/sdk/core/promise.js :: resolve :: line 143
    JS frame :: resource://gre/modules/Sqlite.jsm :: <TOP_LEVEL> :: line 772
    native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_aboutHome.js | Test timed out
(In reply to Ryan VanderMeulen [:RyanVM] from comment #57)
> Backed out of Aurora for mochitest browser-chrome failures.
> https://hg.mozilla.org/releases/mozilla-aurora/rev/dc9bc44e7f1c
> 
> https://tbpl.mozilla.org/php/getParsedLog.php?id=21210866&tree=Mozilla-Aurora

I think we're finally being bitten by this:

    // We rely on the listener in browser.js being installed and fired before
    // this one. If this ever changes, we should add an executeSoon() or similar.
    doc.addEventListener("AboutHomeSearchEvent", function onSearch(e) {

The search provider hasn't recorded the search by the time this test event listener fires.

Unfortunately, this test doesn't include any FHR logging, so I can't see what's actually happening.
FHR logs on a hung test.
I don't know why this test isn't failing on s-c, because it's obviously wrong. Here is the fix that makes things work on Aurora, and doesn't cause problems on s-c.
Attachment #731023 - Flags: review?(gps)
Attachment #731023 - Flags: review?(gps) → review+
I'd like to thank Mozilla-Aurora for finding all of our broken mochitests, and RyanVM for his patience. I'd also like to thank the Academy…

https://hg.mozilla.org/releases/mozilla-aurora/rev/2174a373f5d6

I'd really like to know why these don't fail on s-c.
Keep whackin' dem moles.

https://hg.mozilla.org/releases/mozilla-aurora/rev/fe2e51f95fdf

I think I've got them all now…
I just finished repeating the testing I did on Nightly in comment 56 on Aurora and everything seems to be working as expected here. Marking verified fixed.
Status: RESOLVED → VERIFIED
Component: Metrics and Firefox Health Report → Client: Desktop
Flags: in-testsuite+
Product: Mozilla Services → Firefox Health Report
Target Milestone: mozilla22 → Firefox 22
And somehow this test file ended up with duplicate lines after the merge.

https://hg.mozilla.org/releases/mozilla-aurora/rev/59a419eca635
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: