Skip to content

Commit

Permalink
Don't log pre-incremented submit numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Jan 17, 2024
1 parent 1a0739a commit c00dfe9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
8 changes: 7 additions & 1 deletion cylc/flow/task_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,14 @@ def __str__(self) -> str:
Format: "<point>/<name>/<job>{<flows>}:status".
"""
if self.state.status == TASK_STATUS_WAITING:
# Don't print pre-incremented submit number.
subnum= "__"
else:
subnum = f"{self.submit_num:02d}"

return (
f"{self.identity}/{self.submit_num:02d}"
f"{self.identity}/{subnum}"
f"{stringify_flow_nums(self.flow_nums)}:{self.state}"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/flakyfunctional/hold-release/14-hold-kill/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
echo '# killing "sleeper"'
cylc kill "${CYLC_WORKFLOW_ID}//1/sleeper"
cylc__job__poll_grep_workflow_log -E \
'1/sleeper/01:waiting\(held\).* job killed'
'1/sleeper/__:waiting\(held\).* job killed'
sleep 10 # sleep, should still be held after 10 seconds
cylc dump -s -t "${CYLC_WORKFLOW_ID}" >'cylc-dump.out'
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/hold-release/11-retrying/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ t-retry-able => t-analyse
'1/t-retry-able/01:running.* => waiting'
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able/01:waiting.* retrying in PT15S'
'1/t-retry-able/__:waiting.* retrying in PT15S'
cylc hold "${CYLC_WORKFLOW_ID}//1/t-retry-able"
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able/01:waiting.* => waiting\(held\)'
'1/t-retry-able/__:waiting.* => waiting\(held\)'
cylc release "${CYLC_WORKFLOW_ID}//1/t-retry-able"
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able/01:waiting\(held\).* => waiting'
'1/t-retry-able/__:waiting\(held\).* => waiting'
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able/01:waiting.* => waiting\(queued\)'
'1/t-retry-able/__:waiting.* => waiting\(queued\)'
"""
[[t-analyse]]
script = """
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/pause-resume/12-pause-then-retry/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
cylc play "${CYLC_WORKFLOW_ID}"
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able/01:waiting.* => waiting\(queued\)'
'1/t-retry-able/__:waiting.* => waiting\(queued\)'
cylc__job__poll_grep_workflow_log -E \
'1/t-submit-retry-able/01:waiting.* => waiting\(queued\)'
'1/t-submit-retry-able/__:waiting.* => waiting\(queued\)'
"""
[[t-retry-able]]
script = """
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def change_state(_=0):
[
# the task should have entered the preparing state before the
# reload was requested
'[1/foo/00:waiting(queued)] => preparing(queued)',
'[1/foo/__:waiting(queued)] => preparing(queued)',
# the reload should have put the workflow into the paused state
'Pausing the workflow: Reloading workflow',
# reload should have waited for the task to submit
Expand Down

0 comments on commit c00dfe9

Please sign in to comment.