ssmith
ssmith

Reputation: 8922

TeamCity NDepend 400 Error restoring trend store

I'm using NDepend 6 with TeamCity 10.0.2 and am getting an error during the NDepend build step. Looking at the build log, this appears:

[Step 6/9] Restoring trend store (1s)

[17:59:26][Restoring trend store] Requesting last finished build http://localhost/httpAuth/app/rest/buildTypes/ProjectName/builds?locator=count:1,personal:false,canceled:false,tags:ndepend_metrics
[17:59:27][Restoring trend store] Restoring trend store to C:\TeamCity\buildAgent\work\d91e7b421f32292a\LastTrendMetrics.zip
[17:59:27][Restoring trend store] Downloading artifact http://localhost/httpAuth/app/rest/builds/id:5783/artifacts/content/NDependOut/TrendMetrics.zip to C:\TeamCity\buildAgent\work\d91e7b421f32292a\LastTrendMetrics.zip
[17:59:29]
[Step 6/9] 
Exception.Type {System.Net.WebException}
Exception.Message {The remote server returned an error: (400) Bad Request.}
Exception.StackTrace {
  System.Net.WebClient.DownloadFile(Uri address, String fileName)   L_00ca 
  NDepend.TeamCity.Artifacts.RestoreTrendStore.DownloadTrendStoreZip(Int32 lastFinishedBuildId, String lastTrendMetricsZip)   L_003c 
  NDepend.TeamCity.Artifacts.RestoreTrendStore.DoRestore()   L_006b 
  NDepend.TeamCity.Artifacts.RestoreTrendStore.Restore()   L_0011 
  NDepend.TeamCity.NDependRunner.RestoreArtifacts()   L_001c 
  NDepend.TeamCity.NDependRunner.Run()   L_0006 
  NDepend.TeamCity.Program.MainSub(String[] args)   L_002c 

}

Exception.InnerException = null

Looking at the actual response from the URL:

URL: http://localhost/httpAuth/app/rest/builds/id:5783/artifacts/content/NDependOut/TrendMetrics.zip

RESPONSE:
    Responding with error, status code: 400 (Bad Request).
    Details: jetbrains.buildServer.server.rest.errors.BadRequestException: Cannot provide children list for file ''.
    Invalid request. Please check the request URL and data are correct.

This all worked fine in TeamCity 9; the issues started occurring after moving to a new server and upgrading to TeamCity 10. I don't necessarily care about NDepend's internal trend tracking, so if there's some way to disable this part of the analysis, that would be fine, too.

Upvotes: 1

Views: 65

Answers (1)

ssmith
ssmith

Reputation: 8922

A workaround for the issue is to go to the NDepend build step and uncheck the "Archive trend store" option:

enter image description here

Upvotes: 1

Related Questions