@@ -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" ;
@@ -604,6 +605,7 @@ export async function runQueries(
604
605
) : Promise < QueriesStatusReport > {
605
606
const statusReport : QueriesStatusReport = { } ;
606
607
const queryFlags = [ memoryFlag , threadsFlag ] ;
608
+ const incrementalMode : string [ ] = [ ] ;
607
609
608
610
if ( cleanupLevel !== "overlay" ) {
609
611
queryFlags . push ( "--expect-discarded-cache" ) ;
@@ -613,10 +615,18 @@ export async function runQueries(
613
615
if ( diffRangePackDir ) {
614
616
queryFlags . push ( `--additional-packs=${ diffRangePackDir } ` ) ;
615
617
queryFlags . push ( "--extension-packs=codeql-action/pr-diff-range" ) ;
618
+ incrementalMode . push ( "diff-informed" ) ;
616
619
}
617
- const sarifRunPropertyFlag = diffRangePackDir
618
- ? "--sarif-run-property=incrementalMode=diff-informed"
619
- : undefined ;
620
+ if (
621
+ config . augmentationProperties . overlayDatabaseMode ===
622
+ OverlayDatabaseMode . Overlay
623
+ ) {
624
+ incrementalMode . push ( "overlay" ) ;
625
+ }
626
+ const sarifRunPropertyFlag =
627
+ incrementalMode . length > 0
628
+ ? `--sarif-run-property=incrementalMode=${ incrementalMode . join ( "," ) } `
629
+ : undefined ;
620
630
621
631
const codeql = await getCodeQL ( config . codeQLCmd ) ;
622
632
0 commit comments