-
Notifications
You must be signed in to change notification settings - Fork 67
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
Wrongly removes conan metadata files #47
Comments
I found a solution:
This can be achieved like this, considering that you apply the MR proposed in #48 RULES = [
# ------ ALL REPOS --------
CleanupPolicy(
'Delete files older than 60 days',
rules.repo('conan-testing'),
rules.delete_not_used_since(days=60),
# Make sure to keep conan metadata. See also
# https://github.com/devopshq/artifactory-cleanup/issues/47
rules.exclude_filename(['.timestamp', 'index.json']),
),
CleanupPolicy(
'Delete empty folders',
rules.repo('conan-testing'),
rules.delete_empty_folder(),
# Exclude metadata files. I.e., if a folder only contains these files, consider it as
# empty
rules.exclude_filename(['.timestamp', 'index.json']),
),
] |
I like the workaround! Let's add it to FAQ section in readme to help other conan's users after #48 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for your awesome tool!
We would like to use it for cleaning up a conan repository.
When the conan client deploys a package, it uploads:
At the same time, the server side generates some metadata (see also conan-io/conan#8418)
When dowloading a conan package, it only downloads package.tar.gz, but not the additional meta files.
If I now run the
rules.delete_not_used_since(days=60),
rule on packages which were deployed before 60 days, but still regularly downloaded, it will delete the meta files, but keep the conan_package.tgz file. A conan package download does not trigger the download counter on the metadata files.And this will invalidate the whole conan package (as also mentioned here jfrog/artifactory-user-plugins#319).
One solution would be to use
rules.exclude_filename(['.timestamp', 'index.json'])
(also suggested here jfrog/artifactory-user-plugins#399).This would then only delete the package, but not the metadata. And therefore, the metadata is never cleaned up... So also not the perfect solution.
Do you have any suggestions how to handle this?
I guess to solve this we would need dedicated rules just for conan, similar to the docker rules?
There may also other package types affected by this (e.g., npm, pypi, conda, debian, ...), see also jfrog/artifactory-user-plugins#319 (comment)
The text was updated successfully, but these errors were encountered: