Closed Bug 678205 Opened 13 years ago Closed 13 years ago

Signature links from new TCBS don't work (/report/list not aware of new beta versions)

Categories

(Socorro :: General, task, P1)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: kairo, Assigned: rhelmer)

Details

Attachments

(1 file, 1 obsolete file)

Clicking at any signature listed on https://crash-stats.allizom.org/topcrasher/byversion/Firefox/6.0b5/14 results in a report list that states "There were no reports in the time period specified." - probably because /report/list doesn't know what to do with a "Firefox:6.0b5" version.
Ned to investigate if this is a bug or a data problem.
Assignee: nobody → rhelmer
Target Milestone: --- → 2.2
Status: NEW → ASSIGNED
Priority: -- → P1
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #0)
> Clicking at any signature listed on
> https://crash-stats.allizom.org/topcrasher/byversion/Firefox/6.0b5/14
> results in a report list that states "There were no reports in the time
> period specified." - probably because /report/list doesn't know what to do
> with a "Firefox:6.0b5" version.

Yes this looks like the problem. I've done a rough patch for this in my dev instance and it comes down to the following query:

http://code.google.com/p/socorro/source/browse/branches/releases/2.2/webapp-php/application/models/common.php#186

I think what we need to do here is check if the product/version is old or new tcbs (using the product_info table) and if it is new, then the query should use report.version = '6.0' (not '6.0b') with a clause something like:

AND build IN 
  (SELECT build_id::varchar FROM product_version_builds AS pvb
   JOIN product_versions AS pv
     ON (pvb.product_version_id = pv.product_version_id)
   WHERE product_name = 'Firefox'
   AND version_string = '6.0b')

peterbe and I analyzed and also benchmarked this query and it seems to run fast enough, especially on production we didn't really see any difference. Worth testing further though, especially with a larger dataset.

I'm not sure if it'd be more or less work to move this to a middleware service, if we had more time I definitely would but am tempted to patch it in place. 

Brandon do you have any thoughts on the above? Do you think it'd be easy to modify this PHP code to do a middleware call? If so I think we might as well just do that.
(In reply to Robert Helmer [:rhelmer] from comment #3)
>    WHERE product_name = 'Firefox'
>    AND version_string = '6.0b')

You mean '6.0' here, right? ;-)

Also, I think we really should have this look for matching build ID and channel in the future, so that what's found with the link really matches the report the link comes from, but if that's too complicated right now, let's go with just version and leave the rest for a followup.
Talked to Brandon: Probably should patch this in place, given the timing.

Rob, can you put up the patch for review?  (Probably also want to inc. Kairo's feedback)
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #4)
> (In reply to Robert Helmer [:rhelmer] from comment #3)
> >    WHERE product_name = 'Firefox'
> >    AND version_string = '6.0b')
> 
> You mean '6.0' here, right? ;-)

'6.0' in reports.version, '6.0b' in product_version_builds.version_string


> Also, I think we really should have this look for matching build ID and
> channel in the future, so that what's found with the link really matches the
> report the link comes from, but if that's too complicated right now, let's
> go with just version and leave the rest for a followup.

Might be able to add this now, I'll look at it.
(In reply to Robert Helmer [:rhelmer] from comment #6)
> (In reply to Robert Kaiser (:kairo@mozilla.com) from comment #4)
> > Also, I think we really should have this look for matching build ID and
> > channel in the future, so that what's found with the link really matches the
> > report the link comes from, but if that's too complicated right now, let's
> > go with just version and leave the rest for a followup.
> 
> Might be able to add this now, I'll look at it.

Yes I think in order to get the right entries from reports table to come up we'll need to:

1) look up version in product_info (or product_selector)
2) if it's new, pull apart the version string:
a) "b" = beta
b) " (beta)" = release
3) restrict query to both buildid and release channel

Otherwise the "beta" and "final beta" won't be differentiated correctly.
I think it's more pragmatic to put this in the PHP for now. Brandon what do you think?

This does not address the release channel issue brought up by kairo, can do that in a followup if this approach looks ok.
Attachment #552729 - Flags: review?(bsavage)
(In reply to Robert Helmer [:rhelmer] from comment #7)
> 1) look up version in product_info (or product_selector)

done in the latest patch

> 2) if it's new, pull apart the version string:
> a) "b" = beta
> b) " (beta)" = release

Actually we don't need to do this, we can lookup major_version as part of #1 above.


> 3) restrict query to both buildid and release channel

done for buildid, looking into release channel now

> Otherwise the "beta" and "final beta" won't be differentiated correctly.

I meant to say "final beta" and "final" here.
Same as last time, but additionally restrict by channel if:

1) "major_version" and "version_string" are the same (release channel)
2) "version_string" contains "b" (beta channel)

Both of these cases are only checked for if this product+version is marked as a newtcbs table.
Attachment #552729 - Attachment is obsolete: true
Attachment #552729 - Flags: review?(bsavage)
Attachment #552768 - Flags: review?(bsavage)
Comment on attachment 552768 [details] [diff] [review]
make /report/list aware of new beta versions

This feels much like a hack, though I think anything besides moving this to the middleware is. Please make sure a bug is on file to relocate this logic or refine it somehow, but for now this will do.

r+
Attachment #552768 - Flags: review?(bsavage) → review+
Trunk:
Committed revision 3410.
2.2 branch:
Committed revision 3411.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
FWIW bug 678741 backs out the buildid restriction added to the query in this bug, see that one for more details.
BTW filed bug 678642 to move this to middleware
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: