Update script params for the 2018 CourseA-CourseF levels backfill - #26362
#26362Update script params for the 2018 CourseA-CourseF levels backfill#26362uponthesun merged 27 commits intostagingcode-dot-org/code-dot-org:stagingfrom 2018-courses-proficiencies-backfillcode-dot-org/code-dot-org:2018-courses-proficiencies-backfillCopy head branch name to clipboard
Conversation
DTP (Test > Production: eb8ad48)
DTP (Test > Production: 98fe4a5)
Manual DTP
DTP (Test > Production: f8d3e5b)
DTP (Test > Production: 8635c26)
DTP (Test > Production: 66a8dd9)
DTP (Test > Production: 4debf60)
DTP (Test > Production: 62b77f3)
DTP (Test > Production: 8e91824)
DTP (Test > Production: 01f4963)
DTP (Test > Production)
DTP (Test > Production: b389225)
DTP (Test > Production: f7c4ffe)
DTP (Test > Production: 3ca1416)
DTT (Staging > Test) [robo-dtt]
DTT (Staging > Test) [robo-dtt]
…-CourseF levels backfill
Hamms
left a comment
There was a problem hiding this comment.
how were the start_ and end_ids in the sed files obtained?
| AGGREGATE_FILENAME = '/tmp/proficiency/aggregate_20170601_20171001'.freeze | ||
| # This script wasn't written to take in arguments; instead it uses these hardcoded paths | ||
| # (together with DATE_RANGES) above for input and output files. | ||
| DATA_DIRECTORY = '/Users/winterdong/CDO/proficiencies_backfill'.freeze |
There was a problem hiding this comment.
nit: I'd suggest either keeping this in /tmp/ or just updating the script to take arguments
There was a problem hiding this comment.
Is changing this constant back to /tmp acceptable?
/lazy
|
I got the start_id and end_id in the .sed files from trial and error (finding ids close to the date range boundaries). For start_id, I erred slightly before the start of the date range, and end_id erred slightly after. |
Hamms
left a comment
There was a problem hiding this comment.
LGTM! I love the generated .sql files being included here for clarity!
| require_relative '../../../dashboard/config/environment' | ||
|
|
||
| # Fields: | ||
| # start_date, end_date, end_timestamp, already_recorded |
There was a problem hiding this comment.
I think there's one script ID missing here (303, the express course) It was script_id 258 in the previous version.
There was a problem hiding this comment.
The only thing I see to change is adding the script ID for the express course to the query template. Thanks for handling this Winter!
[note: this big red X seems very harsh. maybe I should have just added this as a comment. not sure what the appropriate git-iquette is]
DTT (Staging > Test) [robo-dtt]
|
Haha I often feel that way too, but I think "changes requested" is appropriate for any changes that must be made before committing (or in this case running). Will add and update, thanks! |
DTT (Staging > Test) [robo-dtt]
DTP (Test > Production: e359dc3)
…-dot-org/code-dot-org into 2018-courses-proficiencies-backfill
… already-recorded date range
|
Had to add a nil check to the script when it hit a certain case during execution (when the user only had progress during the already recorded date ranges), but otherwise the backfill ran smoothly. Here are the numbers for before/after the backfill on basic proficiency achieved per month: Before: After: |
|
hi folks, it looks like this branch is currently checked out on production-console. OK for me to put that machine back onto the production branch? |
|
Yes, I'm all done with the branch, you can change it back. Sorry about that! |
Followed the same process as this previous proficiencies backfill: #18530
Context:
Between July 1, 2018 and Oct 4, 2018 (when #25185 was merged), the 2018 versions of the CourseA-CourseF levels were missing level concept difficulty tagging, so user_proficiencies counters weren't updated for user progress on those courses during that time. user_proficiencies data is used in our analysis of the efficacy of those courses, as well as in our donor reports.
I'm going to be executing these queries/this script to backfill user_proficiencies; posting this PR to get more eyes on the changes before I do against the prod db.
I'm including the *.sed and *.sql files here for review, but I won't commit those files.