Closed
Bug 875945
Opened 12 years ago
Closed 12 years ago
Change login server DB backend to MySQL with live migration, change UUID from email to a number
Categories
(Webmaker Graveyard :: Login, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sedge, Assigned: sedge)
References
Details
(Whiteboard: s=20130722 p=1)
Attachments
(1 file)
There are two things that must be reviewed with regards to the Login server's persistent data storage:
1) Should we be using MongoDB?
2) Should we be using the user's email as their UUID in the database we choose?
Currently, we ARE using MongoDB, and we ARE using a Webmaker's email as their UUID. There are going to be implications to changing either or both of these, and this bug should clear those up.
Comment 1•12 years ago
|
||
1) Nah, we're not really storing data like that
2) No, just an auto-incrementing ID
Comment 2•12 years ago
|
||
To sum up:
1) Let's get the login tests landed (bug 873091)
2) Let's move to MySQL (needs new bug)
3) Let's drop ._id and use an auto increment field (this can happen in 2) above)
Next question: In webmaker-loginapi we use an "ID" for getUser and isAdmin, see https://github.com/humphd/node-webmaker-loginapi/blob/master/index.js#L41. There are going to be some cascading implications for the move to an integer from an email here, since many clients are going to have the email via Persona routes of one kind or another. Once 1-3 are done above, we need to carefully trace the use of `id` through *.webmaker.org.
CC'ing some folks who should be aware of this.
Depends on: 873091
Comment 3•12 years ago
|
||
Did this get accomplished? I think it did, but want to be sure before just closing it out.
Comment 4•12 years ago
|
||
It didn't get done and I don't know if attempting to do this with 2 days until we hit the ON button is a good idea.
But maybe it is, since it means we won't need to migrate any data from mongodb to mysql...
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → kieran.sedgwick
| Assignee | ||
Updated•12 years ago
|
Summary: Review database approach for the Login server → Change login server DB backend to MySQL
| Assignee | ||
Comment 5•12 years ago
|
||
This patch includes switching the primary key from a user's email to a generated UUID.
| Assignee | ||
Comment 6•12 years ago
|
||
Attachment #772845 -
Flags: review?(schranz.m)
Attachment #772845 -
Flags: review?(david.humphrey)
| Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Almost there. Almost.
Attachment #772845 -
Flags: review?(schranz.m)
Attachment #772845 -
Flags: review?(david.humphrey)
| Assignee | ||
Comment 8•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Woo!
Attachment #772845 -
Flags: review?(schranz.m)
Attachment #772845 -
Flags: review?(david.humphrey)
Comment 9•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Looking good, but see the pull request for all of my comments.
Attachment #772845 -
Flags: review?(schranz.m) → review-
| Assignee | ||
Updated•12 years ago
|
Attachment #772845 -
Flags: review- → review?(schranz.m)
Comment 10•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
See PR.
Attachment #772845 -
Flags: review?(schranz.m) → review-
| Assignee | ||
Updated•12 years ago
|
Attachment #772845 -
Flags: review- → review?(schranz.m)
| Assignee | ||
Updated•12 years ago
|
Attachment #772845 -
Flags: review?(chris)
Updated•12 years ago
|
Attachment #772845 -
Flags: review?(schranz.m) → review+
Comment 11•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
This looks great, left a bunch of comments in the PR. awesome stuff!
Attachment #772845 -
Flags: review?(chris) → review-
| Assignee | ||
Updated•12 years ago
|
Attachment #772845 -
Flags: review- → review?(chris)
| Assignee | ||
Comment 12•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Bugs ahoy
Attachment #772845 -
Flags: review?(david.humphrey)
Attachment #772845 -
Flags: review?(chris)
| Assignee | ||
Updated•12 years ago
|
Attachment #772845 -
Flags: review?(david.humphrey)
Attachment #772845 -
Flags: review?(chris)
Comment 13•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
A bunch of comments/questions in the PR. I should probably look at this again when it's been through a round of fixes.
Attachment #772845 -
Flags: review?(david.humphrey) → review-
| Assignee | ||
Comment 14•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
MOAH EYEZ
Attachment #772845 -
Flags: review?(jon)
| Assignee | ||
Comment 15•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
1 more major revision, then flagging you again.
Attachment #772845 -
Flags: review?(jon) → review-
Comment 16•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Looking great, will review again when you push up your next set of fixes and moar testz.
Attachment #772845 -
Flags: review?(chris) → review-
| Assignee | ||
Updated•12 years ago
|
Attachment #772845 -
Flags: review- → review?(chris)
| Assignee | ||
Updated•12 years ago
|
Summary: Change login server DB backend to MySQL → Change login server DB backend to MySQL, change UUID from email to a number
Comment 17•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
ARRRRRRR+
Attachment #772845 -
Flags: review?(chris)
Attachment #772845 -
Flags: review-
Attachment #772845 -
Flags: review+
| Assignee | ||
Comment 18•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Slowly but surely...
Attachment #772845 -
Flags: review?(jon)
| Assignee | ||
Updated•12 years ago
|
Whiteboard: c=login s=2013w29
Updated•12 years ago
|
Whiteboard: c=login s=2013w29 → s=2013w29 p=1
Comment 19•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Unassigning from myself while Kieran does some code changes
Attachment #772845 -
Flags: review?(jon)
| Assignee | ||
Comment 20•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
They were good times. I laughed, I cried, I - well, I mostly cried.
Lets get 'er done!
Attachment #772845 -
Flags: review?(jon)
| Assignee | ||
Comment 21•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Switching to Matt since Jon is on PTO.
Attachment #772845 -
Flags: review?(jon) → review?(schranz.m)
| Assignee | ||
Comment 22•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Added Jon back to review for testing towards deployment on production. I'm leaving Matt on for code review.
Attachment #772845 -
Flags: review?(jon)
| Assignee | ||
Updated•12 years ago
|
Summary: Change login server DB backend to MySQL, change UUID from email to a number → Change login server DB backend to MySQL with live migration, change UUID from email to a number
Comment 23•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
Jon, can you help me understand why you want the code base to basically carry two systems? Why force someone to keep mongo and mysql running? Why are we changing how we have always done things (migration scripts) to keeping around extra code that really isn't needed?
Personally, I'm against it and don't understand why this decision was made. Can you help me here?
Attachment #772845 -
Flags: review?(schranz.m) → feedback?(jon)
| Assignee | ||
Updated•12 years ago
|
Whiteboard: s=2013w29 p=1 → s=20130722 p=1
Comment 24•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
If support for mongodb is completely removed, there's going to be downtime while we migrate user accounts from mongodb to mysql. And this wouldn't just be downtime for some portions of the site, it'd be for all of *.webmaker.org & *.makes.org.
It's more of a technical burden for us to carry, but I don't expect us to carry it for long. Once it's been landed, we can write a migration script to move the webmaker accounts that haven't been migrated yet. Once they've all been migrated, then we can have a follow-up patch to remove the mongodb bits left in login.webmaker.org.
Attachment #772845 -
Flags: feedback?(jon)
| Assignee | ||
Comment 25•12 years ago
|
||
mjschranz, jbuck - To make it less of a development burden, I can make mongoDB an optional dev dependancy using an environment variable (or procfile).
| Assignee | ||
Comment 26•12 years ago
|
||
This patch being landed is now more dependant on the (lengthy) review process than it is on my attention to the bug, so I'm moving on to other work.
As reviews happen, which I assume they will as soon as there's time for them, I'll come back to this.
Comment 27•12 years ago
|
||
Found a bug here, if fullName is null then the SQL insert fails. Checking on prod shows:
> db.users.count({fullName: null})
631
I'll need to fix this up before we ship this to staging
Comment 28•12 years ago
|
||
Comment on attachment 772845 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/127
r+ with the deployment problem noted above. I'll need to fix that, then this can be merged to staging
Attachment #772845 -
Flags: review?(jon) → review+
Comment 29•12 years ago
|
||
Commits pushed to master at https://github.com/mozilla/login.webmaker.org
https://github.com/mozilla/login.webmaker.org/commit/01941d69ff719464dd4ddab8ffed52907474002e
[bug 875945] Changed over from MongoDB to MySQL
https://github.com/mozilla/login.webmaker.org/commit/e5c327cc44b1acd1adb437e178e2b0ae31882e7b
Merge pull request #127 from ksedge/bug875945
[bug 875945] Changed over from MongoDB to MySQL
| Assignee | ||
Comment 30•12 years ago
|
||
This patch is up and running on staging - I'm keeping this bug open until we have it running properly on production.
| Assignee | ||
Comment 31•12 years ago
|
||
Running on prod! Heck yeah!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in
before you can comment on or make changes to this bug.
Description
•