Skip to content

Commit 9c982c5

Browse files
authored
Add type annotation and error log to _filter_scale_in_ids (#3549)
Especially this log message is intended to help user understanding when Parsl is not scaling in as they expected - before this PR, any blocks marked as not-scaled-in were not reported to the user (perhaps on the assumption that it might work next time round?)
1 parent 2981a28 commit 9c982c5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

parsl/executors/status_handling.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,18 @@ def tasks(self) -> Dict[object, Future]:
167167
def provider(self):
168168
return self._provider
169169

170-
def _filter_scale_in_ids(self, to_kill, killed):
170+
def _filter_scale_in_ids(self, to_kill: Sequence[Any], killed: Sequence[bool]) -> Sequence[Any]:
171171
""" Filter out job id's that were not killed
172172
"""
173173
assert len(to_kill) == len(killed)
174+
175+
if False in killed:
176+
killed_job_ids = [jid for jid, k in zip(to_kill, killed) if k]
177+
not_killed_job_ids = [jid for jid, k in zip(to_kill, killed) if not k]
178+
logger.warning("Some jobs were not killed successfully: "
179+
f"killed jobs: {killed_job_ids}, "
180+
f"not-killed jobs: {not_killed_job_ids}")
181+
174182
# Filters first iterable by bool values in second
175183
return list(compress(to_kill, killed))
176184

0 commit comments

Comments
 (0)