-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create runtime mapping for v1 lib keys to v2 #33604
feat: create runtime mapping for v1 lib keys to v2 #33604
Conversation
…e-runtime-mapping-for-v1-lib-keys-to-v2
…e-runtime-mapping-for-v1-lib-keys-to-v2
…e-runtime-mapping-for-v1-lib-keys-to-v2
a2a5cf7
to
d926bbb
Compare
fix: type annotation for modulestore fix: bad conditioanl fix: remove an obvious flumox fix: another dumb error final order fix fix: final lint fixes fix: static typing fix: I learn to do static checks locally
6de0e25
to
4e5f490
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I could tell, everything looks very good and logical.
Not sure where the update behavior is coming from, that when you enable the waffle flag, updates in V2 libraries show in the course - I assume that's not directly part of the code here.
I just made a comment about the tests. It does look like the TODO says, that a few more tests would be good. I suggested an integration test as well but see what you think the best way to go is.
I'll approve this as it does not go directly into master and the tests may be done within one of the other issues, for example.
""" | ||
Tests for getting Libraries behavior, given the MAP_V1_LIBRARIES_TO_V2_LIBRARIES flag. | ||
|
||
TODO: tests need to be made for more of the methods in this API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
A thought: It would also be nice to see some kind of integration test here, if possible. Less for the specific migration task and more for the end result after migration is done. Basically have an actual course - whether by actually calling the database or by just faking everything - and then test the behavior you described in the testing instructions:
- course includes the mapped library key for V2
- updates made to V2 library pop up in course.
Not sure if that's unreasonable or too difficult, it's simply a suggestion if it makes sense.
Closing since we will not be doing a 1-1 mapping between v1 and v2 libraries. |
https://2u-internal.atlassian.net/browse/TNL-11138
DO not merge yet, dependent on #33511
Testing instructions.
./manage.py cms --settings=production copy_libraries_from_v1_to_v2 '11111111-2111-4111-8111-111111111111' ./list_of--library-locators.csv --all