[stage] Advance search results not showing up for specific FennecAndroid versions

VERIFIED FIXED in 2.3.5

Status

Socorro
General
--
major
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: mbrandt, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

Here is the query for "All":
* socorro.search.Search search */
SELECT r.signature,
       count(r.id) as total,
       count(CASE WHEN (r.os_name = E'Windows NT') THEN 1 END) AS is_windows,
       count(CASE WHEN (r.os_name = E'Mac OS X') THEN 1 END) AS is_mac,
       count(CASE WHEN (r.os_name = E'Linux') THEN 1 END) AS is_linux,
       SUM (CASE WHEN r.hangid IS NULL THEN 0  ELSE 1 END) AS numhang,
       SUM (CASE WHEN r.process_type='plugin' THEN 1ELSE 0 END) as numplugin,
       SUM (CASE WHEN r.process_type='content' THEN 1ELSE 0 END) as numcontent
FROM reports r
WHERE r.date_processed
BETWEEN '2011-12-14T12:27:23' AND '2011-12-21T12:27:23'
AND (r.product=E'FennecAndroid')
GROUP BY r.signature
ORDER BY total DESC LIMIT 100 OFFSET 0
Here is the query for all versions multi-selected (this query looks wrong):

/* socorro.search.Search search */
SELECT r.signature,
       count(r.id) as total,
       count(CASE WHEN (r.os_name = E'Windows NT') THEN 1 END) AS is_windows,
       count(CASE WHEN (r.os_name = E'Mac OS X') THEN 1 END) AS is_mac,
       count(CASE WHEN (r.os_name = E'Linux') THEN 1 END) AS is_linux,
       SUM (CASE WHEN r.hangid IS NULL THEN 0  ELSE 1 END) AS numhang,
       SUM (CASE WHEN r.process_type='plugin' THEN 1ELSE 0 END) as numplugin,
       SUM (CASE WHEN r.process_type='content' THEN 1ELSE 0 END) as numcontent
FROM reports r
WHERE r.date_processed BETWEEN '2011-12-14T12:27:23' AND '2011-12-21T12:27:23'
AND (r.product=E'FennecAndroid')
AND ((r.product=E'FennecAndroid'
     AND r.release_channel NOT IN ('nightly', 'aurora', 'beta')
     AND r.version=E'11.0b1')
     OR (r.product=E'FennecAndroid'
     AND r.release_channel NOT IN ('nightly', 'aurora', 'beta')
     AND r.version=E'11.0a2')
     OR (r.product=E'FennecAndroid'
     AND r.release_channel NOT IN ('nightly', 'aurora', 'beta')
     AND r.version=E'11.0a1') OR (r.product=E'FennecAndroid'
     AND r.release_channel NOT IN ('nightly', 'aurora', 'beta')
     AND r.version=E'11.0'))
GROUP BY r.signature
ORDER BY total DESC LIMIT 100 OFFSET 0
Comment 2 is wrong because it's treating all of these as releases (this happens selecting an individual version too, not just in multi-select).

Here is where the decision is made: https://github.com/mozilla/socorro/blob/stage/socorro/external/postgresql/search.py#L407

So it's possible the version info is wrong for these.. need to dig a little deeper to see where that comes from.
(Reporter)

Updated

6 years ago
Summary: [stage] Advance search results differ when → [stage] Advance search results differ between when filtering on 'All' and selecting all versions
(In reply to Robert Helmer [:rhelmer] from comment #3)
> Comment 2 is wrong because it's treating all of these as releases (this
> happens selecting an individual version too, not just in multi-select).
> 
> Here is where the decision is made:
> https://github.com/mozilla/socorro/blob/stage/socorro/external/postgresql/
> search.py#L407
> 
> So it's possible the version info is wrong for these.. need to dig a little
> deeper to see where that comes from.

Here's the problem: version_info comes from the product_info table, and the code linked above expected the build type to be capitalized:

breakpad=> select build_type from product_info where product_name = 'FennecAndroid';
 build_type 
------------
 Release
 release
 nightly
 aurora
 beta
(5 rows)

All other products have these with first letter uppercase, so I think it should be fixed in the DB for 2.3.5 (we could make the code case-insensitive also, but as I said this isn't a problem for any other rows in product_info)
Summary: [stage] Advance search results differ between when filtering on 'All' and selecting all versions → [stage] Advance search results differ when
Summary: [stage] Advance search results differ when → [stage] Advance search results differ between when filtering on 'All' and selecting all versions
(In reply to Matt Brandt [:mbrandt] from comment #0)
> The result count differs between
> https://crash-stats.allizom.org/query/
> query?product=Fennec&version=Fennec%3A9.0%28beta%29&version=Fennec%3A9.
> 0b6&version=Fennec%3A9.0b5&version=Fennec%3A9.0b4&version=Fennec%3A9.
> 0b3&version=Fennec%3A9.0b2&version=Fennec%3A9.0b1&version=Fennec%3A9.
> 0&version=Fennec%3A8.0%28beta%29&version=Fennec%3A8.0b6&version=Fennec%3A8.
> 0b5&version=Fennec%3A8.0&version=Fennec%3A7.0.1&version=Fennec%3A7.
> 0&version=Fennec%3A6.0.2&version=Fennec%3A6.0.1&version=Fennec%3A12.
> 0a1&version=Fennec%3A11.0b1&version=Fennec%3A11.0a2&version=Fennec%3A11.
> 0a1&version=Fennec%3A11.0&version=Fennec%3A10.
> 0a2&range_value=1&range_unit=weeks&date=12%2F21%2F2011+12%3A22%3A53&query_sea
> rch=signature&query_type=contains&query=&reason=&build_id=&process_type=any&h
> ang_type=any&do_query=1
> 
> and
> 
> https://crash-stats.allizom.org/query/
> query?product=Fennec&version=ALL%3AALL&range_value=1&range_unit=weeks&date=12
> %2F21%2F2011+12%3A22%3A53&query_search=signature&query_type=contains&query=&r
> eason=&build_id=&process_type=any&hang_type=any&do_query=1
> 
> Steps to reproduce:
> 1. goto advanced search
> 2. select product Fennec > version All
> 3. click filter results and see count
> 
> 4. goto advanced search
> 5. select product Fennec > highlight all version
> 6. click filter results and see count
> 
> Expected:
> results counts should match

BTW URLs should have FennecAndroid not Fennec, right? Is there a problem with Fennec too?
to clarify the FennecAndroid problem - this is a bug in the test data for 2.3.5, I just corrected this and it now WFM:

breakpad=> select * from product_versions where product_name = 'FennecAndroid'
breakpad-> ;
 product_version_id | product_name  | major_version | release_version | version_
string | beta_number | version_sort  | build_date | sunset_date | featured_versi
on | build_type 
--------------------+---------------+---------------+-----------------+---------
-------+-------------+---------------+------------+-------------+---------------
---+------------
                841 | FennecAndroid | 11.0          | 11.0a2          | 11.0a2  
       |             | 011000a002000 | 2011-11-29 | 2012-01-31  | t             
   | aurora
                842 | FennecAndroid | 11.0          | 11.0            | 11.0b1  
       |           1 | 011000b001000 | 2011-12-08 | 2012-02-09  | t             
   | beta
                844 | FennecAndroid | 11.0          | 11.0            | 11.0    
       |             | 011000z000000 | 2011-12-15 | 2012-04-19  | t             
   | release
                843 | FennecAndroid | 11.0          | 11.0a1          | 11.0a1  
       |             | 011000a001000 | 2011-11-22 | 2012-01-24  | t             
   | nightly
(4 rows)

breakpad=> update product_versions set build_type = 'Aurora' where product_version_id = 841;
UPDATE 1
breakpad=> update product_versions set build_type = 'Beta' where product_version_id = 842;
UPDATE 1
breakpad=> update product_versions set build_type = 'Nightly' where product_version_id = 843;
UPDATE 1
breakpad=> update product_versions set build_type = 'Release' where product_version_id = 844;
UPDATE 1
breakpad=> select * from product_versions where product_name = 'FennecAndroid';
 product_version_id | product_name  | major_version | release_version | version_
string | beta_number | version_sort  | build_date | sunset_date | featured_versi
on | build_type 
--------------------+---------------+---------------+-----------------+---------
-------+-------------+---------------+------------+-------------+---------------
---+------------
                841 | FennecAndroid | 11.0          | 11.0a2          | 11.0a2  
       |             | 011000a002000 | 2011-11-29 | 2012-01-31  | t             
   | Aurora
                842 | FennecAndroid | 11.0          | 11.0            | 11.0b1  
       |           1 | 011000b001000 | 2011-12-08 | 2012-02-09  | t             
   | Beta
                843 | FennecAndroid | 11.0          | 11.0a1          | 11.0a1  
       |             | 011000a001000 | 2011-11-22 | 2012-01-24  | t             
   | Nightly
                844 | FennecAndroid | 11.0          | 11.0            | 11.0    
       |             | 011000z000000 | 2011-12-15 | 2012-04-19  | t             
   | Release
(4 rows)

breakpad=>
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Sorry for the confusion here, when mbrandt and I were discussing in IRC I was trying to communicate that no results were showing for individual FennecAndroid versions, results only showed up when searching for "All".

That issue is now resolved, it does look like there is a slight difference between searching for "All" and doing a multi-select for all versions, and I see this on prod too so I think it's an existing bug (or some reasonable behavior that I don't understand) so it's not a 2.3.5 regression.

We should however file a separate bug to chase down that slight difference.
Summary: [stage] Advance search results differ between when filtering on 'All' and selecting all versions → [stage] Advance search results not showing up for specific FennecAndroid versions
(Reporter)

Comment 9

6 years ago
QA verified, results are showing up for individual FennecAndroid versions.
Status: RESOLVED → VERIFIED
(Assignee)

Updated

6 years ago
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.