Team City Cleanup does not inherit correctly from root project

Completed

In my Root project I have the cleanup policy:

What to clean up:

Everything is kept forever

This is what I want. In my project which inherits from Root, I have reset the policy to default but it says:

What to clean up:

Artifacts more than 30 days older than last build

So it seems the inheritance doesn't work! My only recourse is to override the inheritance using a custom policy but then I don't get the "never cleanup" option, I have to choose how many days to wait. In an attempt to prevent cleanup, I have set it to:

Artifacts more than 10000 days older than last build

But this is not really ideal!

This seems to be a bug...

6 comments
Comment actions Permalink

I agree, this doesn't seem right. What version of TeamCity are you using and would you be able to share a screenshot of your clean-up rules?

0
Comment actions Permalink

The version is:

2019.1.5 (build 66605)

This is my Root project cleanup rule:

Here is my branches cleanup rule. Although branches inherits from Root, it says "artifacts over 30 days will be deleted". It is in light grey so it should be inherited...

I've a feeling the message in "branches" is incorrect and actually it will inherit from Root. I.e. "everything is kept forever" is what will actually happen.

0
Comment actions Permalink

Thank you for the screenshots, this is most helpful. You are correct that this is not intended behavior, however, I can't seem to reproduce this in 2019.1.5. Can you provide me with some steps to get it to fail?

I am also curious if the "branches" rules are just being incorrectly displayed. It would be interesting to know which rules would actually be honored in this situation. If you clear your browser cache does it still show up like that?

0
Comment actions Permalink

Hi, I can't really give steps to reproduce as I have "inherited" a large Team City configuration which has been developed over several years. I had a look through the build agent archives and it seems artifacts are being deleted. Not sure if it's exactly 30 days or not... But the vast majority have had all artifacts deleted (the folder for each build is still present with Team City hidden artifacts but nothing else...)

Is there a way to completely disable cleanup? We don't want to do any clean up.

0
Comment actions Permalink

In 2019.1.5, you can disable the cleanup feature in Administration -> Clean-Up Settings. Keep in mind, however, we do recommend enabling cleanup to remove obsolete builds and their artifacts, purge unnecessary data from the database and caches to free disk space, remove builds from the UI and reduce the workload on TeamCity.

Here is our documentation on Clean-Up Settings for 2019.1.5 if you would find it helpful: https://www.jetbrains.com/help/teamcity/2019.1/clean-up.html

You may want to consider upgrading to 2019.2, as we have made some nice updates to the flexibility of cleanup settings. Depending on your licensing, the update may be available at no additional charge.

 

0
Comment actions Permalink

My apologies. It turns out there is another project between Root and branches which is setting the clean up policy. So branches actually inherits from this other project. Somehow I didn't notice it!

0

Please sign in to leave a comment.