Skip to content
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

Unable to Delete Artifacts Federated Repos - lastDownloaded not found #450

Closed
jaoconno opened this issue May 11, 2023 · 1 comment
Closed

Comments

@jaoconno
Copy link

Using Current Version of artifact cleanup plugin. All of our repositories are now Federated, and the cleanup plugin seems to struggle to delete artifacts now. Docker artifact deletion plugin seems to be working.

2023-05-10T18:16:04.403Z [jfrt ] [INFO ] [e10ca89e022bce72] [artifactCleanup:166 ] [tp-nio-8081-exec-192] - Starting artifact cleanup for repositories [p-rpm-unstable-local, p-misc-unstable-local, p-helm-unstable-local], until 14 days ago with pacing interval 2000 ms, dryrun: false, disablePropertiesSupport: true

2023-05-10T18:16:04.404Z [jfrt ] [INFO ] [e10ca89e022bce72] [artifactCleanup:181 ] [tp-nio-8081-exec-192] - Removing all artifacts not downloaded since 2023/04/26 18:16

2023-05-10T18:16:04.466Z [jfrt ] [ERROR] [e10ca89e022bce72] [o.a.s.Searches:-1 ] [tp-nio-8081-exec-192] - Failed getting last downloaded statistic

java.lang.IllegalStateException: Duplicate key COS-pdfhtml-dev-1.0.0-LATEST.tar (attempted merging values LastDownloadedStatisticFileCounter(aqlItem=AqlBaseFullRowImpl{map={itemSize=4771840, itemDepth=6, itemModifiedBy=pipeline_service, itemRepo=pubs-misc-unstable-local, itemPath=bugfix/DVS-2652-client-server-ratio/noos/noarch/COS, itemOriginalSha1=NO_ORIG, itemModified=Thu Feb 23 14:00:58 UTC 2023, itemCreated=Thu Feb 23 14:00:58 UTC 2023, itemOriginalMd5=NO_ORIG, itemSha2=595e931f197bbec3c54965c8073a237058b7ce9c1f28df36ce136805b8eb5f00, itemId=311938264, itemUpdated=Thu Feb 23 14:00:58 UTC 2023, itemName=COS-pdfhtml-dev-1.0.0-LATEST.tar, itemType=file, itemCreatedBy=pipeline_service, itemActualSha1=3a195f6bdaf180a5e942a6b87ee5c17d67913bde, itemActualMd5=53a5e59934b6f3b7ec31381195361365}}, allActiveMembersForItem=1, fileCounter=0) and LastDownloadedStatisticFileCounter(aqlItem=AqlBaseFullRowImpl{map={itemSize=4904960, itemDepth=6, itemModifiedBy=pipeline_service, itemRepo=pubs-misc-unstable-local, itemPath=bugfix/DVS-2892-fixes-to-lnet-router-setup_cos-2.5/noos/noarch/COS, itemOriginalSha1=NO_ORIG, itemModified=Mon Apr 03 20:42:12 UTC 2023, itemCreated=Mon Apr 03 20:42:12 UTC 2023, itemOriginalMd5=NO_ORIG, itemSha2=acfab9466c911abfe0e4028131aad46f97273d07c8babae53529edf2052f0801, itemId=334384414, itemUpdated=Mon Apr 03 20:42:12 UTC 2023, itemName=COS-pdfhtml-dev-1.0.0-LATEST.tar, itemType=file, itemCreatedBy=pipeline_service, itemActualSha1=e834aa6ca167d01d5834d1c43b3a2a9ce2cc8de7, itemActualMd5=04d7efd0201850ef2284d9b86d148c02}}, allActiveMembersForItem=1, fileCounter=0))

at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135)

at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182)

at java.base/java.util.stream.Collectors.lambda$groupingBy$53(Collectors.java:1144)

at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)

at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)

at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)

Also, we are having trouble with the buildInfo cleanup plugin.

Running: arti/artifactory/api/plugins/execute/cleanBuilds?params=days=180;dryRun=false

It throws out that dryRun is true for some reason.

Output: 2023-05-10T18:11:39.280Z [jfrt ] [WARN ] [de5ac0cdd5f59aa9] [buildCleanup:71 ] [tp-nio-8081-exec-182] - DryRun Deleting build:-artifact-team/product_streams/analytics-stream/master#40976 (Tue Oct 11 23:39:58 UTC 2022)

@fluxxBot
Copy link
Contributor

Thank you for reaching out, if you still encounter issues with the cleanup plugin, we recommend moving to our new product feature designed to handle cleanup tasks more effectively. This feature has reached General Availability (GA) and offers enhanced capabilities for maintaining and managing artifacts.
You can find more information and guidance on using this new feature in our Cleanup policies.
We’ll close this for now, but if you have any further questions, feel free to reopen it!
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants