conan: [bug] Auth with Artifactory from revisions to no-revisions
As previously reported in #6082, passing the --no-overwrite
flag when uploading a conan package does not take revisions into account. This means that if “revisions” is enabaled, a new package will be uploaded, invalidating the previous revision. Although nothing is technically overwritten (since we get a new revision), the flag works in a counter intuitive way. I request a feature where there is a Conan way of preventing upoading a new revision if a revision already exists. This could be done in two ways:
- Make the
no-overwrite
flag take revisions into account and document this. - Document that
--no-overwrite
does not have any effect working with revisions and implement a new flag--no-revision
that prevents uploading new revisions.
I think the first alternative would make most sence.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 28 (16 by maintainers)
I have tried the procedure described in the previous comment on a Windows 10 machine and I’m happy to say that it seems to work (no logs to present yet though)! What I think has happened is that we (unknkowingly and independenty) have used an anonymos user that has been accepted by the artifactory server only when we have had revisions turned ON. The 404 answer from the server when revisions is turned OFF is however difficult to understand. I will continue the investigation to make sure that it works from conan on Linux aswell and report back. Hopefully it will work. In the mean time: Many thanks for all the help! The quality feedback from the community is a strong argument when I try to spread the use of conan in our company.
Edit: Works on Linux CentOS 7 aswell.
Sorry for the confusion. Artifactory is running on Linux CentOS 7. Conan clients running on Windows 10, Ubuntu and CentOS. Many thanks for keeping an interest in this!
@lasote Hi and thanks for answering. We work in a highly regulated industri (med-tech) where, when we have 3d party dependencies, we create our own conan recipes and build all packages our selves. We also have abslolutely fixed dependencies. This pushes us into a situation where we have all our recipes in the same repo as the product code. This makes it possible to easily update the whole dependency chain and build in one go. We want to be able to automatically update all our dependencies from the ci pipeline if a dependency buid was succesfull but only if there is not already a revision. We also do not have control over the permissions and the setup of the artifactory server (managed by devops and takes a week to get response). The safest way would be to be able to manage when we upload and not by conan commands. The simplest way to go about would be to have the
--no-overwrite
flag do the intuitive thing.