Closed Bug 880569 Opened 11 years ago Closed 11 years ago

Write a migration script to publish projects to the MakeAPI

Categories

(Webmaker Graveyard :: Popcorn Maker, defect)

defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jon, Assigned: cade)

References

Details

(Whiteboard: s=2013w24 p=1)

Attachments

(2 files)

As discussed in bug 878096, we need to write a migration script that will publish all existing Popcorn projects to the MakeAPI so that when users log in, their projects will be visible in the My Projects dashboard.

This will likely be a one-off script so prettiness is not required, just working code. We can import the data from prod into staging for testing purposes when the script is written.
Blocks: 878100
Whiteboard: s=2013w24 → s=2013w24 p=1
Severity: normal → blocker
Assignee: jon → chris
Le Script.
Attachment #761690 - Flags: review?(jon)
Comment on attachment 761690 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/53

Looks pretty good! But I think it can be improved with the use of async, and we should definitely considered hard-coding the utils/stores bits, since I'm currently 2/3rds of the way to removing them.
Attachment #761690 - Flags: review?(jon) → review-
Comment on attachment 761690 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/53

Okay, I've used async to ensure that the process of resolving remixes, publishing to the makeAPI and re-saving the make id into the project is done synchronously. I had a bug where I had things being done in parallel and it DDOS'ed my local log in server.

I also removed the use of the utils file, and ripped out the URL generating functions I needed.

Total run time on the 29K rows in the backup data I have took ~6+ minutes
Attachment #761690 - Flags: review- → review?(jon)
This Patch to the MakeAPI supports the fact that almost none of the old projects owners will have already created a webmaker account, this sidesteps around the login server using an environment variable.

we can toggle it on for the migration then restart with it off.

https://github.com/mozilla/MakeAPI/pull/82
Attachment #762056 - Flags: review?(jon)
Attachment #762056 - Flags: review?(jon) → review+
FYI - this script depends on the previous migration scripts being applied to the database. They add thumbnail and makeid columns.
Commit pushed to master at https://github.com/mozilla/MakeAPI

https://github.com/mozilla/MakeAPI/commit/55fcfc606c306259646d35e9b80cc205a98317f3
Bug 880569 - Support the mass migration of record with a lazy admin environment var. keep false in most cases.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #761690 - Flags: review?(jon)
Attachment mime type: text/plain → text/x-github-pull-request
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.

Attachment

General

Created:
Updated:
Size: