-
Notifications
You must be signed in to change notification settings - Fork 286
Closed
Labels
experimental-clientItems related to the development of a new client (see milestone/8 and theexperimental-client branch)Items related to the development of a new client (see milestone/8 and theexperimental-client branch)
Milestone
Description
Current state of _mirror_target_download() and _mirror_meta_download() in experimental client is a bit bad:
- they are actually iterators that keep returning unverified file objects to the caller, this seems unusual and surprising: I was expecting them to return a verified file object
- caller is expected to verify the contents --- this makes some sense as the verification is different for e.g. root metadata and other metadata and targets... but it should be made very clear that the file object is potentially malicious data at this point
- none of the callers currently iterate these function results (they just raise if first result is invalid) so it's not clear if mirrors actually work
- NoWorkingMirrorError can't be raised from these iterators like it now happens (on every iteration that fails), it does not make any sense
- _mirror_target_download type annotation is wrong
I would suggest we revert to a known working design if possible (_mirror_target_download() could just be almost 1:1 the current clients _get_target_file() function but the metadata verification needs something else).
I'll try to come up with something...
Metadata
Metadata
Assignees
Labels
experimental-clientItems related to the development of a new client (see milestone/8 and theexperimental-client branch)Items related to the development of a new client (see milestone/8 and theexperimental-client branch)