-
Notifications
You must be signed in to change notification settings - Fork 732
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
Automatic content syncing: preferred instance tracking and fixes #11083
Conversation
Build Artifacts
|
…akout free space calc
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.
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_id
toContentRequest
model as the preferred instance to source the content fromContentDownloadRequest
API to supportsource_instance_id
content_request
utilities handling metadata import, peer processing, and total size annotations0
NetworkLocation
models to uselocation_type
field instead ofdynamic
boolean and necessary migrations (planned in Reserved network locations for Studio and KDP #10431)reserved
NetworkLocation
for Studio using UUID generated fromCENTRAL_CONTENT_BASE_URL
NetworkLocation
API to allow detail retrieval usinginstance_id
assuming lack of conflicts, and excludes reserved locations in list responsesinstance_id
and overwriting it forreserved
NetworkLocation
s until we can get Studio to return the same instance IDNetworkLocationResource
APIs on the frontendcanDownload
allowing users to download resources externally, to disambiguate between new download featureuseDevices
composable to compare route and current device byinstance_id
catch()
in learn's routing, and removes potentially duplicate calls torouter.replace
allow_learner_download_resources
device setting in the frontend to only show the download button when enabledle_utils
from0.1.38
to0.2.1
References
learningequality/le-utils#111
Fixes #10732
Resolves #11022
Contributes to #10386
Starts #10431
Reviewer guidance
options.ini
to the hotfixes serverTesting checklist
PR process
Reviewer checklist
yarn
andpip
)