mamba
mamba copied to clipboard
implement jlap format for incremental repodata patches
I think the main difficulty (similar to zchunk) will be to have a proper "state-machine" for the different error cases. It is complicated by the fact that the idea of the jlap format is to be able to continue writing to the jlap file from a given offset.
- no repodata json at all locally -> download repodata.json
- repodata.json locally -> check if repodata.jlap exists on server
- jlap does not exist on server -> update json
- jlap does exist, but our local jlap / offset does not match server -> redownload entire jlap file
- jlap exists, but
-hash of repodata.json is not found in jlapfile -> redownload repodata.json (& remove jlap file?) - jlap exists, from-hash exists, but at some point the hashes diverge -> redownload repodata.json (incorrect jlap file)
- parse error of jlap file (e.g. missing required fields)
Maybe there are more cases but these are the ones that come to my mind right now. Probably we should have a dedicated error class for each case.
TIL the jlap format from a post on discourse:
- https://conda.discourse.group/t/how-we-reduced-condas-index-fetch-bandwidth-by-99/257
It sounds very interesting so I'll make sure to follow progress here...
What’s the status of this PR?