aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject git commit: Removing rollback_on_failure from restart options.
Date Thu, 06 Mar 2014 21:39:24 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master d1c1b4eb6 -> b49a2ab42


Removing rollback_on_failure from restart options.

Bugs closed: AURORA-247

Reviewed at https://reviews.apache.org/r/18819/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/b49a2ab4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/b49a2ab4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/b49a2ab4

Branch: refs/heads/master
Commit: b49a2ab420e06a8bd587b01fe432cf1db0cdc3ac
Parents: d1c1b4e
Author: Maxim Khutornenko <maxim@apache.org>
Authored: Thu Mar 6 13:27:10 2014 -0800
Committer: Maxim Khutornenko <maxim@apache.org>
Committed: Thu Mar 6 13:27:10 2014 -0800

----------------------------------------------------------------------
 src/main/python/apache/aurora/client/api/updater_util.py      | 2 +-
 src/main/python/apache/aurora/client/commands/core.py         | 3 +--
 src/test/python/apache/aurora/client/commands/test_restart.py | 6 ++++--
 3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b49a2ab4/src/main/python/apache/aurora/client/api/updater_util.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/updater_util.py b/src/main/python/apache/aurora/client/api/updater_util.py
index bbbd484..aabd1ca 100644
--- a/src/main/python/apache/aurora/client/api/updater_util.py
+++ b/src/main/python/apache/aurora/client/api/updater_util.py
@@ -37,7 +37,7 @@ class UpdaterConfig(object):
                watch_secs,
                max_per_shard_failures,
                max_total_failures,
-               rollback_on_failure):
+               rollback_on_failure=True):
 
     if batch_size <= 0:
       raise ValueError('Batch size should be greater than 0')

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b49a2ab4/src/main/python/apache/aurora/client/commands/core.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/core.py b/src/main/python/apache/aurora/client/commands/core.py
index 7c3c530..ff0f1f8 100644
--- a/src/main/python/apache/aurora/client/commands/core.py
+++ b/src/main/python/apache/aurora/client/commands/core.py
@@ -575,8 +575,7 @@ def restart(args, options):
       options.restart_threshold,
       options.watch_secs,
       options.max_per_shard_failures,
-      options.max_total_failures,
-      options.rollback_on_failure)
+      options.max_total_failures)
   resp = api.restart(job_key, options.shards, updater_config,
       options.health_check_interval_seconds, config=config)
   check_and_log_response(resp)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b49a2ab4/src/test/python/apache/aurora/client/commands/test_restart.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_restart.py b/src/test/python/apache/aurora/client/commands/test_restart.py
index f281b35..1cab2a2 100644
--- a/src/test/python/apache/aurora/client/commands/test_restart.py
+++ b/src/test/python/apache/aurora/client/commands/test_restart.py
@@ -39,13 +39,15 @@ class TestRestartCommand(AuroraClientCommandTest):
   @classmethod
   def setup_mock_options(cls):
     """set up to get a mock options object."""
-    mock_options = Mock()
+    mock_options = Mock(spec=['json', 'bindings', 'open_browser', 'shards', 'cluster',
+                              'health_check_interval_seconds', 'batch_size', 'max_per_shard_failures',
+                              'max_total_failures', 'restart_threshold', 'watch_secs'])
     mock_options.json = False
     mock_options.bindings = {}
     mock_options.open_browser = False
     mock_options.shards = None
     mock_options.cluster = None
-    mock_options.health_check_interval_secs = 3
+    mock_options.health_check_interval_seconds = 3
     mock_options.batch_size = 5
     mock_options.max_per_shard_failures = 0
     mock_options.max_total_failures = 0


Mime
View raw message