@@ -26,7 +26,10 @@ import {
2626 isCodeScanningEnabled ,
2727} from "./config-utils" ;
2828import { uploadDatabases } from "./database-upload" ;
29- import { uploadDependencyCaches } from "./dependency-caching" ;
29+ import {
30+ DependencyCacheUploadStatusReport ,
31+ uploadDependencyCaches ,
32+ } from "./dependency-caching" ;
3033import { getDiffInformedAnalysisBranches } from "./diff-informed-analysis-utils" ;
3134import { EnvVar } from "./environment" ;
3235import { Feature , Features } from "./feature-flags" ;
@@ -55,10 +58,15 @@ interface AnalysisStatusReport
5558 extends uploadLib . UploadStatusReport ,
5659 QueriesStatusReport { }
5760
61+ interface DependencyCachingUploadStatusReport {
62+ dependency_caching_upload_results ?: string ;
63+ }
64+
5865interface FinishStatusReport
5966 extends StatusReportBase ,
6067 DatabaseCreationTimings ,
61- AnalysisStatusReport { }
68+ AnalysisStatusReport ,
69+ DependencyCachingUploadStatusReport { }
6270
6371interface FinishWithTrapUploadStatusReport extends FinishStatusReport {
6472 /** Size of TRAP caches that we uploaded, in bytes. */
@@ -76,6 +84,7 @@ async function sendStatusReport(
7684 dbCreationTimings : DatabaseCreationTimings | undefined ,
7785 didUploadTrapCaches : boolean ,
7886 trapCacheCleanup : TrapCacheCleanupStatusReport | undefined ,
87+ dependencyCacheResults : DependencyCacheUploadStatusReport | undefined ,
7988 logger : Logger ,
8089) {
8190 const status = getActionsStatus ( error , stats ?. analyze_failure_language ) ;
@@ -95,6 +104,9 @@ async function sendStatusReport(
95104 ...( stats || { } ) ,
96105 ...( dbCreationTimings || { } ) ,
97106 ...( trapCacheCleanup || { } ) ,
107+ dependency_caching_upload_results : JSON . stringify (
108+ dependencyCacheResults ?? { } ,
109+ ) ,
98110 } ;
99111 if ( config && didUploadTrapCaches ) {
100112 const trapCacheUploadStatusReport : FinishWithTrapUploadStatusReport = {
@@ -209,6 +221,7 @@ async function run() {
209221 let trapCacheUploadTime : number | undefined = undefined ;
210222 let dbCreationTimings : DatabaseCreationTimings | undefined = undefined ;
211223 let didUploadTrapCaches = false ;
224+ let dependencyCacheResults : DependencyCacheUploadStatusReport | undefined ;
212225 util . initializeEnvironment ( actionsUtil . getActionVersion ( ) ) ;
213226
214227 // Make inputs accessible in the `post` step, details at
@@ -388,7 +401,11 @@ async function run() {
388401 Feature . JavaMinimizeDependencyJars ,
389402 codeql ,
390403 ) ;
391- await uploadDependencyCaches ( config , logger , minimizeJavaJars ) ;
404+ dependencyCacheResults = await uploadDependencyCaches (
405+ config ,
406+ logger ,
407+ minimizeJavaJars ,
408+ ) ;
392409 }
393410
394411 // We don't upload results in test mode, so don't wait for processing
@@ -431,6 +448,7 @@ async function run() {
431448 dbCreationTimings ,
432449 didUploadTrapCaches ,
433450 trapCacheCleanupTelemetry ,
451+ dependencyCacheResults ,
434452 logger ,
435453 ) ;
436454 return ;
@@ -449,6 +467,7 @@ async function run() {
449467 dbCreationTimings ,
450468 didUploadTrapCaches ,
451469 trapCacheCleanupTelemetry ,
470+ dependencyCacheResults ,
452471 logger ,
453472 ) ;
454473 } else if ( runStats ) {
@@ -461,6 +480,7 @@ async function run() {
461480 dbCreationTimings ,
462481 didUploadTrapCaches ,
463482 trapCacheCleanupTelemetry ,
483+ dependencyCacheResults ,
464484 logger ,
465485 ) ;
466486 } else {
@@ -473,6 +493,7 @@ async function run() {
473493 dbCreationTimings ,
474494 didUploadTrapCaches ,
475495 trapCacheCleanupTelemetry ,
496+ dependencyCacheResults ,
476497 logger ,
477498 ) ;
478499 }
0 commit comments