=> Is there a way for one package to redirect from an old conan user name to a new conan user name for all versions (something like conan alias Hello/*@olduser/* Hello/*@newuser/*)?
To help us debug your issue please explain:
Hi @jokram
No, there is no way to do such a redirect for all versions.
Regarding the promotions using user/channel, there are some ongoing discussions around it. We are considering some ways to be able to default them, or to set them at dependency graph level, but doesn't seem possible so far.
But specially if using Artifactory, it could be that the best flow would be to leave user/channel constant, and promote packages from Artifactory repository to Artifactory repository. Then switching them is as simple as switching remotes. This is considered good practice for other package types in Artifactory. Have you considered this possibility?
Hi @memsharded,
But specially if using Artifactory, it could be that the best flow would be to leave user/channel constant, and promote packages from Artifactory repository to Artifactory repository. Then switching them is as simple as switching remotes. This is considered good practice for other package types in Artifactory.
I assume you mean to let the old Artifactory repository as it is and to set it to read-only and to use the new Artifactory repository (which has the new conan user name) for newer versions (or even to copy all versions in the new one). I was thinking also of this, but when using this for a longer time (years) then the number of Artifactory repositories would be a mixture of old and new repositories (or even several generations), so users might get confused when listing all available repositories finding several matches for a package.
Organizational structures of companies change quite often and the data structures should be able to follow this change (rename, move), because data structures (like Artifactory repositories) also reflect the access rights.
I was thinking of a feature like it is in GitHub where you can rename a repository, but there is an internal URL redirect from the old URL to the new URL so that projects have time to change their remote URLs.
I would say that there are 2 possible "clean" scenarios:
Use a constant username, for all packages, and manage maturity, scope and permissions at the repository level. Do not change package usernames. Consumers define their repositories they want packages from. Everything is explicit. Extremely easy to control permissions, deprecate repositories, etc.
Change the package usernames, change the consumers requires usernames. Everything is again explicit.
The problem with aliasing is that it basically cheats to the consumer. The consumer declares they are using "pkgA/version@devname/channel" and they will be getting "pkgA/version@companyname/channel", after two alias redirects from "devname"=>"teamname"=>"companyname". If there is some repository that contains the old "teamname" package, instead of the new alias "teamname" => "companyname", then that package would be retrieved instead, making it less deterministic. Furthermore, changing usernames might affect in some cases to the binaries IDs, if the consumers of that package defines so.
We are considering some ways to be able to override user/channel at project scale, but still very preliminary. You might want to follow too: https://github.com/conan-io/conan/issues/3988
Actually, I think this would be included in the ongoing discussion in #3988, please check and if true, close this issue, give feedback and follow up in the other one. Thanks!
I'm fine to continue any discussion in #3988.