Skip to content

Commit

Permalink
Fix log message fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Oct 29, 2020
1 parent 2932982 commit 131ec15
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 32 deletions.
40 changes: 19 additions & 21 deletions cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,19 +921,19 @@ def warn_stop_orphans(self):
orphans.append(itask)
if orphans_kill_failed:
LOG.warning(
"Orphaned task jobs (kill failed):"
+ [
f"\n* {itask.identity} ({itask.state.status})"
"Orphaned task jobs (kill failed):\n"
+ "\n".join(
f"* {itask.identity} ({itask.state.status})"
for itask in orphans_kill_failed
]
)
)
if orphans:
LOG.warning(
"Orphaned task jobs:"
+ [
f"\n* {itask.identity} ({itask.state.status})"
"Orphaned task jobs:\n"
+ "\n".join(
f"* {itask.identity} ({itask.state.status})"
for itask in orphans
]
)
)

for key1, point, name, submit_num in self.task_events_mgr.event_timers:
Expand All @@ -956,11 +956,11 @@ def is_stalled(self):
return False
if unhandled_failed:
LOG.warning(
"Suite stalled with unhandled failed tasks:"
+ [
f"\n* {itask.identity} ({itask.state.status})"
"Suite stalled with unhandled failed tasks:\n"
+ "\n".join(
f"* {itask.identity} ({itask.state.status})"
for itask in unhandled_failed
]
)
)
return True
else:
Expand Down Expand Up @@ -997,15 +997,13 @@ def report_unmet_deps(self):

if prereqs_map:
LOG.warning(
"Some partially satisfied prerequisites left over:"
+ [
f"\n{id_} is waiting on:"
+ [
f"\n * {prereq}"
for prereq in prereqs
]
for id_, prereqs in prereqs_map.items()
]
"Some partially satisfied prerequisites left over:\n"
+ "\n".join(
f"{id_} is waiting on:"
+ "\n".join(
f"\n* {prereq}" for prereq in prereqs
) for id_, prereqs in prereqs_map.items()
)
)

def set_hold_point(self, point):
Expand Down
6 changes: 3 additions & 3 deletions tests/functional/events/26-suite-stalled-dump-prereq.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ grep_ok "Abort on suite stalled is set" "${TEST_NAME_BASE}-run.stderr"

grep_ok "WARNING - Suite stalled with unhandled failed tasks:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - \* bar.20100101T0000Z (failed)" \
grep_ok "\* bar.20100101T0000Z (failed)" \
"${TEST_NAME_BASE}-run.stderr"

grep_ok "WARNING - Some partially satisfied prerequisites left over:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - foo.20100101T0600Z is waiting on:" \
grep_ok "foo.20100101T0600Z is waiting on:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - \* bar.20100101T0000Z succeeded" \
grep_ok "\* bar.20100101T0000Z succeeded" \
"${TEST_NAME_BASE}-run.stderr"

purge_suite "${SUITE_NAME}"
Expand Down
14 changes: 7 additions & 7 deletions tests/functional/events/27-suite-stalled-dump-prereq-fam.t
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ grep_ok "Abort on suite stalled is set" "${TEST_NAME_BASE}-run.stderr"

grep_ok "WARNING - Suite stalled with unhandled failed tasks:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - \* foo.1 (failed)" \
grep_ok "\* foo.1 (failed)" \
"${TEST_NAME_BASE}-run.stderr"

grep_ok "WARNING - Some partially satisfied prerequisites left over:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - f_1.1 is waiting on:" \
grep_ok "f_1.1 is waiting on:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - \* foo.1 succeeded" \
grep_ok "\* foo.1 succeeded" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - f_2.1 is waiting on:" \
grep_ok "f_2.1 is waiting on:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - \* foo.1 succeeded" \
grep_ok "\* foo.1 succeeded" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - f_3.1 is waiting on:" \
grep_ok "f_3.1 is waiting on:" \
"${TEST_NAME_BASE}-run.stderr"
grep_ok "WARNING - \* foo.1 succeeded" \
grep_ok "\* foo.1 succeeded" \
"${TEST_NAME_BASE}-run.stderr"

purge_suite "${SUITE_NAME}"
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/shutdown/09-now2.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ suite_run_ok "${TEST_NAME_BASE}-run" cylc run --no-detach "${SUITE_NAME}"
LOGD="$RUN_DIR/${SUITE_NAME}/log"
grep_ok 'INFO - Suite shutting down - REQUEST(NOW-NOW)' "${LOGD}/suite/log"
grep_ok 'WARNING - Orphaned task jobs' "${LOGD}/suite/log"
grep_ok 'WARNING - \* t1.1 (running)' "${LOGD}/suite/log"
grep_ok '\* t1.1 (running)' "${LOGD}/suite/log"
JLOGD="${LOGD}/job/1/t1/01"
# Check that t1.1 event handler runs
run_fail "${TEST_NAME_BASE}-activity-log-succeeded" \
Expand Down

0 comments on commit 131ec15

Please sign in to comment.