How to get rid of incorrect overtime warnings for TeamCity build?

1k Views Asked by At

I have a TeamCity build configuration which has two build steps with console commands. One of the scripts is expected to run for 15 minutes to build the project.

When I run the build, I see the progress bar with warning icon. Details say:

7m:20s passed of 12s initially estimated 7m:07s overtime

I don't understand, why TeamCity decided that both steps should take just 12 seconds. It's a fresh install of TeamCity, I'm the admin of the TeamCity and I haven't touched any timeout settings.

I searched TeamCity docs and entire Internet for TeamCity overtime settings. I found only settings for failure triggers, but I don't need it, I just need some way to tell TeamCity that it should not make assumptions how long my custom scripts should execute.

How do I get rid of these Overtime warnings?

2

There are 2 best solutions below

0
On BEST ANSWER

The estimate is calculated based on the duration of the latest builds in the history of the build configuration. So there should be several builds in history (at least 10) to calculate the estimate time. More details can be found here.

1
On

It would be very nice if failed and cancelled builds were not used to calculate the estimated duration of a job.

I have a job which has succeeded exactly twice, both times taking ~13 hours (the expected length of time for this job). Whilst getting it to work, there were 4 failed and 2 cancelled builds, each taking anything from <1 second to 15 minutes.

I've also had one legitimate failure (owing to a network outage) which ran for 1 hour and 45 minutes.

For some reason (which I can't fathom), the estimated time for the currently-running build is 23m47s (currently 4 hours 30 minutes into overtime). As this runs once a month, it would appear that it will take ~10 months for the estimated time to work itself out, so long as it never fails.

The heuristic is broken.