Closed Bug 711295 Opened 14 years ago Closed 14 years ago

remove productdims dependency from UI code

Categories

(Socorro :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rhelmer, Assigned: adrian)

References

Details

(Whiteboard: [qa-])

Turns out we need at least one entry in productdims table (which is deprecated) in order to get new product names like FennecAndroid to show up in the UI (pulldown menu, branch-data-sources admin screen at least). Be sure to also update the docs http://socorro.readthedocs.org/en/latest/databasetablesbysource.html#databasetablesbysource-chapter and remove the CSV from https://github.com/mozilla/socorro/tree/master/tools/dataload
Component: Socorro → General
Product: Webtools → Socorro
Assignee: nobody → bsavage
Here's an easy way to repro, on a local dev DB. productdims is marked as depreciated, and none of the matviews we build now depend upon it - http://socorro.readthedocs.org/en/latest/databasetablesbysource.html#depreciated-tables So, just delete everything from the table: psql breakpad breakpad=# delete from productdims; Restart memcached: $ sudo /etc/init.d/memcached restart Expected result: app should not depend upon productdims at all anymore; there should be no way to populate it via the UI and we've had to special-case it manually for FennecAndroid Actual result: Trying to load front page, getting this in the logs: 2012-01-04 08:48:48 -08:00 --- error: [5xx Error] File: application/libraries/MY_Controller.php; Line: 326; Message: Invalid argument supplied for foreach() Looks like it's breaking trying to iterate over branch_model->getProducts();
Target Milestone: 2.4 → 2.4.1
Target Milestone: 2.4.1 → 2.4.2
Target Milestone: 2.4.2 → 2.4.4
Assignee: bsavage → nobody
Assignee: nobody → sneethling
Target Milestone: 2.4.4 → 2.5.1
Myself and Adrian had a look at the code above that breaks when the productdims table is cleared. So, the issue is as follows: This function branch_model->getProducts(); does a SQL query against the branches 'table' to get the products. branches is in facta SQL view build up from the productdims: CREATE VIEW branches AS SELECT product,version,branch FROM productdims Now when the productdims table is cleared this view now also has no data and this causes the error [:rhelmer] mentioned above as the above function now returns false as apposed to an array. I did some greps across the codebase and found that the branches view is used in quite a few places so, it would be best to rewrite the view to get it's data from another table. One can easily get the data from a table such as products_versions but the one thing I cannot yet find is where to get the data for the branch column of the view. With that said though, Adrian did have a quick talk with Kairo and I also did a follow up and he feels that we can drop the branch and should in general be moving away from the whole notion of branches. I would love some feedback on how everyone believe we should proceed from here and whether we should create a new bug on which this one will depend, to do as Kairo suggested.
Target Milestone: 2.5.1 → 2.4.4
Target Milestone: 2.4.4 → 2.5.1
Target Milestone: 2.5.1 → 2.5.2
Target Milestone: 2.5.2 → 2.5.3
Target Milestone: 3 → 5
Target Milestone: 5 → 6
Target Milestone: 6 → 7
Target Milestone: 7 → 8
Moving this to release 10. Adrian, myself and jberkus needs to work on this together as there is much more to this bug then simply removing the productdims dependency.
Target Milestone: 8 → 10
Target Milestone: 10 → 11
Depends on: 752074
Target Milestone: 11 → 12
Depends on: 734095
Assignee: sneethling → adrian
Target Milestone: 12 → 11
Version: 2.2 → Trunk
Target Milestone: 11 → 12
Target Milestone: 12 → 13
Target Milestone: 13 → 14
Target Milestone: 14 → 16
Target Milestone: 16 → Future
`grep -r productdims ./webapp-php/` and `grep -r osdims ./webapp-php/` show no sql containing one of those two tables, this is fixed! No QA needed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Target Milestone: Future → 18
You need to log in before you can comment on or make changes to this bug.