@@ -187,6 +187,7 @@ def add(
187187 fail : Sequence [str ] = (),
188188 skip_existing_in_last : bool = False ,
189189 auto_retry_mem : tuple [str , str ] | None = None ,
190+ ingest_graph : bool = True ,
190191 ) -> PipelineCommands :
191192 """Add a new QuantumGraph and its execution to the build.
192193
@@ -217,6 +218,10 @@ def add(
217218 ``fail`` setting that causes the first attempt for one or more
218219 quanta to simulate an out-of-memory failure for the first value
219220 only, effectively testing BPS auto-retry logic.
221+ ingest_graph : `bool`, optional
222+ Whether to ingest the provenance quantum graph (only for QBB right
223+ now). Must be `False` if a side run with ``extend_run=True`` will
224+ be added.
220225
221226 Returns
222227 -------
@@ -252,6 +257,7 @@ def add(
252257 output_run = output_run ,
253258 expect_failure = bool (fail ),
254259 auto_retry_mem = auto_retry_mem ,
260+ ingest_graph = ingest_graph ,
255261 )
256262 self .last_output_run = output_run
257263 return self
@@ -626,6 +632,7 @@ def _add_qbb(
626632 pre_exec_init : bool = True ,
627633 auto_retry_mem : tuple [str , str ] | None = None ,
628634 raise_on_partial_outputs : bool = False ,
635+ ingest_graph : bool = True ,
629636 ) -> File :
630637 """Make an SCons target for direct execution of the quantum graph
631638 with ``pipetask run-qbb`` and `lsst.daf.butler.QuantumBackedButler`.
@@ -648,6 +655,9 @@ def _add_qbb(
648655 raise_on_partial_outputs : `bool`, optional
649656 If `True`, pass ``--raise-on-partial-outputs`` to
650657 ``pipetask run-qbb``.
658+ ingest_graph : `bool`, optional
659+ Whether to ingest the provenance quantum graph. Must be `False` if
660+ a side run will use ``extend_run=True``.
651661
652662 Returns
653663 -------
@@ -718,6 +728,23 @@ def _add_qbb(
718728 "-o" ,
719729 "${TARGETS[2]}" ,
720730 "--mock-storage-classes" ,
731+ * (["--promise-ingest-graph" ] if ingest_graph else [])
732+ ),
733+ python_cmd (
734+ BUTLER_BIN ,
735+ "--long-log" ,
736+ "--log-level" ,
737+ "VERBOSE" ,
738+ "--log-file" ,
739+ f"data/{ log } " ,
740+ "--no-log-tty" ,
741+ "ingest-graph" ,
742+ repo_in_cmd ,
743+ "${TARGETS[2]}" ,
744+ "--batch-size" ,
745+ "50" ,
746+ "-t" ,
747+ "copy" ,
721748 ),
722749 tar_repo_cmd (repo_in_cmd , "${TARGETS[0]}" ),
723750 ]
0 commit comments