@@ -25,6 +25,7 @@ import { EnvVar } from "./environment";
25
25
import { FeatureEnablement , Feature } from "./feature-flags" ;
26
26
import { isScannedLanguage , Language } from "./languages" ;
27
27
import { Logger , withGroupAsync } from "./logging" ;
28
+ import { OverlayDatabaseMode } from "./overlay-database-utils" ;
28
29
import { getRepositoryNwoFromEnv } from "./repository" ;
29
30
import { DatabaseCreationTimings , EventReport } from "./status-report" ;
30
31
import { endTracingForCluster } from "./tracer-config" ;
@@ -576,6 +577,7 @@ export async function runQueries(
576
577
) : Promise < QueriesStatusReport > {
577
578
const statusReport : QueriesStatusReport = { } ;
578
579
const queryFlags = [ memoryFlag , threadsFlag ] ;
580
+ const incrementalMode : string [ ] = [ ] ;
579
581
580
582
if ( cleanupLevel !== "overlay" ) {
581
583
queryFlags . push ( "--expect-discarded-cache" ) ;
@@ -585,10 +587,18 @@ export async function runQueries(
585
587
if ( diffRangePackDir ) {
586
588
queryFlags . push ( `--additional-packs=${ diffRangePackDir } ` ) ;
587
589
queryFlags . push ( "--extension-packs=codeql-action/pr-diff-range" ) ;
590
+ incrementalMode . push ( "diff-informed" ) ;
588
591
}
589
- const sarifRunPropertyFlag = diffRangePackDir
590
- ? "--sarif-run-property=incrementalMode=diff-informed"
591
- : undefined ;
592
+ if (
593
+ config . augmentationProperties . overlayDatabaseMode ===
594
+ OverlayDatabaseMode . Overlay
595
+ ) {
596
+ incrementalMode . push ( "overlay" ) ;
597
+ }
598
+ const sarifRunPropertyFlag =
599
+ incrementalMode . length > 0
600
+ ? `--sarif-run-property=incrementalMode=${ incrementalMode . join ( "," ) } `
601
+ : undefined ;
592
602
593
603
const codeql = await getCodeQL ( config . codeQLCmd ) ;
594
604
0 commit comments