Reynir Björnsson reynir · he/him/his
  • Joined on 2024-08-21
reynir commented on pull request robur/opam-mirror#25 2024-11-21 11:37:36 +00:00
WIP: Cache only version

Indeed, this would be like if squid could predict the endpoints and pre-warm the cache. With this you could run it on your laptop with opam.ocaml.org or opam.robur.coop as the upstream at home,…

reynir deleted branch add-pause-during-check from robur/opam-mirror 2024-11-21 11:31:08 +00:00
reynir pushed to main at robur/opam-mirror 2024-11-21 11:31:07 +00:00
6447339f64 Merge pull request 'add some Lwt.pause during Disk.check to allow the web server to process requests' (#26) from add-pause-during-check into main
c57b070d87 add some Lwt.pause during Disk.check to allow the web server to process requests
Compare 2 commits »
reynir merged pull request robur/opam-mirror#26 2024-11-21 11:31:06 +00:00
add some Lwt.pause during Disk.check to allow the web server to process requests
reynir deleted branch specify-in-mb from robur/opam-mirror 2024-11-21 11:27:44 +00:00
reynir pushed to main at robur/opam-mirror 2024-11-21 11:27:43 +00:00
2c606dbeb4 Merge pull request 'specify sizes of partitions in MB, not in sectors' (#27) from specify-in-mb into main
c5e091a294 specify sizes of partitions in MB, not in sectors
Compare 2 commits »
reynir merged pull request robur/opam-mirror#27 2024-11-21 11:27:41 +00:00
specify sizes of partitions in MB, not in sectors
reynir commented on pull request robur/opam-mirror#27 2024-11-21 11:27:31 +00:00
specify sizes of partitions in MB, not in sectors

I used sectors because I didn't want to deal with rounding and potential overflow. I think with realistic disk sizes we don't have to worry about overflow thankfully.

reynir approved robur/opam-mirror#26 2024-11-21 11:23:32 +00:00
add some Lwt.pause during Disk.check to allow the web server to process requests

Thanks. To be honest I think a single Lwt.pause () should be sufficient since we process at most 4096 bytes at a time. But this should work just fine!

reynir pushed to startup at robur/opam-mirror 2024-11-19 15:26:26 +00:00
a9c249ea86 Use Map.fold over List.fold_left ... (Map.bindings _)
reynir commented on pull request robur/opam-mirror#24 2024-11-19 15:21:40 +00:00
revise startup, address urls pointing to same sha256 and support mirrors (upstream and in opam file)

Latest commit splits mirror URLs from upstream cache URLs so the mirror URLs are tried first before the upstream caches, and adds a longer description of the option.

reynir pushed to startup at robur/opam-mirror 2024-11-19 15:04:56 +00:00
ec45a6a77a Prioritize mirrors over upstream caches
reynir commented on pull request robur/opam-mirror#24 2024-11-19 14:31:09 +00:00
revise startup, address urls pointing to same sha256 and support mirrors (upstream and in opam file)

Hm it turns out the exact semantics is a bit complicated to explain. You are right that we first to go the source! Then we go to the mirrors or the cache depending on how the URLs sort as they…

reynir commented on pull request robur/opam-mirror#24 2024-11-19 12:11:06 +00:00
revise startup, address urls pointing to same sha256 and support mirrors (upstream and in opam file)

I don't think the order is significant, but it's worth noting we reverse the order here.

reynir commented on pull request robur/opam-mirror#24 2024-11-19 12:11:06 +00:00
revise startup, address urls pointing to same sha256 and support mirrors (upstream and in opam file)

The opam source code does url :: mirrors FWIW. Just an observation; not a request for change.

reynir commented on pull request robur/opam-mirror#24 2024-11-19 12:11:06 +00:00
revise startup, address urls pointing to same sha256 and support mirrors (upstream and in opam file)

"Upstream caches to use internally (e.g. https://opam.ocaml.org/cache). This makes opam-mirror try the cache(s) before going to the source and mirrors. This does not change the published "archive-mirrors:" value in the /repo endpoint."

reynir commented on pull request robur/opam-mirror#24 2024-11-19 12:11:06 +00:00
revise startup, address urls pointing to same sha256 and support mirrors (upstream and in opam file)

This looks interesting. I will do a closer review later.