Closed
Bug 1159220
Opened 9 years ago
Closed 8 years ago
Remove dependency on SQLAlchemy
Categories
(Marketplace Graveyard :: Code Quality, enhancement, P4)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mat, Unassigned)
References
Details
(Whiteboard: [ktlo])
django-mysql-pool is gone from zamboni with the django 1.7 upgrade. SQLAlchemy is still here because services/utils.py needs it, because services/verify.py wants to connect to the database manually bypassing the django ORM. We should consider whether bypassing the ORM is really worth it (might be premature optimization) but more importantly, we should try to use the django connection API instead of manually connecting with SQLAlchemy, there is no point in having a separate dependency just to connect to the database.
Reporter | ||
Comment 1•9 years ago
|
||
https://github.com/diox/zamboni/commit/6af1fecb4088a300e29d9779d6f3e607d60b8c69 should work, but how can I test that I'm not introducing some perf issues with the verifier ?
Updated•9 years ago
|
Severity: normal → enhancement
Priority: -- → P4
Comment 3•9 years ago
|
||
IIRC this was done as actual optimization to the AMO version check service (when it was serving 10,000 requests/sec). But that got ported over to the Marketplace receipt check which doesn't get traffic anywhere near that. So... I suppose we could move that service back to Django. That would be a lot of work though. I don't know how easy it would be to replace sqlalchemy with the Django ORM in that service because the service is not Django.
Flags: needinfo?(kumar.mcmillan)
Comment 4•9 years ago
|
||
+1 on moving it back in to zamboni and making it Django only. I've suggested this happen (sure I filed bugs on it, can't find them now), it will simplify so many things. SQLAlchemy was used because it was there and convenient, there's no reason you need to keep it around if you can do it a different wya.
Comment 5•9 years ago
|
||
(In reply to Kumar McMillan [:kumar] (needinfo for quickness) from comment #3) > So... I suppose we could move that service back to Django. That would be a > lot of work though. I don't know how easy it would be to replace sqlalchemy > with the Django ORM in that service because the service is not Django. Its well tested, with a full unit test suite in Django, all tables are accessible from models in Django. Shouldn't be too tough, just a bit of grunt work.
Reporter | ||
Comment 6•9 years ago
|
||
Thanks for the info. I've opened bug 1159746 to deal with migrating it fully to django because it's more work than just getting rid of sqlalchemy (which I'll take right now because it's an easy win).
Assignee: nobody → mpillard
Target Milestone: --- → 2015-05-05
Reporter | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 7•9 years ago
|
||
Fixed in https://github.com/mozilla/zamboni/commit/e4dcdc9842853fb71e7e05c9ceefa0b4e846289f QA: - Please verify that payment flow still works
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•9 years ago
|
||
Follow up because of errors (2013, 'Lost connection to MySQL server during query') on stage after a while: https://github.com/mozilla/zamboni/commit/2fab0ae58685c4b95d5e53629c9dad9023126fba
Reporter | ||
Comment 9•9 years ago
|
||
Those 2 commits were reverted in https://github.com/mozilla/zamboni/commit/6c97a47b3e8af6d9699b42687db0e3987e38fdae because dev & stage were still having errors.
Assignee: mpillard → nobody
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 2015-05-05 → ---
Updated•9 years ago
|
Whiteboard: [ktlo]
Comment 10•8 years ago
|
||
Payments is trending to close...
Status: REOPENED → RESOLVED
Closed: 9 years ago → 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•