Skip to content

Commit

Permalink
Update for changes in pruneDatasets interface (DM-33488)
Browse files Browse the repository at this point in the history
The `pruneDatasets` Butler method dropped `run` argument, removing it
from the client side. Execution butler logic is now handled internally
in the same method, removing this logic from caller.
  • Loading branch information
andy-slac committed Jun 2, 2022
1 parent 7bf4ef3 commit 1c0d2ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion python/lsst/ctrl/mpexec/cmdLineFwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def makeWriteButler(cls, args: SimpleNamespace, taskDefs: Optional[Iterable[Task
if taskDefs is not None:
initDatasetNames = set(PipelineDatasetTypes.initOutputNames(taskDefs))
refs = [ref for ref in refs if ref.datasetType.name not in initDatasetNames]
butler.pruneDatasets(refs, unstore=True, run=replaced, disassociate=False)
butler.pruneDatasets(refs, unstore=True, disassociate=False)
elif args.prune_replaced == "purge":
# Erase entire collection and all datasets, need to remove
# collection from its chain collection first.
Expand Down
11 changes: 1 addition & 10 deletions python/lsst/ctrl/mpexec/singleQuantumExecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,7 @@ def findOutputs(
if self.clobberOutputs:
# only prune
_LOG.info("Removing partial outputs for task %s: %s", taskDef, existingRefs)
# Do not purge registry records if this looks like
# an execution butler. This ensures that the UUID
# of the dataset doesn't change.
if butler._allow_put_of_predefined_dataset:
purge = False
disassociate = False
else:
purge = True
disassociate = True
butler.pruneDatasets(existingRefs, disassociate=disassociate, unstore=True, purge=purge)
butler.pruneDatasets(existingRefs, disassociate=True, unstore=True, purge=True)
return False
else:
raise RuntimeError(
Expand Down

0 comments on commit 1c0d2ff

Please sign in to comment.