clojars

http://clojars.org discussion and “support”, see http://status.clojars.org for status.
flowthing 2020-01-24T08:52:14.018100Z

I have a CI build that executes build steps in parallel, and many of the download artifacts from Clojars. Every now and then, a build fails with something like Error building classpath. Could not transfer artifact ring:ring-defaults:jar:0.3.2 from/to clojars (<https://repo.clojars.org/>): Connection reset or Error building classpath. Could not transfer artifact crypto-equality:crypto-equality:jar:1.0.0 from/to clojars (<https://repo.clojars.org/>): /root/.m2/repository/crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0.jar.part (No such file or directory). Is it possible that Clojars doesn't like my build downloading so many artifacts simultaneously? That is, does Clojars do some sort of throttling that might cause this? If so, that's fine and understandable — I'll just need to either forgo parallelism or try to figure out how to cache artifacts so that I don't need to redownload them on every build.

2020-01-24T10:38:15.021300Z

Howdy @flowthing! There shouldn't be any throttling on the http://repo.clojars.org endpoint - that's handled by a fastly CDN. So I think that any connection resets may be random network errors. The latter error is local, not a network issue. I suspect that if those build steps are sharing an .m2/repository, you would get race conditions if they are trying to download the same artifacts at the same time. I would either: • try to resolve all dependencies before running parallel steps • give each step its own .m2/repository/ and cache that between builds

flowthing 2020-01-24T10:42:13.021400Z

Many thanks for looking into it! That makes total sense. I'll look into the options you suggested. I'm working with Google Cloud Build and I haven't been able to get .m2/repository caching to work, but I think the first option should be doable.