conan-io / conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
MIT License
165 stars 70 forks source link

RemotesManager should not change the order of the remotes #613

Open Basti-D opened 1 year ago

Basti-D commented 1 year ago

Problem

The RemotesManager changes the order of the remotes When we define multiple remotes A, B, C, D, the RemotesManager adds B, C, D, A to Conan. This changes the order of the remotes and influences artifact lookup.

The main problem arises when using the CONAN_UPLOAD repo and one download repo in CONAN_REMOTES. Internally the upload repo will be appended to the CONAN_REMOTES. Then we have the following order: CONAN_REMOTES=[download, upload] which is fine, since artifact retrieval will check the download repo at first. But then the RemotesManager adds the repos in reveres order, i.e. conan gets the list [upload, download]. Hence conan will search for artifacts in the upload repo at first. This yields to some problems in CI/CD.