cleanup not working as expected

The clean-up is not working as expected. Is there a way to debug it, or otherwise determine why it is not cleaning up as expected?

Our clean-up policy and settings

  1. Clean everything more than 180 days older than the last build
  2. Clean history more than 90 days older than the last build
  3. Clean artifacts more than 5 days older than the last build and older than the 1st successful build
  4. Prevent dependency artifacts cleanup

This is hte default policy. Our build configs do not override the defaults. Clean-up is set to run daily.

Rules 1 and 4 seem to be working fine.

Rule 2: Clean history more than 90 days older than the last build

Most of our build configs show history as far back as June 2011. Taking one build config as an example, the oldest build is from June 23 (as seen in the history). The last successful build was yesterday, October 26, making it 125 days.

There are 153 builds that should have been cleaned up already, but are not. (Builds older than 90 days, that ran between June 23 and August 27.)

The build config has no artifacts and no dependencies whatsoever.

Rule 3: Clean artifacts more than 5 days older than the last build and older than the 1st successful build

We have a build config producing some artifacts. No-one depends on these artifacts, yet we have a long history of them (it was several months - I don't have an exact number since I have deleted them now). The last successful build is from today. Presuming the answer to this question is (A), I would expect the oldest artifact to be from last week.

To reiterate: Is there a way to debug the clean-up, or otherwise determine why it is not cleaning up as expected?

Thanks,

Sam

4 comments
Comment actions Permalink

Sorry for delay with replying.

Those builds which were not cleaned, do they have chain icon when they are shown in the history? If so then there is a build depending on it, and this build is not yet cleaned.
In other words option "Prevent dependency artifacts cleanup" may not work as you expect it to work. It prevents build from being cleaned up if there is another build with dependency on this build (snapshot or artifacts dependency). While depending builds stays it will prevent deletion of the build it depends on.

0
Comment actions Permalink

Hi Pavel,

Rule 2

As I said, this build config has no dependencies, and produces no artifacts. It just runs unit tests. Still, there is a history much longer than 90 days (in fact, the history contains all builds from #1).

Rule 3

No, there is no chain icon. I know what you mean by the chain icon, and I have build configs that display it, but this is not one of them. No-one depends ont these artifacts. (But this build config depends has a snapshot dependency on another build config - if that's somehow relevant.)

Please advise.

Thanks,

Sam

0
Comment actions Permalink

Ok, then I would ask you to run cleanup process and send us teamcity-server.log after that. Also please send us names of build configurations where cleanup does not work. You can send these details to teamcity-feedback@jetbrains.com.

As for Rule 2, it does not matter whether build itself has dependencies on other builds, what is important is that there are other builds with dependencies on this build. But if you say that there is no chain icon for this build, then there is some other reason why it is no cleaned.

0
Comment actions Permalink

I prefer to have this tracked online (rather than sending the attachments via email), so I've entered a youtrack issue.

Please see TW-19050.

0

Please sign in to leave a comment.