Project
TeamCity
Priority
Normal
Type
Feature
State
Fixed
Assignee
Kirill Maximov
Subsystem
Server
Affected versions
No Affected versions
Fix versions
Faradi 7.0 EAP (20184)
Fixed in build
20098  
Fixed in builds
no build yet
  • Created by   Reggie Sidney
    3 years ago (16 Jul 2008 18:52)
  • Updated by   Yegor Yarko
    5 months ago (13 Dec 2011 20:16)
 
TW-5451 Option to fail a build when not all artifacts are published (artifacts validation)
19
Issue is visible to: All Users
  The issue is visible to the selected user group only
An option to mark build as failed if it does not contain artifacts or artifacts size is less then specified.

(please leave the condition you need in your case in the comments)

--- original text:
When there is a problem in publishing an artifact (i.e. No space left on device), the build is flagged as successful. This becomes a problem when other builds are dependent on the artifacts from the last successful build of this problem build component.
Comments (20)
 
History
 
Linked Issues (?)
 
Yegor Yarko
  Yegor Yarko
22 Jul 2008 21:54
3 years ago
Reggie,

Did the no space error occurred on server or on agent in your case?
Related Changes
Type
BugException
State
SubmittedOpen
Assignee
<no user>Kirill Maximov (maxkir)
Fixed In version
<lost change>
Yegor Yarko
  Yegor Yarko
05 Nov 2008 13:37
3 years ago
Error on server while publishing artifacts should result in the build failure, so this issue should concern agent.

We probably need an option with textarea to specify mandatory artifacts. If any of the artifacts is missing, the build should fail with appropriate failure message.
If a wildcard is specified, any file that satisfies the wildcard should satisfy the condition.
Multiple values in the area should be treated as "AND conditions.


Alternative (and more obscure) approach is to introduce some special pattern into the artifacts publishing value to treat some artifacts as mandatory.

Or just have an option "Fail the build if no artifacts are produced".
Alan Griffiths
  Alan Griffiths
17 Sep 2009 12:03
2 years ago
I too have seen this problem - a build marked as successful when it failed to publish artifacts. (Not obvious why not - the corresponding build log is below). Naturally, all the tasks with artifact dependencies then failed.

[21:05:00]: [Publishing artifacts] Paths to publish: [src/eqsval-dist/**/*, teamcity-info.xml]
[21:05:00]: [Publishing artifacts] Publishing artifacts 'src/eqsval-dist/**/*' to root artifacts directory
[21:05:35]: [Publishing artifacts] Failed to publish files: Failed to publish artifacts. Server status: 500 (Internal Server Error)
Szymon B.
  Szymon B.
24 Nov 2009 18:19
2 years ago
Most probably it's caused by exceeding the maximum artifact size. The log should be more verbose about it, we were struggling with this problem for a couple of hours.
Failing the build is the right way to go with this issue.
Tested on 4.5.5
Marina Grechko
  Marina Grechko
17 Dec 2009 16:32
2 years ago
One more related feature request about fail build if there is no artifacts produced: http://www.jetbrains.net/devnet/message/5252766
Marina Grechko
  Marina Grechko
12 Apr 2010 12:50
2 years ago
Reasey Praing
  Reasey Praing
26 Apr 2010 22:02
2 years ago
This happened on our server today. The artifact failed to publish but the build is marked as successful causing other dependencies to start and failed.

[Publishing artifacts] Failed to publish files: Failed to publish artifacts. Server status: 500 (Internal Server Error)

The artifact is 27mb in size and we have unlimited artifact size setting. So it's not the size issue. But anyway, we should have the option to fail the build if artifact publishing fails.
Geoff Davis
  Geoff Davis
02 Jun 2010 09:39
23 months ago
Because wild cards are allowed to define artifacts, the build could be set to fail on:
  • number of artifacts,
  • minimum total artifacts size (already collected for stats).
Yegor Yarko
  Yegor Yarko
06 Nov 2010 15:10
18 months ago
Current workaround to fail a build that did not produce any artifacts is to include the checking loging inside the build script right before the build finish and issue change the build status from within the build.
Marina Grechko
  Marina Grechko
18 Nov 2010 13:28
18 months ago
Alan Griffiths
  Alan Griffiths
18 Nov 2010 13:32
18 months ago
The las couple of comments seem to misunderstand the issue - the problem isn't failing builds where artifacts have not been produced (the build script can, and should, do that). The problem is failing builds where the artifacts have been produced, but publishing them fails.
Yegor Yarko
  Yegor Yarko
26 Nov 2010 19:22
17 months ago
Guys,

Sorry for some mess up with the related issues, this issue actually got commented on two problems.

Let's make this issue address feature to fail build if it did not produce artifacts for some reason.
And TW-12243 will then handle any explicit errors that occurred during uploading artifacts to the server.
Alan Griffiths
  Alan Griffiths
26 Nov 2010 19:31
17 months ago
It seems perverse to take a long standing issue about failing to publish and convert it to one about failing to produce artifacts. And TW-12243 seems to be about a specific cause of failing to publish - would it not be better to mark that as a duplicate?

I've voted for this issue thinking it about publishing - I don't want that to count as a vote about not producing artefacts.
Yegor Yarko
  Yegor Yarko
27 Nov 2010 01:28
17 months ago
Alan,

This issue was marked as a feature and had a comment on the current issue's sense since November 2008.
Since then it got comments (and may be votes) for both the current sense and TW-12243.

If you are not interested in the current sense and care more about TW-12243, please unvote this one and vote TW-12243.
Sorry for the inconvenience, if any.
Alan Griffiths
  Alan Griffiths
29 Nov 2010 13:24
17 months ago
Yegor, I'll repeat TW-12243 seems to be about a specific cause of failing to publish (artefacts too big) I've not encountered that case and don't care to vote for it. As Pavel Sher says in the comments there this item covers the "failure to publish cases better" (at least it used to) and votes have been directed here instead.

I don't know why I got "Server status: 500 (Internal Server Error)" but it had nothing to do with artefact size (or space on server) as that didn't change between earlier or later builds that published successfully.

Could you at least replace the description of TW-12243 with the original text from this one? At least then it would cover the case I have trouble with.
Sharma Kollaparthi
  Sharma Kollaparthi
06 Jan 2011 01:37
16 months ago
Is there a update on this one being taken care about - 'Failing the build when all the artifacts are not published'
Alan Griffiths
  Alan Griffiths
10 Jan 2011 14:36
16 months ago
I've added TW-15084 to describe the problem orignally posted here
Michael Kuzmin
  Michael Kuzmin
24 Feb 2011 15:49
15 months ago
Kirill Maximov
  Kirill Maximov
09 Aug 2011 15:53
9 months ago
Metric-based build failure conditions are now available on the "Build Failure Conditions" step when editing build configuration.
Related Changes
Resolved Date
9 months ago (09 Aug 2011 15:53)
State
In ProgressFixed
Yegor Yarko
  Yegor Yarko
13 Dec 2011 20:16
5 months ago
Currently, it is possible to fail a build if the combined size of build's artifacts is less/greater then specified. This is only partly what was described in this issue.
See also the comment.