Server option to limit total artifact size?

The global options has “Maximum build artifact file size:”, but this seems to set the max size per file, not the max artifact size of all files combined. Is this correct? I've looked at the documentation and it did not provide a clear answer. In any case, the behavior that I see on our server seems to point that it is a single file max. 
Is there a way to limit the total size as server wide setting, not a config setting?
 

0
10 comments
Hi Hans,

Yes, the label says “Maximum build artifact file size”, as referring to one artifact file.
This setting is server-wide and is available on the Administration > Global Settings page. Please refer to the documentation for the details: https://www.jetbrains.com/help/teamcity/2023.11/teamcity-configuration-and-maintenance.html#Build+Settings.

Best regards,
Anton
0

Hi Anton,

That the “Maximum build artifact file size” setting is server wide is something I know, what I was asking is there is a way to limit *total* artifact size system wide (meaning the sum of the size all artifacts in one build).

Thanks,
Hans

0
Dear Hans,

I see. I'm sorry for the misunderstanding. No, there is no such option. I want to create a feature request for it, so could you provide more details on your use case and how you would like TeamCity to behave? And by "total artifacts size system-wide," do you mean the limit of all artifacts produced by all the builds running in TeamCity, or do you want to limit the total artifacts size of one build?

Best regards,
Anton
0

Hi Anton,

I was thinking per build a max amount of artifact disk space usage. I actually was under the impression that it was like this, but that is probably because most of the time we zip all artifacts into one or 2 zip files.
On our server we have the “Maximum build artifact file size” set to 1 GB, but I was a bit surprised when I saw a build of one of our configs that had 2 files of 600 MB, combined being above 1 GB. That let me to ask this question.

To me these kind of options are to ensure some kind of control over disk space usage and stability of the server. The current control is too limiting, or to easy to bypass, I would not be surprised that people without admin control start splitting big files to work around the problem.
Thinking about it some more, maybe some kind of system that can configure a quota per project is a more fair system without imposing size limits. In the end, I'm interested in preventing that one project eats all resources and blocks other projects from doing their job that require less disk space, fair use of resources (server disk space). A quota kind of system can then include disk space of build logs, as I've seen configs that generate +100 MB of logs…

Maybe such kind of feature requisite already exists?

Cheers,
Hans

0
Dear Hans,

I have created a feature request and provided your feedback: https://youtrack.jetbrains.com/issue/TW-87122.

Best regards,
Anton
0
Dear Hans,

I got some feedback with possible workaround. Please see if it helps and provide feedback: 

We have the option to configure a total size of all artifacts quota per build configurations through Build Failure Conditions based on metrics change: https://www.jetbrains.com/help/teamcity/build-failure-conditions.html#Fail+Build+on+Metric+Change.

One of the default TeamCity metrics is "artifacts size," which can be configured to fail builds if the total size of all artifacts exceeds some value. It is set up in Build Configuration > Failure Conditions.

Best regards,
Anton
0

Hi Anton,

I know that option exists, but it does not really help because of the following facts:

  1. Build config setting can be changed by non system admins, this thus depends on the user base to play nice, which defeats the system admin having control over disk space usage/stability of the server.  A setting like “Maximum build artifact file size” can only be changed by a system admin.
  2. It would require changing thousands of configs (in our case). It does not feel correct for me to start editing configs of projects I'm not even involved with.
  3. it would fail the build, but correct me if I'm wrong, it will not necessary stop the artifact from being stored on the server… so this is too late in the cycle.

Cheers,
Hans

0
Dear Hans,

Does the teamcity.subprojects.limit.artifactsSize configuration parameter added to the Root project (as per the feedback from the development in the issue I created) satisfies your requirement?

Best regards,
Anton
0

Hi Anton,

I didn't have the opportunity to try it, but having that options for sure is a step in the good direction.
I plan to enable it at some point, but not while there are a lot of releases happing that could be impacted by changing something like this.

Cheers,
Hans

0
Dear Hans,

Sure, let me know when you have a chance.

Best regards,
Anton
0

Please sign in to leave a comment.