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.
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.