Closed Bug 804253 Opened 13 years ago Closed 12 years ago

[socorro-crashstats] Stop using settings.OPERATING_SYSTEMS. In favor of models.Platforms

Categories

(Socorro :: Webapp, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: peterbe)

References

Details

We should NOT hard code the list of operating systems in settings. Instead we should rely on the models.Platform class whenever we need a list of operating systems.
Depends on: 749359
Is this bug on enabling other platforms than Win/Mac/Linux in the UI or do we have a separate one on that?
I guess bug 804292 is connected to this as well.
This bug is about using whatever we have in the database as our list of platforms. I am not aware of any bug to add new platforms, but that certainly should be a separate issue. (Though most certainly blocked on this bug. )
Depends on: 804292
Depends on: 1066344
When I did https://bugzilla.mozilla.org/show_bug.cgi?id=1066344 last week I replaced the hardcoded list of platforms with a query to the `/platforms/` middleware service. The hardcoded list not only had `code` and `name` but also a boolean called `display` which is used in the UI in various places. So I "moved" that into settings/base.py. That was kinda silly because in settings/base.py we now have: # top three operating systems OPERATING_SYSTEMS = ( 'Linux', 'Mac OS X', 'Windows', ) ...a bit further down... # When we pull platforms from the Platforms API we later decide which of # these to display at various points in the UI. DISPLAY_OS_NAMES = ['Windows', 'Mac OS X', 'Linux'] It's the same stuff just different names. Also, shame on me for not doing it as a tuple! I grepped for OPERATING_SYSTEMS and found nothing is it safe to remove now?
Flags: needinfo?(adrian)
If we don't use OPERATING_SYSTEMS anymore, I guess it is fine to remove it indeed! :)
Flags: needinfo?(adrian)
Assignee: nobody → peterbe
Commits pushed to master at https://github.com/mozilla/socorro https://github.com/mozilla/socorro/commit/9ceb1d3bd852e198bd8fdc205c5095dd9ab453ac fixes bug 804253 - remove settings.OPERATING_SYSTEMS https://github.com/mozilla/socorro/commit/69d06f6f75eeb872327e6f2f00b7e0bcee9a84d8 Merge pull request #2385 from peterbe/bug-804253-remove-settingsoperating_systems fixes bug 804253 - remove settings.OPERATING_SYSTEMS
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104
(In reply to Robert Helmer [:rhelmer] from comment #8) > I think this busted correlations: > > https://crash-stats.allizom.org/correlation?product=Firefox&version=35. > 0a1&platform=Windows%20NT&signature=memcpy+|+gfxSurfaceDrawable%3A%3ADrawWith > SamplingRect%28gfxContext*%2C+gfxRect+const%26%2C+gfxRect+const%26%2C+bool%2C > +GraphicsFilter+const%26%2C+double%29&correlation_report_type=core-counts > > "Select a valid choice. Windows NT is not one of the available choices." Actually this shouldn't be the problem, sorry about the noise
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: 104 → 105
You need to log in before you can comment on or make changes to this bug.