Skip to content

Commit

Permalink
DM-47906 fix to pass processing_type to different jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyu committed Dec 20, 2024
1 parent 28d841b commit 3d5132e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changes/DM-47906.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed the passing of processing_type to different jobs
11 changes: 10 additions & 1 deletion python/lsst/ctrl/bps/panda/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,16 @@ def _make_doma_work(
cvals = {"curr_cluster": gwjob.label}
_, site = config.search("computeSite", opt={"curvals": cvals, "required": True})
cvals["curr_site"] = site
cvals["curr_pipetask"] = gwjob.label

Check warning on line 253 in python/lsst/ctrl/bps/panda/utils.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/utils.py#L253

Added line #L253 was not covered by tests
_, processing_type = config.search(
"processing_type", opt={"curvals": cvals, "default": PANDA_DEFAULT_PROCESSING_TYPE}
"processingType", opt={"curvals": cvals, "default": PANDA_DEFAULT_PROCESSING_TYPE}
)
if gwjob.label in ["finalJob", "customJob"]:
_, nonpipetask = config.search(gwjob.label)
default_type = "merge"

Check warning on line 259 in python/lsst/ctrl/bps/panda/utils.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/utils.py#L258-L259

Added lines #L258 - L259 were not covered by tests
if gwjob.label == "customJob":
default_type = PANDA_DEFAULT_PROCESSING_TYPE
processing_type = nonpipetask["processingType"] if nonpipetask["processingType"] else default_type

Check warning on line 262 in python/lsst/ctrl/bps/panda/utils.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/utils.py#L261-L262

Added lines #L261 - L262 were not covered by tests
_, task_type = config.search("taskType", opt={"curvals": cvals, "default": PANDA_DEFAULT_TASK_TYPE})
_, prod_source_label = config.search(
"prodSourceLabel", opt={"curvals": cvals, "default": PANDA_DEFAULT_PROD_SOURCE_LABEL}
Expand Down Expand Up @@ -868,6 +875,7 @@ def create_idds_build_workflow(**kwargs):
task_queue = get_task_parameter(config, remote_build, "queue")
task_rss = get_task_parameter(config, remote_build, "requestMemory")
nretries = get_task_parameter(config, remote_build, "numberOfRetries")
processing_type = get_task_parameter(config, remote_build, "processingType")

Check warning on line 878 in python/lsst/ctrl/bps/panda/utils.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/utils.py#L878

Added line #L878 was not covered by tests
_LOG.info("requestMemory: %s", task_rss)
_LOG.info("Site: %s", task_site)
# _LOG.info("executable: %s", executable)
Expand All @@ -883,6 +891,7 @@ def create_idds_build_workflow(**kwargs):
task_queue=task_queue,
encode_command_line=True,
prodSourceLabel="managed",
processing_type=processing_type,
task_log={
"dataset": "PandaJob_#{pandaid}/",
"destination": "local",
Expand Down

0 comments on commit 3d5132e

Please sign in to comment.