-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt outputs: submitted is implicitly required (#5755)
* This fixes a bug where submit-failed tasks were incorrectly identified as complete. * E.G. `foo:finish => bar`. * A task is incomplete if: * it finished executing without completing all required outputs * or if job submission failed and the :submit output was not optional * See: https://github.com/cylc/cylc-admin/blob/master/docs/proposal-new-output-syntax.md#output-syntax
- Loading branch information
1 parent
23d450a
commit a023aee
Showing
8 changed files
with
196 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixes an issue where submit-failed tasks could be incorrectly considered as completed rather than causing the workflow to stall. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. | ||
# Copyright (C) NIWA & British Crown (Met Office) & Contributors. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
#------------------------------------------------------------------------------- | ||
|
||
# Test the submitted and submit-failed triggers work correctly. | ||
# | ||
# The :submitted output should be considered required unless explicitly stated | ||
# otherwise. | ||
# See: | ||
# * https://github.com/cylc/cylc-flow/pull/5755 | ||
# * https://github.com/cylc/cylc-admin/blob/master/docs/proposal-new-output-syntax.md#output-syntax | ||
|
||
. "$(dirname "$0")/test_header" | ||
set_test_number 5 | ||
|
||
# define a broken platform which will always result in submission failures | ||
create_test_global_config '' ' | ||
[platforms] | ||
[[broken]] | ||
hosts = no-such-host | ||
' | ||
|
||
install_and_validate | ||
reftest_run | ||
|
||
for number in 1 2 3; do | ||
grep_workflow_log_ok \ | ||
"${TEST_NAME_BASE}-a${number}" \ | ||
"${number}/a${number} .* did not complete required outputs: \['submitted'\]" | ||
done | ||
|
||
purge | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[scheduler] | ||
allow implicit tasks = True | ||
[[events]] | ||
# shut down once the workflow has stalled | ||
# abort on stall timeout = True | ||
# stall timeout = PT0S | ||
stall handlers = cylc stop %(workflow)s | ||
expected task failures = 1/a1, 2/a2, 3/a3 | ||
|
||
[scheduling] | ||
initial cycle point = 1 | ||
cycling mode = integer | ||
runahead limit = P10 | ||
[[graph]] | ||
R/1 = """ | ||
# a1 should be incomplete (submission is implicitly required) | ||
a1? => b | ||
""" | ||
R/2 = """ | ||
# a2 should be incomplete (submission is implicitly required) | ||
a2:finished => b | ||
""" | ||
R/3 = """ | ||
# a3 should be incomplete (submission is explicitly required) | ||
a3? => b | ||
a3:submitted => s | ||
""" | ||
R/4 = """ | ||
# a4 should be complete (submission is explicitly optional) | ||
a4? => b | ||
a4:submitted? => s | ||
""" | ||
R/5 = """ | ||
# a5 should be complete (submission is explicitly optional) | ||
a5? => b | ||
a5:submitted? => s | ||
a5:submit-failed? => f # branch should run | ||
""" | ||
R/6 = """ | ||
# a6 should be complete (submission is explicitly optional) | ||
a6? => b | ||
a6:submit-failed? => f # branch should run | ||
""" | ||
R/7 = """ | ||
# a7 should be complete (submission is explicitly optional) | ||
a:submit-failed? => f # branch should run | ||
""" | ||
R/8 = """ | ||
# a8 should be complete (submission is explicitly optional) | ||
a:submitted? => s # branch should run | ||
""" | ||
|
||
[runtime] | ||
[[a1, a2, a3, a4, a5]] | ||
# a task which will always submit-fail | ||
platform = broken |
11 changes: 11 additions & 0 deletions
11
tests/functional/spawn-on-demand/18-submitted/reference.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
7/a -triggered off [] in flow 1 | ||
6/a6 -triggered off [] in flow 1 | ||
8/a -triggered off [] in flow 1 | ||
3/a3 -triggered off [] in flow 1 | ||
2/a2 -triggered off [] in flow 1 | ||
4/a4 -triggered off [] in flow 1 | ||
1/a1 -triggered off [] in flow 1 | ||
5/a5 -triggered off [] in flow 1 | ||
5/f -triggered off ['5/a5'] in flow 1 | ||
8/s -triggered off ['8/a'] in flow 1 | ||
6/b -triggered off ['6/a6'] in flow 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters