Maven Virtual Registry: Not allow duplicated upstreams
The following discussion from !188615 (merged) should be addressed:
-
@mkhalifa3 started a discussion: (+2 comments) We could have duplicate upstreams in one registry. In this case, the
Typhoeus::Requestinstance will be identical. Do you think we could utilize typhoeus' memoization to avoid sending identical requests?
🔥 Problem
Virtual Registries can be linked to a set of upstreams where two upstreams point to the the same url.
This can led to performance issues. For example, we could duplicate the request that will check the upstream.
🚒 Solution
Either
- Don't allow the same
urlto be used multiple times inregistry.upstreams(model validation) or - In
ee/app/services/virtual_registries/check_upstreams_service.rb, remove duplicated upstreams.
Edited by 🤖 GitLab Bot 🤖