Closed Bug 1346993 Opened 7 years ago Closed 7 years ago

Move windows_versions table into the processor rule

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lonnen, Unassigned)

References

Details

Expose the OSPrettyVersionRule. _get_windows_versions function as an API endpoint.

    def _get_windows_versions(self):
       ...
       return [[windows_version_name, major_version, minor_version],...]

This function grabs all the windows versions in the windows_versions table. It is used to build a lookup table used in one place -- _get_pretty_os_version.


This or an equivalent may already exist.
Oer the database documentation, the windows_versions table is manually populated. A quick search shows that two stored procedures, update_os_versions and update_os_versions_new_reports populate it. It appears to only be used by the processor rules.

This makes it a good candidate for moving into the processor rules rather than exposing it as an api.
Summary: expose OSPrettyVersionRule. _get_windows_versions() query as an api service → Move windows_versions table into the processor rule
I think moving the data out of the db table and inline with the rule sounds awesome! +1
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/ca799c711c19f372e1752dc197a3287d620e137a
fixes bug 1346993

moves window pretty name lookup table into the name prettifying rule, refactors, and documents the rule. removes one more instance of direct database access from the processor.

https://github.com/mozilla-services/socorro/commit/d8faf71d407cb04af28a92b71ee1255dc23202dc
Merge pull request #4245 from mozilla-services/fixes-1346993-osprettyversionrule

fixes bug 1346993 - OSPrettyVersionRule
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.