@@ -20,7 +20,10 @@ import { runAutobuild } from "./autobuild";
2020import { getTotalCacheSize , shouldStoreCache } from "./caching-utils" ;
2121import { getCodeQL } from "./codeql" ;
2222import { Config , getConfig } from "./config-utils" ;
23- import { cleanupAndUploadDatabases } from "./database-upload" ;
23+ import {
24+ cleanupAndUploadDatabases ,
25+ DatabaseUploadResult ,
26+ } from "./database-upload" ;
2427import {
2528 DependencyCacheUploadStatusReport ,
2629 uploadDependencyCaches ,
@@ -54,15 +57,13 @@ interface AnalysisStatusReport
5457 extends uploadLib . UploadStatusReport ,
5558 QueriesStatusReport { }
5659
57- interface DependencyCachingUploadStatusReport {
58- dependency_caching_upload_results ?: DependencyCacheUploadStatusReport ;
59- }
60-
6160interface FinishStatusReport
6261 extends StatusReportBase ,
6362 DatabaseCreationTimings ,
64- AnalysisStatusReport ,
65- DependencyCachingUploadStatusReport { }
63+ AnalysisStatusReport {
64+ dependency_caching_upload_results ?: DependencyCacheUploadStatusReport ;
65+ database_upload_results : DatabaseUploadResult [ ] ;
66+ }
6667
6768interface FinishWithTrapUploadStatusReport extends FinishStatusReport {
6869 /** Size of TRAP caches that we uploaded, in bytes. */
@@ -81,6 +82,7 @@ async function sendStatusReport(
8182 didUploadTrapCaches : boolean ,
8283 trapCacheCleanup : TrapCacheCleanupStatusReport | undefined ,
8384 dependencyCacheResults : DependencyCacheUploadStatusReport | undefined ,
85+ databaseUploadResults : DatabaseUploadResult [ ] ,
8486 logger : Logger ,
8587) {
8688 const status = getActionsStatus ( error , stats ?. analyze_failure_language ) ;
@@ -101,6 +103,7 @@ async function sendStatusReport(
101103 ...( dbCreationTimings || { } ) ,
102104 ...( trapCacheCleanup || { } ) ,
103105 dependency_caching_upload_results : dependencyCacheResults ,
106+ database_upload_results : databaseUploadResults ,
104107 } ;
105108 if ( config && didUploadTrapCaches ) {
106109 const trapCacheUploadStatusReport : FinishWithTrapUploadStatusReport = {
@@ -218,6 +221,7 @@ async function run() {
218221 let dbCreationTimings : DatabaseCreationTimings | undefined = undefined ;
219222 let didUploadTrapCaches = false ;
220223 let dependencyCacheResults : DependencyCacheUploadStatusReport | undefined ;
224+ let databaseUploadResults : DatabaseUploadResult [ ] = [ ] ;
221225 util . initializeEnvironment ( actionsUtil . getActionVersion ( ) ) ;
222226
223227 // Make inputs accessible in the `post` step, details at
@@ -389,7 +393,7 @@ async function run() {
389393 // Possibly upload the database bundles for remote queries.
390394 // Note: Take care with the ordering of this call since databases may be cleaned up
391395 // at the `overlay` or `clear` level.
392- await cleanupAndUploadDatabases (
396+ databaseUploadResults = await cleanupAndUploadDatabases (
393397 repositoryNwo ,
394398 codeql ,
395399 config ,
@@ -461,6 +465,7 @@ async function run() {
461465 didUploadTrapCaches ,
462466 trapCacheCleanupTelemetry ,
463467 dependencyCacheResults ,
468+ databaseUploadResults ,
464469 logger ,
465470 ) ;
466471 return ;
@@ -483,6 +488,7 @@ async function run() {
483488 didUploadTrapCaches ,
484489 trapCacheCleanupTelemetry ,
485490 dependencyCacheResults ,
491+ databaseUploadResults ,
486492 logger ,
487493 ) ;
488494 } else if ( runStats !== undefined ) {
@@ -496,6 +502,7 @@ async function run() {
496502 didUploadTrapCaches ,
497503 trapCacheCleanupTelemetry ,
498504 dependencyCacheResults ,
505+ databaseUploadResults ,
499506 logger ,
500507 ) ;
501508 } else {
@@ -509,6 +516,7 @@ async function run() {
509516 didUploadTrapCaches ,
510517 trapCacheCleanupTelemetry ,
511518 dependencyCacheResults ,
519+ databaseUploadResults ,
512520 logger ,
513521 ) ;
514522 }