Closed Bug 404664 Opened 17 years ago Closed 17 years ago

SeaMonkey search results include Firefox-only addons

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: baz, Assigned: wenzel)

References

Details

Attachments

(1 file)

As reported by various SeaMonkey users. Performing certain searches result in Firefox only add-ons even when SeaMonkey is the "selected app". 1. Access https://addons.mozilla.org/en-US/seamonkey 2. Perform a search for "blog" 3. Review results and notice that "Google Site Indexer" is included even though it's not a SeaMonkey supported app It should not show up. Other search terms that yield Firefox results. "parent" shows ProCon Latte "sidebar" shows Moji "ebay" shows Toolbar Buttons
The culprit here is an empty, deactivated version of this add-on which is marked as supporting all applications. Obviously we should fix this, I suggest by only showing add-ons that have *available* (= public, if in public mode) versions for the current app. Side note: A similar bug to this has been filed in the past, because the *current* version of an add-on did not support Seamonkey anymore, while an older one in the history did. This I consider expected behavior, while the behavior described in this bug here is actually a bug.
(In reply to comment #1) > Side note: A similar bug to this has been filed in the past, because the > *current* version of an add-on did not support Seamonkey anymore, while an > older one in the history did. This I consider expected behavior, while the > behavior described in this bug here is actually a bug. I don't think that users will expect that behavior at all -- if there are people who expect "searching for SM add-ons" to return something other than "add-ons that I can install the latest version of in SM", I bet they fit in a thimble. We recommend that users *not* install older versions of add-ons, because of possible security bugs fixed and so forth, so I don't think the search should dig back into history. (Denormalizing the latest version's app-compat info to be keyed off of add-on id would probably simplify this a lot, and I suspect give us a perf win as well.)
(In reply to comment #2) > (In reply to comment #1) > > Side note: A similar bug to this has been filed in the past, because the > > *current* version of an add-on did not support Seamonkey anymore, while an > > older one in the history did. This I consider expected behavior, while the > > behavior described in this bug here is actually a bug. > > I don't think that users will expect that behavior at all -- if there are > people who expect "searching for SM add-ons" to return something other than > "add-ons that I can install the latest version of in SM", I bet they fit in a > thimble. Thanks for your comment, after thinking about it I agree with you now. Therefore let's redefine the scope of this bug to "only show add-ons whose latest version is compatible with the given app". If devs care for the users of that app, they should make their current version compatible, and if they don't, their add-on should not be found for that app on AMO.
I fully agree with the last two comment, but shouldn't it be "only show add-ons that are activated and have a (public) version available and whose latest (public) version is compatible with the given app", with the brackets depending on public/sandbox mode? Just to be really correct about what query we need to end up with and to surely close out the error of comment #1 ;-)
Yes, I was only mentioning the relevant changes to the query we have right now. The whole activated and available thing is already met with the query the way it is now. Thanks anyway :)
Requesting targeting v3.2
Target Milestone: --- → 3.2
Assignee: nobody → fwenzel
Bug 407211 should be the reason: Update service needs tests to verify processing of AppOs Clear the duplication if you have another opinion.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
This is totally unrelated.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
No; I don't think the update services share any code with the search on the website; however the solution for this will likely be related (but not a duplicate of) bug 404846.
Hm. To only return addons whose *last* version is compatible with a particular app version, I'd have to do something along the lines of (half-pseudocode) "HAVING MAX(version.id) = version.id GROUP BY version.id WHERE app_version.id = FIREFOX". HAVING, however, is entirely unoptimized by MySQL, so I have a feeling this would make search even tougher on the DB than it is now. This bug really depends on the search improvement (or is part of it), bug 400986. A way around this would be a little denormalization, e.g. a table that just contains the last public version per add-on (or the last public AND sandbox versions). That would also reduce the footprint of pulling in versions for category listings, since only the last one is really needed for these lists anyway. Drawback would be maintaining this "materialized view". We'd have to make sure every update on a version invalidates/rebuilds the entries in this secondary table. Cake's afterSave() and afterDelete() callbacks may be the key tho this.
Depends on: 400986
Yeah, HAVING is a performance deathtrap, as I understand it. If the admin tools don't muck with the database directly, then maintaining the materialized views by hand is probably the right path, and could have a bunch of performance advantages.
While you're talking of "materialized view" there, would a normal view not help here, or does it not improve performance in any useful way?
Non-materialized views are just a query convenience, indeed.
True; they just replace something like SELECT * FROM all_employees_who_have_dogs_and_more_than_two_children; by a bunch of joins, so they save you typos but not computation time -- much like C preprocessor macros, really.
(In reply to comment #11) > Yeah, HAVING is a performance deathtrap, as I understand it. If the admin > tools don't muck with the database directly, then maintaining the materialized > views by hand is probably the right path, and could have a bunch of performance > advantages. I've been thinking about this, but while I like the idea, this seems like a pretty invasive step at the base of the application, since I'd have to make a new table (obviously) and a new model and I'd have to investigate every use of "Version" in the code base by hand (at the moment, there's something > 300 (!)). Am I missing something here? So far I wasn't able to come up with a way to handle this transparently to the app. On a positive aside, it seems like we could have MySQL 5 do the updates to the view table automatically on update by hooking a stored procedure up to a "trigger": http://pure.rednoize.com/2005/10/26/materialized-views-in-mysql/
Ah, I found a pretty feasible option: I can add two new columns to the addons table (last_version_public and ...sandbox) and have these updated (only for the affected addon) every time a change to the files table (sic! since it keeps the status information, not the version table) occurs. To keep me from changing the entire codebase and preventing major breakage, I'd add a function bindLastVersionOnly() to the addon model, allowing to opt-in to this much less resource intensive way of fetching the last version only. morgamic: in a case where you have a public version 2.0 and a sandboxed 1.5, which one should be considered the "latest version" when you are in sandbox mode? The public one (in spite of you being in the sandbox) or the sandboxed one?
(In reply to comment #16) > morgamic: in a case where you have a public version 2.0 and a sandboxed 1.5, > which one should be considered the "latest version" when you are in sandbox > mode? The public one (in spite of you being in the sandbox) or the sandboxed > one? The update service delivers the latest version by versions.id that is public. right now sandbox add-ons don't receive updates because it'd be a possible vector for updating people to bad stuff. So only public add-ons, and the latest version by versions.id is the expected behavior for updates.
We need to postpone this and bug 404846 to after Milestone 3.2: The reasoning is that they sound easy to fix, but in order to do so efficiently, non-trivial database changes are needed, which we do not want to jeopardize the progress of the upcoming milestone.
Target Milestone: 3.2 → 3.4
Target Milestone: 3.4 → 3.4.3
Summary: SeaMonkey search results include Firefox only addons → SeaMonkey search results include Firefox-only addons
I replaced the join by a subquery, in order to only show results whose *last* version is compatible with the current application. This should take care of all the cases where a long time ago, a single version was marked compatible with SeaMonkey (or Tb, ...). In particular, it fixes the "blog" test case described in comment 0.
Attachment #321368 - Flags: review?(laura)
Comment on attachment 321368 [details] [diff] [review] Restrict search results by app compatibility of last version WFM
Attachment #321368 - Flags: review?(laura) → review+
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Keywords: push-needed
Resolution: --- → FIXED
Version: 3.0 → 3.2
Verified FIXED using the testcases in comment 0; Moji still shows up post-patch (on preview) because 0.9.2 has support for SeaMonkey 1.0-1.1*: https://preview.addons.mozilla.org/en-US/seamonkey/addons/versions/145 The rest don't on preview, but do on production.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: