-
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.
Merge pull request #1826 from benfitzpatrick/1759.reload-fix-del-then…
…-add-task Fix reload-alteration of a reload-removed then reload-added task
- Loading branch information
Showing
5 changed files
with
99 additions
and
0 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
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,31 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
# Copyright (C) 2008-2016 NIWA | ||
# | ||
# 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 that removing, adding, then altering a task in the graph works OK. | ||
. $(dirname $0)/test_header | ||
#------------------------------------------------------------------------------- | ||
set_test_number 2 | ||
#------------------------------------------------------------------------------- | ||
install_suite $TEST_NAME_BASE remove-add-alter-task | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-validate | ||
run_ok $TEST_NAME cylc validate $SUITE_NAME | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-run | ||
suite_run_ok $TEST_NAME cylc run --debug --reference-test $SUITE_NAME | ||
#------------------------------------------------------------------------------- | ||
purge_suite $SUITE_NAME |
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,30 @@ | ||
2016-05-03T09:57:39Z INFO - Suite starting on shire:7772 | ||
2016-05-03T09:57:39Z INFO - Run mode: live | ||
2016-05-03T09:57:39Z INFO - Initial point: 1 | ||
2016-05-03T09:57:39Z INFO - Final point: 1 | ||
2016-05-03T09:57:39Z INFO - Cold Start 1 | ||
2016-05-03T09:57:39Z INFO - [reloader.1] -triggered off [] | ||
2016-05-03T09:57:40Z INFO - [reloader.1] -submit_method_id=13374 | ||
2016-05-03T09:57:40Z INFO - [reloader.1] -submission succeeded | ||
2016-05-03T09:57:40Z INFO - [client-command] reload_suite baggins@shire:cylc-reload 637d8b64-d542-4283-b334-3fd6b64e117c | ||
2016-05-03T09:57:41Z INFO - [reloader.1] -(current:submitted)> started at 2016-05-03T09:57:40Z | ||
2016-05-03T09:57:41Z INFO - Command succeeded: reload_suite() | ||
2016-05-03T09:57:42Z WARNING - Reload will complete once active tasks have finished. | ||
2016-05-03T09:57:51Z INFO - [client-command] reload_suite baggins@shire:cylc-reload 23ccbafd-0fd1-445e-8327-dceef38437dd | ||
2016-05-03T09:57:51Z INFO - Command succeeded: reload_suite() | ||
2016-05-03T09:58:01Z INFO - [client-command] insert_task baggins@shire:cylc-insert 0d229903-9abc-4c28-9b16-2d19e6aaa960 | ||
2016-05-03T09:58:02Z INFO - Command succeeded: insert_task(['remove_add_alter_me.1'],None,None,None) | ||
2016-05-03T09:58:12Z INFO - [client-command] reload_suite baggins@shire:cylc-reload 56ed5ddf-2453-4311-90f3-8bcb85c9e638 | ||
2016-05-03T09:58:13Z INFO - Command succeeded: reload_suite() | ||
2016-05-03T09:58:14Z INFO - RELOADING TASK DEFINITION FOR remove_add_alter_me.1 | ||
2016-05-03T09:58:23Z INFO - [reloader.1] -(current:running)> succeeded at 2016-05-03T09:58:22Z | ||
2016-05-03T09:58:23Z INFO - [reloader.1] -('job-logs-register', 1) will run after P0Y (after 2016-05-03T09:58:23Z) | ||
2016-05-03T09:58:24Z INFO - RELOADING TASK DEFINITION FOR reloader.1 | ||
2016-05-03T09:58:24Z INFO - Reload completed. | ||
2016-05-03T09:58:24Z INFO - [remove_add_alter_me.1] -triggered off ['reloader.1'] | ||
2016-05-03T09:58:25Z INFO - [remove_add_alter_me.1] -submit_method_id=29648 | ||
2016-05-03T09:58:25Z INFO - [remove_add_alter_me.1] -submission succeeded | ||
2016-05-03T09:58:25Z INFO - [remove_add_alter_me.1] -(current:submitted)> started at 2016-05-03T09:58:25Z | ||
2016-05-03T09:58:26Z INFO - [remove_add_alter_me.1] -(current:running)> succeeded at 2016-05-03T09:58:25Z | ||
2016-05-03T09:58:26Z INFO - [remove_add_alter_me.1] -('job-logs-register', 1) will run after P0Y (after 2016-05-03T09:58:26Z) | ||
2016-05-03T09:58:27Z INFO - Suite shutting down at 2016-05-03T09:58:27Z |
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,33 @@ | ||
title = "Test reloading of a task removed then added by a reload." | ||
# Don't run this suite in-place: it modifies itself. | ||
|
||
[cylc] | ||
UTC mode = True | ||
[[reference test]] | ||
required run mode = live | ||
live mode suite timeout = PT60S | ||
|
||
[scheduling] | ||
[[dependencies]] | ||
graph = reloader => remove_add_alter_me | ||
|
||
[runtime] | ||
[[remove_add_alter_me]] | ||
script = false | ||
[[reloader]] | ||
script = """ | ||
sed -i "12s/\(graph = reloader\).*/\1/" $CYLC_SUITE_DEF_PATH/suite.rc | ||
cylc reload $CYLC_SUITE_NAME | ||
sleep 5 | ||
sed -i "12s/\(graph = reloader\)/\1 => remove_add_alter_me/" $CYLC_SUITE_DEF_PATH/suite.rc | ||
cylc reload $CYLC_SUITE_NAME | ||
sleep 5 | ||
cylc insert $CYLC_SUITE_NAME remove_add_alter_me.1 | ||
sleep 5 | ||
cat >>$CYLC_SUITE_DEF_PATH/suite.rc <<'__RUNTIME__' | ||
[[remove_add_alter_me]] | ||
script = true | ||
__RUNTIME__ | ||
cylc reload $CYLC_SUITE_NAME | ||
sleep 5 | ||
""" |