aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mchucarr...@apache.org
Subject git commit: Fix bug in deprecation warning for cancel-update.
Date Wed, 13 Aug 2014 19:10:34 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master fefd73068 -> aa5c6ebd6


Fix bug in deprecation warning for cancel-update.

While working on improving the coverage of our end-to-end tests,
I discovered a cut-and-paste error in the implementation of the
warning message for cancel_update.

This is a quick-fix for this problem. Testing for this will be included
in the testing coverage changes that I'm working on.

Bugs closed: aurora-650

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


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

Branch: refs/heads/master
Commit: aa5c6ebd6f631af64d329b477aa0f5caacba6957
Parents: fefd730
Author: Mark Chu-Carroll <mchucarroll@twopensource.com>
Authored: Wed Aug 13 15:05:23 2014 -0400
Committer: Mark Chu-Carroll <mchucarroll@twitter.com>
Committed: Wed Aug 13 15:10:19 2014 -0400

----------------------------------------------------------------------
 .../apache/aurora/client/commands/core.py       | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/aa5c6ebd/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 da9d9a0..1644f84 100644
--- a/src/main/python/apache/aurora/client/commands/core.py
+++ b/src/main/python/apache/aurora/client/commands/core.py
@@ -835,24 +835,8 @@ def restart(args, options):
 def really_cancel_update(args, options):
   api, job_key, config_file = LiveJobDisambiguator.disambiguate_args_or_die(
       args, options, make_client_factory())
-  new_cmd = ["job", "restart"]
-  instance_key = args[0]
-  if options.shards is not None:
-    instance_key += "/" + ",".join(map(str, option.shards))
-  new_cmd.append(instance_key)
-  if config_file is not None:
-    new_cmd.append("--config=%s" % config_file)
-  if options.batch_size != 1:
-    new_cmd.append("--batch-size=%s" % options.batch_size)
-  if options.max_per_shard_failures != 0:
-    new_cmd.append("--max-per-shard-failures=%s" % options.max_per_shard_failures)
-  if options.max_total_failures != 0:
-    new_cmd.append("--max-total-failures=%s" % options.max_total_failures)
-  if options.restart_threshold != 60:
-    new_cmd.append("--restart-threshold=%s" % options.restart)
-  if options.watch_secs != 30:
-    new_cmd.append("--watch-secs=%s" % options.watch_secs)
-  v1_deprecation_warning("update", new_cmd)
+  new_cmd = ["job", "cancel-update", str(job_key)]
+  v1_deprecation_warning("cancel_update", new_cmd)
   config = get_job_config(job_key.to_path(), config_file, options) if config_file else None
   resp = api.cancel_update(job_key, config=config)
   check_and_log_response(resp)


Mime
View raw message