Cleanup not cleaning up on artifact dependency

Hi.

I have a build configuration that is not cleaning up properly. It seems to clean up one or two builds on from the configuration, but not from the end but from somewhere in middle

The build is a bit special. It uses allure plugin, which downloads internal artifacts from the previous build. There are no dependencies on the builds, though the build is itself is depending on other

I have checked the cleanup rules and seems like "Do not prevent dependency artifacts cleanup" is active for the project. (and everywhere else as well, but I did not find a way to review effective settings for all projects in single place).

I've also review the cleanup log and found following entries having the project mentioned.

[2018-11-16 08:26:47,152] INFO - jetbrains.buildServer.CLEANUP - Applying policy: clean EVERYTHING more than 10 days older than the last build to 20 build configurations (pack 2 of 8):
[2018-11-16 08:26:47,401] INFO - jetbrains.buildServer.CLEANUP - Applying policy: clean HISTORY_ENTRY more than 10 days older than the last build to 20 build configurations (pack 2 of 5):
[2018-11-16 08:26:47,686] INFO - jetbrains.buildServer.CLEANUP - Applying policy: clean ARTIFACTS more than 7 days older than the last build; artifact patterns: +:**/* to 20 build configurations (pack 4 of 5):
[2018-11-16 08:26:48,850] DEBUG - jetbrains.buildServer.CLEANUP - Cleaning all artifacts in directory: C:\TeamCityArtifacts\[..]\[..]\47365
[2018-11-16 08:26:48,852] DEBUG - jetbrains.buildServer.CLEANUP - Cleaning all artifacts in directory: C:\TeamCityArtifacts\[..]\[..]\54765

The oldest build in history is from 17th August, there are total of 107 builds in history

 

There's also some remarks that dependencies are preventing cleanups:

[2018-11-16 08:26:47,756] INFO - jetbrains.buildServer.CLEANUP - Collected builds for 160 build configurations
[2018-11-16 08:26:47,757] DEBUG - jetbrains.buildServer.CLEANUP - The builds selected to clean for cleanup level (Everything): [...]
[2018-11-16 08:26:47,821] DEBUG - jetbrains.buildServer.CLEANUP - The following builds cannot be cleaned: [...]
[2018-11-16 08:26:47,822] DEBUG - jetbrains.buildServer.CLEANUP - There are links to these builds from other builds snapshot or artifact dependencies
[2018-11-16 08:26:47,822] INFO - jetbrains.buildServer.CLEANUP - Builds to clean for cleanup level (Everything): 6 (760 excluded by dependency builds) builds: [...]
[2018-11-16 08:26:47,822] DEBUG - jetbrains.buildServer.CLEANUP - The builds selected to clean for cleanup level (History): [...]
[2018-11-16 08:26:47,894] DEBUG - jetbrains.buildServer.CLEANUP - The following builds cannot be cleaned: [...]
[2018-11-16 08:26:47,894] DEBUG - jetbrains.buildServer.CLEANUP - There are links to these builds from other builds snapshot or artifact dependencies
[2018-11-16 08:26:47,894] INFO - jetbrains.buildServer.CLEANUP - Builds to clean for cleanup level (History): 6 (760 excluded by dependency builds) builds: [...]
[2018-11-16 08:26:47,894] DEBUG - jetbrains.buildServer.CLEANUP - The builds selected to clean for cleanup level (Artifacts): [...]
[2018-11-16 08:26:47,923] DEBUG - jetbrains.buildServer.CLEANUP - The following builds cannot be cleaned: [61392]
[2018-11-16 08:26:47,923] DEBUG - jetbrains.buildServer.CLEANUP - There are links to these builds from other builds snapshot or artifact dependencies
[2018-11-16 08:26:47,923] INFO - jetbrains.buildServer.CLEANUP - Builds to clean for cleanup level (Artifacts): 666 (1 excluded by dependency builds) builds: [...]
[2018-11-16 08:26:47,937] DEBUG - jetbrains.buildServer.CLEANUP - Cleaning statistics history records that may left from the previous cleanup...
[2018-11-16 08:26:47,942] INFO - jetbrains.buildServer.CLEANUP - Performing cleanup EVERYTHING for 6 builds (split by 1 packs)
[2018-11-16 08:26:47,942] INFO - jetbrains.buildServer.CLEANUP - Processing builds pack #1 (0 left) for cleanup level EVERYTHING, build ids: [47365, 47388, 47703, 54765, 54777, 54915]

[2018-11-16 08:26:50,666] INFO - jetbrains.buildServer.CLEANUP - Performing cleanup ARTIFACTS for 660 builds (split by 4 packs)
[2018-11-16 08:26:50,666] INFO - jetbrains.buildServer.CLEANUP - Processing builds pack #1 (3 left) for cleanup level ARTIFACTS, build ids: [...]
[2018-11-16 08:26:50,780] INFO - jetbrains.buildServer.CLEANUP - Cleaning extensions data...
[2018-11-16 08:26:50,780] INFO - jetbrains.buildServer.CLEANUP - All the 200 builds were already processed during earlier cleanups
[2018-11-16 08:26:50,780] INFO - jetbrains.buildServer.CLEANUP - Processing builds pack #2 (2 left) for cleanup level ARTIFACTS, build ids: [...]
[2018-11-16 08:26:50,938] INFO - jetbrains.buildServer.CLEANUP - Cleaning extensions data...
[2018-11-16 08:26:50,938] INFO - jetbrains.buildServer.CLEANUP - All the 200 builds were already processed during earlier cleanups
[2018-11-16 08:26:50,939] INFO - jetbrains.buildServer.CLEANUP - Processing builds pack #3 (1 left) for cleanup level ARTIFACTS, build ids: [...]
[2018-11-16 08:26:51,069] INFO - jetbrains.buildServer.CLEANUP - Cleaning extensions data...
[2018-11-16 08:26:51,069] INFO - jetbrains.buildServer.CLEANUP - All the 200 builds were already processed during earlier cleanups
[2018-11-16 08:26:51,069] INFO - jetbrains.buildServer.CLEANUP - Processing builds pack #4 (0 left) for cleanup level ARTIFACTS, build ids: [...]
[2018-11-16 08:26:51,167] INFO - jetbrains.buildServer.CLEANUP - Cleaning extensions data...

 

 

Any ideas what to check next?

 

Regards

Gert 

 

 

0
2 comments

Hi Gert,

 

there are several reasons for some builds not to be cleaned up: https://confluence.jetbrains.com/display/TCD18/Clean-Up#Clean-Up-ProjectClean-upRules

 

I'd check whether you have some builds meeting those conditions. Another option would be, if they aren't too many, to clear them manually.

0
Avatar
Permanently deleted user

Well, the log says:

clean EVERYTHING more than 10 days older than the last build

The build has dependency, but as much as I can tell the "prevent cleanup of dependent builds" is allow cleanup everywhere.

What else could be preventing cleanup? I tried manual cleanup but that's a little too much to do one by one, and did not find mutliselect manual cleanup...

0

Please sign in to leave a comment.