-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to automatically expire a package? #1784
Comments
Regarding automatic expiration, I think it is a very risky and dangerous feature. I am not opposed to some feature that allows to search (and also remove those found) by date, or something like that. So users willing to clean, can directly clean old packages with the pattern they want. Same for the server. Wiping machines caches is not a big issue, because they are just that: caches. But removing packages from server automatically, being the server the ultimate and "true" location for the binaries, it is something that conan packages should never do. So I think we can have a look to a potential feature that allows searching by date. It still has some challenges, because which packages will you remove? Imagine that you have an old binary for VS12, and a new binary for VS11: will you just remove the VS12 one? Do you require all binaries to be outdated? |
How about adding a optional field to the conanfile, like |
That could make more sense. As it is something really, really explicit, defined by the package creator, and the clean would be also explicit... lets look into it. |
I don't think the field in the conanfile is a good idea either. These kinds of "meta-processes" or maintenance processes should not be mixed with the recipes logic at all. The local cache is, at the end, a cache. Do you really need to keep it and not just remove it sometimes? |
I feel that retention policies like this are beyond the scope of conan (except for local caches) unless we want to be opinionated on that topic. Some companies may feel like keeping a package around until they start running out of disk space. Another company may feel like removing a package after N-many version increments. Another company may base their retention on date, SCM strategy, clearance (for those of us who have worked in classified environments), etc... I've also worked with Artifactory in the past and know that their API can be particularly useful in the use-case stated. I think that once a package is put into the repository (conan server or Artifactory), it's easy enough to have an external process resolve which packages should be retained and which packages can be discarded depending on the firm's individual retention policay. |
Closing this question as outdated/wont' fix. For related follow ups:
|
In our CI and workflow we are using Conan channels just like git branches. Meaning when a developer starts working on a feature branch and pushes that branch to our servers in the CI we release the Conan package under a channel with the same name as the git feature branch. Once the package is stable enough and has passed all tests we release it on a ReleaseCandidate (RC) channel. Then the package might stay on that channel for a few weeks and then it is merged to master. Now the problem is that all of the consumers of the package have the RC package in their local cache and they have to manually clean up their cache.
It would be very nice if a package could also have an expiry date and when the package is expired it is automatically removed from local cache, and even from the server.
We are doing the server part automatically on our server in a cron job but we cannot automate this on the package consumers machines.
The text was updated successfully, but these errors were encountered: