Clean up not deleting artifacts

When running a clean up to delete old artifacts matching a pattern, the artifacts still aren't deleted.

Having run a diagnostic report, it says “matched … for pattern ‘+:DirA; +:DirB; -DirC’ ” but it then says “artifacts matching pattern ‘-:DirA; -:DirB; +:DirC; +:**’ should be preserved.”

Any ideas?

0
13 comments
Hi Daniel,

Please share screenshots of your cleanup rules, teamcity-server.log, and teamcity-cleanup.log for further investigation.

Files can be uploaded via https://uploads.jetbrains.com/. Please let us know the exact id after the upload.

Best Regards,
Tom
0

Hi Tom,

Requested files uploaded to 2024_09_11_FRwM1mFZuGKvzcrGFe8rU6

Kind regards,

Daniel

0
Hi Daniel,

I couldn't find any information about 'DirA; DirB; DirC' in the teamcity-server.log or teamcity-cleanup.log. Could you please provide more details about your artifacts? Specifically, which project and build are they related to? Snapshots would also be helpful.

Additionally, could you share the diagnostic report (https://www.jetbrains.com/help/teamcity/teamcity-data-clean-up.html#Cleanup+Diagnostics) with us?

 Note that clean-ups do not affect the following build types:

• pinned builds (https://www.jetbrains.com/help/teamcity/build-actions.html#Pin+Build)

• builds used as an artifact of snapshot dependency (https://www.jetbrains.com/help/teamcity/configuring-dependencies.html) in other builds when the "Prevent clean-up (https://www.jetbrains.com/help/teamcity/teamcity-data-clean-up.html#Base+Rule+Behavior+for+Dependency+Builds) " option for dependencies is enabled in the build configuration. Such builds are marked with the  icon in the build history list

• builds of recently removed build configurations (https://www.jetbrains.com/help/teamcity/teamcity-data-clean-up.html#Deleted+Build+Configurations+Clean-up)

Best Regards,
Tom
0

Hi Tom,

Thanks for looking at this. I've uploaded some files to 2024_09_12_cxZ8xTvcvK27xKTjJ1vL5T which hopefully help.

They hopefully show that it's not a pinned build, and the build configuration has not been removed. I don't think the build is used as a snapshot dependency, but I'm not sure where to go to verify this.

I'm sure I'm being blinding stupid and I just hope you can quickly point me in the right direction.

Kind regards,

Daniel

0

Hi Daniel,

After reviewing the diagnostic report and cleanup rules:

The following patterns will be preserved and not cleaned:

- Debug Symbols: All artifacts matching this pattern will be retained.

Artifacts older than 60 days that match the following patterns will be cleaned:

- Other debug-related files, except for Debug Symbols.

- Test Results and Build Logs, if they aren't part of the most recent builds.

Could you please confirm what specific types of artifacts are not being deleted in your case? If possible, please share a screenshot of the build page that contains the relevant artifact information.

What types of artifacts would you like to delete? Please also share the details of the keep rule.

Best Regards,

Tom

0

Hi Tom,

The previous upload today had a screenshot of the build artifacts. 

The artifacts that need deleting from this and similar builds are the in the Debug4 and Release4 folders.

What keep rule?

Kind regards,

Daniel

0
Hi Daniel,

Sorry for the delay response. 

> The previous upload today had a screenshot of the build artifacts.

Could you please share screenshot of the whole build page?

> The artifacts that need deleting from this and similar builds are the in the Debug4 and Release4 folders

However, for the diagnostic report I can't find the related information.

> What keep rule?

For more detailed information about keep rule, please refer to https://www.jetbrains.com/help/teamcity/teamcity-data-clean-up.html#Keep+Rule
0

Hi Tom,

No worries for the delay, I appreciate your help.

I'm not sure what you mean when you say “the whole build page.” Outside of the screenshot area, there is a list of projects of the left, the header bar above, TeamCity footer below and to the right are buttons labelled “Edit Configuration”, “Run” and “Download all”. None of these seem specific to the build.

I'm happy to share further screenshots, but I'm not sure what you want to see.

On the clean-up rules pages, I can only see base rules. I cannot find any keep rules.

Kind regards,

Daniel

0

Hi Daniel, 

> The artifacts that need deleting from this and similar builds are the in the Debug4 and Release4 folders

I would like to check the build history to confirm the build date and verify if there are links to other builds. For more detailed information, please refer to the screenshot.


Additionally, please provide a screenshot of the project and build cleanup rule settings, similar to the example provided.

0

Hi Tom,

Requested screenshots uploaded to 2024_09_19_aQhG1PfYjNr27EtQAoMWJL.

Kind regards,

Daniel

0

Hi Daniel,

Based on the screenshot you shared, the base cleanup rule for "Pamwin 4 Nightly" is as follows. There is also an inherited hidden rule, though its details are unknown:

- Artifacts more than 60 days older than the last build will be cleaned up for the following artifact patterns:
+:Test Results; +:Build Logs; +:Debug*; -:Debug Symbols.
- Other items are kept indefinitely.
 

This means that artifacts like Test Results, Build Logs, and Debug-related files (except Debug Symbols) that are older than 60 days from the last build will be removed.
Debug Symbols and any other unspecified artifacts are retained permanently. This explains why the Release4 folder is not removed for the build configuration "Pamwin2Tests_Pamwin4Nightly."

Additionally, I couldn’t find any cleanup errors in the teamcity-cleanup.log. It appears that the cleanup rule is functioning as expected.



Best Regards,
Tom

0

Hi Tom,

Thank you for highlighting that Release* is not specified. If we change the rule to “+:* -:Debug Symbols” would it remove everything, including the teamcity logs, and leave the Debug Symbols folder?

I'm still unclear why the Test Results, Build Logs and Debug4… folders were not cleaned up though. As the name suggests, the build runs nightly so the build highlighted was much more than 60 days from the last build.

Is it the “hidden inherited rule”? If so, how do I find and either remove or modify this rule?

Kind regards,

Daniel

0
Hi Daniel

> Is it the “hidden inherited rule”? If so, how do I find and either remove or modify this rule?

I'm not sure. You can override or modify the inherited rules by going to your subproject settings -> Clean-up Rules -> Your rules -> Override or Edit.
0

Please sign in to leave a comment.