@@ -25,7 +25,10 @@ import {
2525 isCodeQualityEnabled ,
2626 isCodeScanningEnabled ,
2727} from "./config-utils" ;
28- import { cleanupAndUploadDatabases } from "./database-upload" ;
28+ import {
29+ cleanupAndUploadDatabases ,
30+ DatabaseUploadResult ,
31+ } from "./database-upload" ;
2932import {
3033 DependencyCacheUploadStatusReport ,
3134 uploadDependencyCaches ,
@@ -59,15 +62,13 @@ interface AnalysisStatusReport
5962 extends uploadLib . UploadStatusReport ,
6063 QueriesStatusReport { }
6164
62- interface DependencyCachingUploadStatusReport {
63- dependency_caching_upload_results ?: DependencyCacheUploadStatusReport ;
64- }
65-
6665interface FinishStatusReport
6766 extends StatusReportBase ,
6867 DatabaseCreationTimings ,
69- AnalysisStatusReport ,
70- DependencyCachingUploadStatusReport { }
68+ AnalysisStatusReport {
69+ dependency_caching_upload_results ?: DependencyCacheUploadStatusReport ;
70+ database_upload_results : DatabaseUploadResult [ ] ;
71+ }
7172
7273interface FinishWithTrapUploadStatusReport extends FinishStatusReport {
7374 /** Size of TRAP caches that we uploaded, in bytes. */
@@ -86,6 +87,7 @@ async function sendStatusReport(
8687 didUploadTrapCaches : boolean ,
8788 trapCacheCleanup : TrapCacheCleanupStatusReport | undefined ,
8889 dependencyCacheResults : DependencyCacheUploadStatusReport | undefined ,
90+ databaseUploadResults : DatabaseUploadResult [ ] ,
8991 logger : Logger ,
9092) {
9193 const status = getActionsStatus ( error , stats ?. analyze_failure_language ) ;
@@ -106,6 +108,7 @@ async function sendStatusReport(
106108 ...( dbCreationTimings || { } ) ,
107109 ...( trapCacheCleanup || { } ) ,
108110 dependency_caching_upload_results : dependencyCacheResults ,
111+ database_upload_results : databaseUploadResults ,
109112 } ;
110113 if ( config && didUploadTrapCaches ) {
111114 const trapCacheUploadStatusReport : FinishWithTrapUploadStatusReport = {
@@ -223,6 +226,7 @@ async function run() {
223226 let dbCreationTimings : DatabaseCreationTimings | undefined = undefined ;
224227 let didUploadTrapCaches = false ;
225228 let dependencyCacheResults : DependencyCacheUploadStatusReport | undefined ;
229+ let databaseUploadResults : DatabaseUploadResult [ ] = [ ] ;
226230 util . initializeEnvironment ( actionsUtil . getActionVersion ( ) ) ;
227231
228232 // Make inputs accessible in the `post` step, details at
@@ -424,7 +428,7 @@ async function run() {
424428 // Possibly upload the database bundles for remote queries.
425429 // Note: Take care with the ordering of this call since databases may be cleaned up
426430 // at the `overlay` or `clear` level.
427- await cleanupAndUploadDatabases (
431+ databaseUploadResults = await cleanupAndUploadDatabases (
428432 repositoryNwo ,
429433 codeql ,
430434 config ,
@@ -496,6 +500,7 @@ async function run() {
496500 didUploadTrapCaches ,
497501 trapCacheCleanupTelemetry ,
498502 dependencyCacheResults ,
503+ databaseUploadResults ,
499504 logger ,
500505 ) ;
501506 return ;
@@ -518,6 +523,7 @@ async function run() {
518523 didUploadTrapCaches ,
519524 trapCacheCleanupTelemetry ,
520525 dependencyCacheResults ,
526+ databaseUploadResults ,
521527 logger ,
522528 ) ;
523529 } else if ( runStats !== undefined ) {
@@ -531,6 +537,7 @@ async function run() {
531537 didUploadTrapCaches ,
532538 trapCacheCleanupTelemetry ,
533539 dependencyCacheResults ,
540+ databaseUploadResults ,
534541 logger ,
535542 ) ;
536543 } else {
@@ -544,6 +551,7 @@ async function run() {
544551 didUploadTrapCaches ,
545552 trapCacheCleanupTelemetry ,
546553 dependencyCacheResults ,
554+ databaseUploadResults ,
547555 logger ,
548556 ) ;
549557 }
0 commit comments