-
Notifications
You must be signed in to change notification settings - Fork 864
Automatic content syncing: preferred instance tracking and fixes #11083
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
Automatic content syncing: preferred instance tracking and fixes #11083
Conversation
Build Artifacts
|
…akout free space calc
rtibbles
left a comment
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.
Just a couple of questions - but nothing that should be blocking merge.
| is_learner_download=Case( | ||
| When( | ||
| source_model=FacilityUser.morango_model_name, | ||
| then=FixedExists( |
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.
Is the error this is fixing specific to using the Exists subquery in a then statement?
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.
I'm not sure. There seemed to be some mixing of parameter definitions and invocation styles with regards to single args and keyword args in the calls to resolve_expression. The function parameters are indeed all keyword args, but I recall seeing instances in other Django expressions where it was called with plain args, like this Case(then=) does here, but they happened to match the keyword arguments, which would still work right? The Exists wildcarded the keyword args, which seemed to cause the issue.
rtibbles
left a comment
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.
Code changes make sense, and manual testing checks out (weird local data issues aside!)
Summary
Resolves issues with stalled 'My Downloads' through final integration of device settings features and usage of a reserved Network Location for Studio, allowing us to set a preference for which device to source downloads from.
Details
source_instance_idtoContentRequestmodel as the preferred instance to source the content fromContentDownloadRequestAPI to supportsource_instance_idcontent_requestutilities handling metadata import, peer processing, and total size annotations0NetworkLocationmodels to uselocation_typefield instead ofdynamicboolean and necessary migrations (planned in Reserved network locations for Studio and KDP #10431)reservedNetworkLocationfor Studio using UUID generated fromCENTRAL_CONTENT_BASE_URLNetworkLocationAPI to allow detail retrieval usinginstance_idassuming lack of conflicts, and excludes reserved locations in list responsesinstance_idand overwriting it forreservedNetworkLocations until we can get Studio to return the same instance IDNetworkLocationResourceAPIs on the frontendcanDownloadallowing users to download resources externally, to disambiguate between new download featureuseDevicescomposable to compare route and current device byinstance_idcatch()in learn's routing, and removes potentially duplicate calls torouter.replaceallow_learner_download_resourcesdevice setting in the frontend to only show the download button when enabledle_utilsfrom0.1.38to0.2.1References
learningequality/le-utils#111
Fixes #10732
Resolves #11022
Contributes to #10386
Starts #10431
Reviewer guidance
options.inito the hotfixes serverTesting checklist
PR process
Reviewer checklist
yarnandpip)