azuredevops icon indicating copy to clipboard operation
azuredevops copied to clipboard

Cannot insert duplicate key row in object 'Build.tbl_Artifact' with unique index 'IX_Build_tbl_Artifact_BuildId_ArtifactNameId'. The duplicate key value is (1, 161, 7313, 192).

Open AtkinsonHD opened this issue 2 years ago • 1 comments

Hi keep getting an issue where we get duplicates in the build.tbl_artififact but I have no idea why.

Dependency Check completed with exit code 0.
Dependency Check reports:
 'C:\\agentA\\_work\\2\\TestResults\\dependency-check\\dependency-check-report.html',
 'C:\\agentA\\_work\\2\\TestResults\\dependency-check\\dependency-check-report.json',
  'C:\\agentA\\_work\\2\\TestResults\\dependency-check\\dependency-check-report.xml' ]
 Dependency Check succeeded with message "Dependency Check succeeded"
Ending Dependency Check...
 ##[section]Async Command Start: Upload Artifact
 Uploading 1 files
File upload succeed.
 'C:\agentA\_work\2\TestResults\dependency-check\dependency-check-report.html' to file container: '#/36563/dependency-check'
 ##[section]Async Command End: Upload Artifact
 ##[error]Cannot insert duplicate key row in object 'Build.tbl_Artifact' with unique index 'IX_Build_tbl_Artifact_BuildId_ArtifactNameId'. The duplicate key value is (1, 161, 7313, 192).
 ##[section]Async Command Start: Upload Artifact
Uploading 1 files
 File upload succeed.
 Upload 'C:\agentA\_work\2\TestResults\dependency-check\dependency-check-report.json' to file container: '#/36563/dependency-check'
 Associated artifact 1627 with build 7313
 ##[section]Async Command End: Upload Artifact
 ##[section]Async Command Start: Upload Artifact
 Uploading 1 files
File upload succeed.
 Upload 'C:\agentA\_work\2\TestResults\dependency-check\dependency-check-report.xml' to file container: '#/36563/dependency-check'
 Associated artifact 1627 with build 7313
 ##[section]Async Command End: Upload Artifact
 ##[section]Finishing: Dependency Check

Spotted my versions has "Report Filename" - Report output filename. Will set the report output name in 'reportsDirectory' to specified filename. Will not work if format is ALL, or multiple formats are supplied to the 'format' parameter. Filename must have an extension or dependency-check will assume it is a path.

Can this be used to alter something? We actually upload our reports directly to sonarcube so we dont actually need them as atifacts, so could this feature be disabled with an override?

AtkinsonHD avatar Mar 03 '22 10:03 AtkinsonHD