add code-mirror.dlang.io as fallback registry#1190
Conversation
MartinNowak
commented
Jul 9, 2017
- to handle any code.dlang.org failures
- depends on download / registry requests silently fail #1104
bec32a4 to
b544eae
Compare
| new RegistryPackageSupplier(URL(defaultRegistryURL)), | ||
| new RegistryPackageSupplier(URL(fallbackRegistryURL)) | ||
| ) | ||
| ]; |
There was a problem hiding this comment.
Why not simply return an array of the two? The intent is already that later array entries act as fallbacks to the earlier ones.
There was a problem hiding this comment.
To avoid duplicates, e.g. in dub search and to correctly deal with user-facing error reporting. The current mechanism adds another registry which can be used e.g. to serve private projects, very different use-case than a mirror registry which is expected to serve identical projects.
There was a problem hiding this comment.
Hope that the documentation on FallbackPackageRegistry is good enough @s-ludwig.
|
|
||
| /// The URL to the official package registry. | ||
| enum defaultRegistryURL = "http://code.dlang.org/"; | ||
| enum fallbackRegistryURL = "https://code-mirror.dlang.io/"; |
There was a problem hiding this comment.
It would make sense to make this an array (this week will I hopefully finally get around setting up a stable mirror myself).
(http://alpha.dub.pm has been around since a while is an active mirror as well, but we use this VM as a pure staging server to preview PRs, hence I don't consider this as stable.)
There was a problem hiding this comment.
this week will I hopefully finally get around setting up a stable mirror myself).
GitHub didn't send my review, so I finally got around setting up a stable mirror myself:
-> https://code-mirror2.dlang.io
Heroku Deploy is a bit more difficult to setup due to vibe-d/vibe.d#1785, but I will get around this as well.
There was a problem hiding this comment.
Heroku Deploy is a bit more difficult to setup due to vibe-d/vibe.d#1785, but I will get around this as well.
-> https://dub-registry.herokuapp.com/
With dlang/dub-registry#231 setting up a local mirror should be absolutely easy (and doesn't even require a CLI nor money).
|
|
||
| abstract class AbstractFallbackPackageSupplier : PackageSupplier | ||
| { | ||
| protected PackageSupplier m_default, m_fallback; |
There was a problem hiding this comment.
As mentioned above, imho it would be useful to have multiple fallbacks.
There was a problem hiding this comment.
Simply nest them like a list new FallbackPackageSupplier(new FallbackPackageSupplier(... ;).
There was a problem hiding this comment.
I'd hope though that a third site wouldn't be necessary. We're also far from needing some round-robing load balancing, and should look at server side load-balancing/DNS etc. if that ever becomes a topic.
b544eae to
81dacac
Compare
|
Thanks for your pull request, @MartinNowak! |
|
Can we make It would be nice to allow users to add fallback registries without caring for duplicates, too. So a duplicate detection logic for |
- to handle any code.dlang.org failures
81dacac to
cb25862
Compare
|
Done @s-ludwig.
Yes, we could add some syntax, e.g. |
|
It might actually be simpler to just implement the dedup feature right away. |