-
Notifications
You must be signed in to change notification settings - Fork 14
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
Non-empty parent folders being marked for purge #49
Comments
Would you be able to provide a small snippet to reproduce this? |
Hey @sijis! Sure... I've renamed/stripped content I cannot share, but this is the gist: Artifactory repository:Jfrog CLI: [
{
"path": "example-repo/",
"type": "folder",
"created": "2020-05-13T13:39:54.818Z",
"modified": "2020-05-13T13:39:54.818Z"
},
{
"path": "example-repo/example",
"type": "folder",
"created": "2020-05-19T09:30:40.100Z",
"modified": "2020-05-19T09:30:40.100Z"
},
{
"path": "example-repo/example/example.yaml",
"type": "file",
"size": 7096,
"created": "2020-07-30T06:43:26.855Z",
"modified": "2020-07-30T06:43:26.836Z"
}
] Policy in use:def purgelist(artifactory):
"""Purge artifacts older than 7 days"""
purgable = artifactory.time_based_retention(keep_days=7, item_type="any")
return purgable PurgeCommand: Output (snippet):
IssueFrom the INFO logs, it would seem that Lavatory wishes to delete the FYI later today I can also test the actual purge output and provide the logs, in the case actual behaviour differs to what I'm interpreting from the dry run logs... In the meantime any comments on this would be awesome! |
FYI for anyone in a similar position: I reverted Lavatory to only remove files (
Probably not the most elegant of solutions, but did the job. While I don't consider the issue fixed per se, I have no capacity to investigate it further, nor a need with the above workaround. Therefore @sijis feel welcome to close the issue. |
Example scenario:
I have the following structure in artifactory:
<local-repo>/<folderX>/<artifact>
This works fine when filtering the purge to
item_type="file"
. However, if I want to also remove empty folders, Lavatory flags<folderX>
for removal, as nested files/folders do not update themodified
timestamp of the parent folder.How have others resolved this? It seems like less of a Lavatory issue than an issue with Artifactory's indexing of the folders, but I'm hoping someone here may have run into this problem too.
The text was updated successfully, but these errors were encountered: