aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject git commit: Switching from getTasksStatus to getTasksWithoutConfigs on the client.
Date Mon, 21 Jul 2014 21:19:36 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 5496dbe56 -> 9dd58ecc8


Switching from getTasksStatus to getTasksWithoutConfigs on the client.

Bugs closed: AURORA-553

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


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

Branch: refs/heads/master
Commit: 9dd58ecc86e2ab708e0d862f32087f49592a71d7
Parents: 5496dbe
Author: Maxim Khutornenko <maxim@apache.org>
Authored: Mon Jul 21 14:19:05 2014 -0700
Committer: Maxim Khutornenko <maxim@apache.org>
Committed: Mon Jul 21 14:19:05 2014 -0700

----------------------------------------------------------------------
 .../python/apache/aurora/client/api/__init__.py |  9 ++-
 .../aurora/client/api/instance_watcher.py       |  2 +-
 .../apache/aurora/client/api/job_monitor.py     |  2 +-
 .../apache/aurora/client/api/restarter.py       |  2 +-
 .../aurora/client/api/scheduler_client.py       |  1 +
 src/main/python/apache/aurora/client/api/sla.py |  2 +-
 .../python/apache/aurora/client/cli/jobs.py     |  2 +-
 .../apache/aurora/client/commands/core.py       |  2 +-
 .../aurora/client/api/test_instance_watcher.py  |  4 +-
 .../aurora/client/api/test_job_monitor.py       |  6 +-
 .../apache/aurora/client/api/test_restarter.py  |  4 +-
 .../python/apache/aurora/client/api/test_sla.py |  6 +-
 .../aurora/client/cli/test_api_from_cli.py      | 10 +--
 .../aurora/client/cli/test_command_hooks.py     |  4 +-
 .../apache/aurora/client/cli/test_create.py     |  6 +-
 .../apache/aurora/client/cli/test_kill.py       | 12 ++--
 .../apache/aurora/client/cli/test_plugins.py    |  4 +-
 .../apache/aurora/client/cli/test_restart.py    | 20 +++---
 .../apache/aurora/client/cli/test_status.py     | 21 ++++---
 .../apache/aurora/client/cli/test_update.py     | 38 +++++++-----
 .../python/apache/aurora/client/cli/util.py     |  4 +-
 .../aurora/client/commands/test_create.py       | 16 ++---
 .../apache/aurora/client/commands/test_hooks.py | 10 +--
 .../apache/aurora/client/commands/test_kill.py  | 64 ++++++--------------
 .../aurora/client/commands/test_restart.py      | 12 ++--
 .../aurora/client/commands/test_status.py       | 35 +++++------
 .../aurora/client/commands/test_update.py       | 50 ++++++++-------
 27 files changed, 170 insertions(+), 178 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/main/python/apache/aurora/client/api/__init__.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/__init__.py b/src/main/python/apache/aurora/client/api/__init__.py
index 81c430e..4e5cce0 100644
--- a/src/main/python/apache/aurora/client/api/__init__.py
+++ b/src/main/python/apache/aurora/client/api/__init__.py
@@ -101,7 +101,7 @@ class AuroraClientAPI(object):
     self._assert_valid_job_key(job_key)
 
     log.info("Checking status of %s" % job_key)
-    return self.query(job_key.to_thrift_query())
+    return self.query_no_configs(job_key.to_thrift_query())
 
   @classmethod
   def build_query(cls, role, job, instances=None, statuses=LIVE_STATES, env=None):
@@ -117,6 +117,13 @@ class AuroraClientAPI(object):
     except SchedulerProxy.ThriftInternalError as e:
       raise self.ThriftInternalError(e.args[0])
 
+  def query_no_configs(self, query):
+    """Returns all matching tasks without TaskConfig.executorConfig set."""
+    try:
+      return self._scheduler_proxy.getTasksWithoutConfigs(query)
+    except SchedulerProxy.ThriftInternalError as e:
+      raise self.ThriftInternalError(e.args[0])
+
   def update_job(self, config, health_check_interval_seconds=3, instances=None):
     """Run a job update for a given config, for the specified instances.  If
        instances is left unspecified, update all instances.  Returns whether or not

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/main/python/apache/aurora/client/api/instance_watcher.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/instance_watcher.py b/src/main/python/apache/aurora/client/api/instance_watcher.py
index e09aa9a..d2ad6fd 100644
--- a/src/main/python/apache/aurora/client/api/instance_watcher.py
+++ b/src/main/python/apache/aurora/client/api/instance_watcher.py
@@ -131,7 +131,7 @@ class InstanceWatcher(object):
 
     query.instanceIds = instance_ids
     try:
-      resp = self._scheduler.getTasksStatus(query)
+      resp = self._scheduler.getTasksWithoutConfigs(query)
     except IOError as e:
       log.error('IO Exception during scheduler call: %s' % e)
       return []

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/main/python/apache/aurora/client/api/job_monitor.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/job_monitor.py b/src/main/python/apache/aurora/client/api/job_monitor.py
index d176995..6c26cb9 100644
--- a/src/main/python/apache/aurora/client/api/job_monitor.py
+++ b/src/main/python/apache/aurora/client/api/job_monitor.py
@@ -44,7 +44,7 @@ class JobMonitor(object):
 
   def iter_query(self, query):
     try:
-      res = self._scheduler.getTasksStatus(query)
+      res = self._scheduler.getTasksWithoutConfigs(query)
     except TTransport.TTransportException as e:
       log.error('Failed to query tasks from scheduler: %s' % e)
       return

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/main/python/apache/aurora/client/api/restarter.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/restarter.py b/src/main/python/apache/aurora/client/api/restarter.py
index e843fc3..43599e7 100644
--- a/src/main/python/apache/aurora/client/api/restarter.py
+++ b/src/main/python/apache/aurora/client/api/restarter.py
@@ -45,7 +45,7 @@ class Restarter(object):
     # Verify that this operates on a valid job.
     query = self._job_key.to_thrift_query()
     query.statuses = ACTIVE_STATES
-    status = self._scheduler.getTasksStatus(query)
+    status = self._scheduler.getTasksWithoutConfigs(query)
     if status.responseCode != ResponseCode.OK:
       return status
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/main/python/apache/aurora/client/api/scheduler_client.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/scheduler_client.py b/src/main/python/apache/aurora/client/api/scheduler_client.py
index 10a956c..e911135 100644
--- a/src/main/python/apache/aurora/client/api/scheduler_client.py
+++ b/src/main/python/apache/aurora/client/api/scheduler_client.py
@@ -184,6 +184,7 @@ class SchedulerProxy(object):
   UNAUTHENTICATED_RPCS = frozenset([
     'populateJobConfig',
     'getTasksStatus',
+    'getTasksWithoutConfigs',
     'getJobs',
     'getQuota',
     'getVersion',

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/main/python/apache/aurora/client/api/sla.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/sla.py b/src/main/python/apache/aurora/client/api/sla.py
index 8fc9af3..50befea 100644
--- a/src/main/python/apache/aurora/client/api/sla.py
+++ b/src/main/python/apache/aurora/client/api/sla.py
@@ -322,7 +322,7 @@ class Sla(object):
         hosts=hosts)
 
   def _get_tasks(self, task_query):
-    resp = self._scheduler.getTasksStatus(task_query)
+    resp = self._scheduler.getTasksWithoutConfigs(task_query)
     log_response(resp)
     if resp.responseCode != ResponseCode.OK:
       return []

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/main/python/apache/aurora/client/cli/jobs.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/jobs.py b/src/main/python/apache/aurora/client/cli/jobs.py
index 4fa03a6..3cb39b2 100644
--- a/src/main/python/apache/aurora/client/cli/jobs.py
+++ b/src/main/python/apache/aurora/client/cli/jobs.py
@@ -601,7 +601,7 @@ to preview what changes will take effect.
   def warn_if_dangerous_change(self, context, api, job_spec, config):
     # Get the current job status, so that we can check if there's anything
     # dangerous about this update.
-    resp = api.query(api.build_query(config.role(), config.name(),
+    resp = api.query_no_configs(api.build_query(config.role(), config.name(),
         statuses=ACTIVE_STATES, env=config.environment()))
     if resp.responseCode != ResponseCode.OK:
       # NOTE(mchucarroll): we assume here that updating a cron schedule and updating a

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/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 0939f05..cbda8a9 100644
--- a/src/main/python/apache/aurora/client/commands/core.py
+++ b/src/main/python/apache/aurora/client/commands/core.py
@@ -585,7 +585,7 @@ def update(job_spec, config_file):
   def warn_if_dangerous_change(api, job_spec, config):
     # Get the current job status, so that we can check if there's anything
     # dangerous about this update.
-    resp = api.query(api.build_query(config.role(), config.name(),
+    resp = api.query_no_configs(api.build_query(config.role(), config.name(),
         statuses=ACTIVE_STATES, env=config.environment()))
     if resp.responseCode != ResponseCode.OK:
       die('Could not get job status from server for comparison: %s' % resp.messageDEPRECATED)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/api/test_instance_watcher.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_instance_watcher.py b/src/test/python/apache/aurora/client/api/test_instance_watcher.py
index 723a5b6..93b43e8 100644
--- a/src/test/python/apache/aurora/client/api/test_instance_watcher.py
+++ b/src/test/python/apache/aurora/client/api/test_instance_watcher.py
@@ -92,7 +92,7 @@ class InstanceWatcherTest(unittest.TestCase):
 
     query = self.get_tasks_status_query(instance_ids)
     for x in range(int(num_calls)):
-      self._scheduler.getTasksStatus(query).AndReturn(response)
+      self._scheduler.getTasksWithoutConfigs(query).AndReturn(response)
 
   def expect_io_error_in_get_statuses(self, instance_ids=WATCH_INSTANCES,
       num_calls=EXPECTED_CYCLES):
@@ -103,7 +103,7 @@ class InstanceWatcherTest(unittest.TestCase):
 
     query = self.get_tasks_status_query(instance_ids)
     for x in range(int(num_calls)):
-      self._scheduler.getTasksStatus(query).AndRaise(IOError('oops'))
+      self._scheduler.getTasksWithoutConfigs(query).AndRaise(IOError('oops'))
 
   def mock_health_check(self, task, status, retry):
     self._health_check.health(task).InAnyOrder().AndReturn((status, retry))

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/api/test_job_monitor.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_job_monitor.py b/src/test/python/apache/aurora/client/api/test_job_monitor.py
index 3aa9607..3cc876f 100644
--- a/src/test/python/apache/aurora/client/api/test_job_monitor.py
+++ b/src/test/python/apache/aurora/client/api/test_job_monitor.py
@@ -59,7 +59,7 @@ class JobMonitorTest(unittest.TestCase):
     response_code = ResponseCode.OK if response_code is None else response_code
     resp = Response(responseCode=response_code, messageDEPRECATED='test')
     resp.result = Result(scheduleStatusResult=ScheduleStatusResult(tasks=tasks))
-    self._scheduler.getTasksStatus.return_value = resp
+    self._scheduler.getTasksWithoutConfigs.return_value = resp
 
   def expect_task_status(self, once=False, instances=None):
     query = TaskQuery(
@@ -70,9 +70,9 @@ class JobMonitorTest(unittest.TestCase):
       query.instanceIds = frozenset([int(s) for s in instances])
 
     if once:
-      self._scheduler.getTasksStatus.assert_called_once_with(query)
+      self._scheduler.getTasksWithoutConfigs.assert_called_once_with(query)
     else:
-      self._scheduler.getTasksStatus.assert_called_with(query)
+      self._scheduler.getTasksWithoutConfigs.assert_called_with(query)
 
   def test_wait_until_state(self):
     self.mock_get_tasks([

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/api/test_restarter.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_restarter.py b/src/test/python/apache/aurora/client/api/test_restarter.py
index 97add6f..f1bf545 100644
--- a/src/test/python/apache/aurora/client/api/test_restarter.py
+++ b/src/test/python/apache/aurora/client/api/test_restarter.py
@@ -101,7 +101,7 @@ class TestRestarter(MoxTestBase):
     response.result = Result()
     response.result.scheduleStatusResult = ScheduleStatusResult(tasks=tasks)
 
-    self.mock_scheduler.getTasksStatus(IgnoreArg()).AndReturn(response)
+    self.mock_scheduler.getTasksWithoutConfigs(IgnoreArg()).AndReturn(response)
 
   def test_restart_all_instances(self):
     self.mock_status_active_tasks([0, 1, 3, 4, 5])
@@ -113,7 +113,7 @@ class TestRestarter(MoxTestBase):
 
   def mock_status_no_active_task(self):
     response = Response(responseCode=ResponseCode.INVALID_REQUEST, messageDEPRECATED='test')
-    self.mock_scheduler.getTasksStatus(IgnoreArg()).AndReturn(response)
+    self.mock_scheduler.getTasksWithoutConfigs(IgnoreArg()).AndReturn(response)
 
   def test_restart_no_instance_active(self):
     self.mock_status_no_active_task()

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/api/test_sla.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_sla.py b/src/test/python/apache/aurora/client/api/test_sla.py
index abeed6a..1117f24 100644
--- a/src/test/python/apache/aurora/client/api/test_sla.py
+++ b/src/test/python/apache/aurora/client/api/test_sla.py
@@ -58,7 +58,7 @@ class SlaTest(unittest.TestCase):
     response_code = ResponseCode.OK if response_code is None else response_code
     resp = Response(responseCode=response_code, messageDEPRECATED='test')
     resp.result = Result(scheduleStatusResult=ScheduleStatusResult(tasks=tasks))
-    self._scheduler.getTasksStatus.return_value = resp
+    self._scheduler.getTasksWithoutConfigs.return_value = resp
 
   def create_task(self, duration, id, host=None, name=None, prod=None):
     return ScheduledTask(
@@ -162,7 +162,7 @@ class SlaTest(unittest.TestCase):
     )
 
   def expect_task_status_call_job_scoped(self):
-    self._scheduler.getTasksStatus.assert_called_once_with(
+    self._scheduler.getTasksWithoutConfigs.assert_called_once_with(
         TaskQuery(
             owner=Identity(role=self._role),
             environment=self._env,
@@ -171,7 +171,7 @@ class SlaTest(unittest.TestCase):
     )
 
   def expect_task_status_call_cluster_scoped(self):
-    self._scheduler.getTasksStatus.assert_called_with(TaskQuery(statuses=LIVE_STATES))
+    self._scheduler.getTasksWithoutConfigs.assert_called_with(TaskQuery(statuses=LIVE_STATES))
 
   @contextmanager
   def group_by_rack(self):

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_api_from_cli.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_api_from_cli.py b/src/test/python/apache/aurora/client/cli/test_api_from_cli.py
index bf72383..78f21d2 100644
--- a/src/test/python/apache/aurora/client/cli/test_api_from_cli.py
+++ b/src/test/python/apache/aurora/client/cli/test_api_from_cli.py
@@ -113,7 +113,7 @@ class TestApiFromCLI(AuroraClientCommandTest):
 
   def test_successful_status_deep(self):
     """Test the status command more deeply: in a request with a fully specified
-    job, it should end up doing a query using getTasksStatus."""
+    job, it should end up doing a query using getTasksWithoutConfigs."""
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
     mock_scheduler_proxy.query.return_value = self.create_status_response()
     with contextlib.nested(
@@ -121,14 +121,14 @@ class TestApiFromCLI(AuroraClientCommandTest):
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
       cmd = AuroraCommandLine()
       cmd.execute(['job', 'status', 'west/bozo/test/hello'])
-      mock_scheduler_proxy.getTasksStatus.assert_called_with(TaskQuery(jobName='hello',
+      mock_scheduler_proxy.getTasksWithoutConfigs.assert_called_with(TaskQuery(jobName='hello',
           environment='test', owner=Identity(role='bozo')))
 
   def test_status_api_failure(self):
     # Following should use spec=SchedulerClient, but due to introspection for the RPC calls,
     # the necessary methods aren't in that spec.
     mock_scheduler_client = Mock()
-    mock_scheduler_client.getTasksStatus.side_effect = IOError("Uh-Oh")
+    mock_scheduler_client.getTasksWithoutConfigs.side_effect = IOError("Uh-Oh")
     with contextlib.nested(
         patch('apache.aurora.client.api.scheduler_client.SchedulerClient.get',
             return_value=mock_scheduler_client),
@@ -136,8 +136,8 @@ class TestApiFromCLI(AuroraClientCommandTest):
 
       cmd = AuroraCommandLine()
       # This should create a scheduler client, set everything up, and then issue a
-      # getTasksStatus call against the mock_scheduler_client. That should raise an
+      # getTasksWithoutConfigs call against the mock_scheduler_client. That should raise an
       # exception, which results in the command failing with an error code.
       result = cmd.execute(['job', 'status', 'west/bozo/test/hello'])
       assert result == EXIT_API_ERROR
-      mock_scheduler_client.getTasksStatus.assert_call_count == 1
+      mock_scheduler_client.getTasksWithoutConfigs.assert_call_count == 1

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_command_hooks.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_command_hooks.py b/src/test/python/apache/aurora/client/cli/test_command_hooks.py
index 65bce5f..aa99939 100644
--- a/src/test/python/apache/aurora/client/cli/test_command_hooks.py
+++ b/src/test/python/apache/aurora/client/cli/test_command_hooks.py
@@ -143,8 +143,8 @@ class TestClientCreateCommand(AuroraClientCommandTest):
 
   @classmethod
   def assert_scheduler_called(cls, mock_api, mock_query, num_queries):
-    assert mock_api.scheduler_proxy.getTasksStatus.call_count == num_queries
-    mock_api.scheduler_proxy.getTasksStatus.assert_called_with(mock_query)
+    assert mock_api.scheduler_proxy.getTasksWithoutConfigs.call_count == num_queries
+    mock_api.scheduler_proxy.getTasksWithoutConfigs.assert_called_with(mock_query)
 
   def test_create_job_with_successful_hook(self):
     GlobalCommandHookRegistry.reset()

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_create.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_create.py b/src/test/python/apache/aurora/client/cli/test_create.py
index cda95ce..af548ae 100644
--- a/src/test/python/apache/aurora/client/cli/test_create.py
+++ b/src/test/python/apache/aurora/client/cli/test_create.py
@@ -83,8 +83,8 @@ class TestClientCreateCommand(AuroraClientCommandTest):
 
   @classmethod
   def assert_scheduler_called(cls, mock_api, mock_query, num_queries):
-    assert mock_api.scheduler_proxy.getTasksStatus.call_count == num_queries
-    mock_api.scheduler_proxy.getTasksStatus.assert_called_with(mock_query)
+    assert mock_api.scheduler_proxy.getTasksWithoutConfigs.call_count == num_queries
+    mock_api.scheduler_proxy.getTasksWithoutConfigs.assert_called_with(mock_query)
 
   def test_simple_successful_create_job(self):
     """Run a test of the "create" command against a mocked-out API:
@@ -185,7 +185,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
       # Check that create_job was not called.
       api = mock_context.get_api('west')
       assert api.create_job.call_count == 0
-      assert api.scheduler_proxy.getTasksStatus.call_count == 0
+      assert api.scheduler_proxy.test_simple_successful_create_job.call_count == 0
 
   def test_interrupt(self):
     mock_context = FakeAuroraCommandContext()

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_kill.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_kill.py b/src/test/python/apache/aurora/client/cli/test_kill.py
index e9e1679..48badec 100644
--- a/src/test/python/apache/aurora/client/cli/test_kill.py
+++ b/src/test/python/apache/aurora/client/cli/test_kill.py
@@ -49,8 +49,8 @@ class TestClientKillCommand(AuroraClientCommandTest):
 
   @classmethod
   def assert_scheduler_called(cls, mock_api, mock_query, num_queries):
-    assert mock_api.scheduler_proxy.getTasksStatus.call_count == num_queries
-    mock_api.scheduler_proxy.getTasksStatus.assert_called_with(mock_query)
+    assert mock_api.scheduler_proxy.getTasksWithoutConfigs.call_count == num_queries
+    mock_api.scheduler_proxy.getTasksWithoutConfigs.assert_called_with(mock_query)
 
   @classmethod
   def get_expected_task_query(cls, instances=None):
@@ -68,7 +68,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
 
       api = mock_context.get_api('west')
-      mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_call_result()
+      mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_call_result()
       api.kill_job.return_value = self.get_kill_job_response()
       mock_scheduler_proxy.killTasks.return_value = self.get_kill_job_response()
       mock_context.add_expected_status_query_result(self.create_status_call_result(
@@ -95,7 +95,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
 
       api = mock_context.get_api('west')
-      mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_call_result()
+      mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_call_result()
       api.kill_job.return_value = self.get_kill_job_response()
       mock_scheduler_proxy.killTasks.return_value = self.get_kill_job_response()
       for _ in range(8):
@@ -287,7 +287,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
 
       # Now check that the right API calls got made. We should have aborted after the second batch.
       assert api.kill_job.call_count == 2
-      assert api.scheduler_proxy.getTasksStatus.call_count == 0
+      assert api.scheduler_proxy.getTasksWithoutConfigs.call_count == 0
 
   def test_kill_job_with_empty_instances_batched(self):
     """Test kill client-side API logic."""
@@ -297,7 +297,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
         patch('apache.aurora.client.cli.jobs.Job.create_context', return_value=mock_context),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
       api = mock_context.get_api('west')
-      # set up an empty instance list in the getTasksStatus response
+      # set up an empty instance list in the getTasksWithoutConfigs response
       status_response = self.create_simple_success_response()
       schedule_status = Mock(spec=ScheduleStatusResult)
       status_response.result.scheduleStatusResult = schedule_status

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_plugins.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_plugins.py b/src/test/python/apache/aurora/client/cli/test_plugins.py
index 3af6291..7a0a318 100644
--- a/src/test/python/apache/aurora/client/cli/test_plugins.py
+++ b/src/test/python/apache/aurora/client/cli/test_plugins.py
@@ -107,8 +107,8 @@ class TestPlugins(AuroraClientCommandTest):
 
   @classmethod
   def assert_scheduler_called(cls, mock_api, mock_query, num_queries):
-    assert mock_api.scheduler_proxy.getTasksStatus.call_count == num_queries
-    mock_api.scheduler_proxy.getTasksStatus.assert_called_with(mock_query)
+    assert mock_api.scheduler_proxy.getTasksWithoutConfigs.call_count == num_queries
+    mock_api.scheduler_proxy.getTasksWithoutConfigs.assert_called_with(mock_query)
 
   def test_plugin_runs_in_create_job(self):
     """Run a test of the "create" command against a mocked-out API:

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_restart.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_restart.py b/src/test/python/apache/aurora/client/cli/test_restart.py
index 407eb41..e85951a 100644
--- a/src/test/python/apache/aurora/client/cli/test_restart.py
+++ b/src/test/python/apache/aurora/client/cli/test_restart.py
@@ -72,7 +72,7 @@ class TestRestartCommand(AuroraClientCommandTest):
         # Like the update test, the exact number of calls here doesn't matter.
         # what matters is that it must have been called once before batching, plus
         # at least once per batch, and there are 4 batches.
-        assert mock_scheduler_proxy.getTasksStatus.call_count >= 4
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count >= 4
         # called once per batch
         assert mock_scheduler_proxy.restartShards.call_count == 4
         # parameters for all calls are generated by the same code, so we just check one
@@ -100,14 +100,14 @@ class TestRestartCommand(AuroraClientCommandTest):
         result = cmd.execute(['job', 'restart', '--batch-size=5', '--max-total-failures=-1',
             'west/bozo/test/hello', fp.name])
         assert result == EXIT_INVALID_PARAMETER
-        assert mock_scheduler_proxy.getTasksStatus.call_count == 0
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 0
         assert mock_scheduler_proxy.restartShards.call_count == 0
 
   def test_restart_failed_status(self):
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
     mock_health_check = self.setup_health_checks(mock_api)
     self.setup_mock_scheduler_for_simple_restart(mock_api)
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_error_response()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_error_response()
     with contextlib.nested(
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
@@ -120,7 +120,7 @@ class TestRestartCommand(AuroraClientCommandTest):
         fp.flush()
         cmd = AuroraCommandLine()
         result = cmd.execute(['job', 'restart', '--batch-size=5', 'west/bozo/test/hello', fp.name])
-        assert mock_scheduler_proxy.getTasksStatus.call_count == 1
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 1
         assert mock_scheduler_proxy.restartShards.call_count == 0
         assert result == EXIT_API_ERROR
 
@@ -128,8 +128,8 @@ class TestRestartCommand(AuroraClientCommandTest):
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
     mock_health_check = self.setup_health_checks(mock_api)
     self.setup_mock_scheduler_for_simple_restart(mock_api)
-    # Make getTasksStatus return an error, which is what happens when a job is not found.
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_error_response()
+    # Make getTasksWithoutConfigs return an error, which is what happens when a job is not found.
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_error_response()
     with contextlib.nested(
         patch('apache.aurora.client.cli.print_aurora_log'),
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
@@ -144,15 +144,15 @@ class TestRestartCommand(AuroraClientCommandTest):
         cmd = AuroraCommandLine()
         result = cmd.execute(['job', 'restart', '--batch-size=5', 'west/bozo/test/hello/1-3',
             fp.name])
-        # We need to check tat getTasksStatus was called, but that restartShards wasn't.
+        # We need to check tat getTasksWithoutConfigs was called, but that restartShards wasn't.
         # In older versions of the client, if shards were specified, but the job didn't
         # exist, the error wouldn't be detected unti0 restartShards was called, which generated
         # the wrong error message.
-        assert mock_scheduler_proxy.getTasksStatus.call_count == 1
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 1
         assert mock_scheduler_proxy.restartShards.call_count == 0
         assert result == EXIT_API_ERROR
         # Error message should be written to log, and it should be what was returned
-        # by the getTasksStatus call.
+        # by the getTasksWithoutConfigs call.
         mock_log.assert_called_with(20, 'Error executing command: %s', 'Damn')
 
   def test_restart_failed_restart(self):
@@ -174,7 +174,7 @@ class TestRestartCommand(AuroraClientCommandTest):
         fp.flush()
         cmd = AuroraCommandLine()
         result = cmd.execute(['job', 'restart', '--batch-size=5', 'west/bozo/test/hello', fp.name])
-        assert mock_scheduler_proxy.getTasksStatus.call_count == 1
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 1
         assert mock_scheduler_proxy.restartShards.call_count == 1
         mock_scheduler_proxy.restartShards.assert_called_with(JobKey(environment=self.TEST_ENV,
             role=self.TEST_ROLE, name=self.TEST_JOB), [0, 1, 2, 3, 4], None)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_status.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_status.py b/src/test/python/apache/aurora/client/cli/test_status.py
index bdad310..311fac0 100644
--- a/src/test/python/apache/aurora/client/cli/test_status.py
+++ b/src/test/python/apache/aurora/client/cli/test_status.py
@@ -97,7 +97,7 @@ class TestJobStatus(AuroraClientCommandTest):
     return resp
 
   @classmethod
-  def create_status_response_null_metadata(cls):
+  def create_status_null_metadata(cls):
     resp = cls.create_simple_success_response()
     resp.result.scheduleStatusResult = Mock(spec=ScheduleStatusResult)
     resp.result.scheduleStatusResult.tasks = set(cls.create_mock_scheduled_task_no_metadata())
@@ -124,7 +124,7 @@ class TestJobStatus(AuroraClientCommandTest):
 
     mock_context = FakeAuroraCommandContext()
     mock_api = mock_context.get_api('west')
-    mock_api.check_status.return_value = self.create_status_response_null_metadata()
+    mock_api.check_status.return_value = self.create_status_null_metadata()
     with contextlib.nested(
         patch('apache.aurora.client.cli.jobs.Job.create_context', return_value=mock_context)):
       cmd = AuroraCommandLine()
@@ -133,33 +133,33 @@ class TestJobStatus(AuroraClientCommandTest):
 
   def test_successful_status_deep(self):
     """Test the status command more deeply: in a request with a fully specified
-    job, it should end up doing a query using getTasksStatus."""
+    job, it should end up doing a query using getTasksWithoutConfigs."""
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
     mock_scheduler_proxy.query.return_value = self.create_status_response()
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_response_null_metadata()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_null_metadata()
     with contextlib.nested(
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
       cmd = AuroraCommandLine()
       cmd.execute(['job', 'status', 'west/bozo/test/hello'])
-      mock_scheduler_proxy.getTasksStatus.assert_called_with(TaskQuery(jobName='hello',
+      mock_scheduler_proxy.getTasksWithoutConfigs.assert_called_with(TaskQuery(jobName='hello',
           environment='test', owner=Identity(role='bozo')))
 
   def test_successful_status_deep_null_metadata(self):
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
-    mock_scheduler_proxy.query.return_value = self.create_status_response_null_metadata()
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_response_null_metadata()
+    mock_scheduler_proxy.query.return_value = self.create_status_null_metadata()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_null_metadata()
     with contextlib.nested(
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
       cmd = AuroraCommandLine()
       cmd.execute(['job', 'status', 'west/bozo/test/hello'])
-      mock_scheduler_proxy.getTasksStatus.assert_called_with(TaskQuery(jobName='hello',
+      mock_scheduler_proxy.getTasksWithoutConfigs.assert_called_with(TaskQuery(jobName='hello',
           environment='test', owner=Identity(role='bozo')))
 
   def test_status_wildcard(self):
     """Test status using a wildcard. It should first call api.get_jobs, and then do a
-    getTasksStatus on each job."""
+    getTasksWithoutConfigs on each job."""
     mock_context = FakeAuroraCommandContext()
     mock_api = mock_context.get_api('west')
     mock_api.check_status.return_value = self.create_status_response()
@@ -186,7 +186,8 @@ class TestJobStatus(AuroraClientCommandTest):
 
   def test_status_wildcard_two(self):
     """Test status using a wildcard. It should first call api.get_jobs, and then do a
-    getTasksStatus on each job. This time, use a pattern that doesn't match all of the jobs."""
+    getTasksWithoutConfigs on each job. This time, use a pattern that doesn't match
+    all of the jobs."""
     mock_context = FakeAuroraCommandContext()
     mock_api = mock_context.get_api('west')
     mock_api.check_status.return_value = self.create_status_response()

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/test_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_update.py b/src/test/python/apache/aurora/client/cli/test_update.py
index 44a180e..c6440e4 100644
--- a/src/test/python/apache/aurora/client/cli/test_update.py
+++ b/src/test/python/apache/aurora/client/cli/test_update.py
@@ -157,6 +157,7 @@ class TestUpdateCommand(AuroraClientCommandTest):
   def setup_get_tasks_status_calls(cls, scheduler):
     status_response = cls.create_simple_success_response()
     scheduler.getTasksStatus.return_value = status_response
+    scheduler.getTasksWithoutConfigs.return_value = status_response
     schedule_status = Mock(spec=ScheduleStatusResult)
     status_response.result.scheduleStatusResult = schedule_status
     task_config = TaskConfig(numCpus=1.0, ramMb=10, diskMb=1)
@@ -253,18 +254,27 @@ class TestUpdateCommand(AuroraClientCommandTest):
 
   @classmethod
   def assert_correct_status_calls(cls, api):
-    # getTasksStatus gets called a lot of times. The exact number isn't fixed; it loops
+    # getTasksWithoutConfigs gets called a lot of times. The exact number isn't fixed; it loops
     # over the health checks until all of them pass for a configured period of time.
-    # The minumum number of calls is 5: once before the tasks are restarted, and then
-    # once for each batch of restarts (Since the batch size is set to 5, and the
-    # total number of jobs is 20, that's 4 batches.)
-    assert api.getTasksStatus.call_count >= 5
-    # In the first getStatus call, it uses an expansive query; in the rest, it only queries for
-    # status RUNNING.
-    status_calls = api.getTasksStatus.call_args_list
-    assert status_calls[0][0][0] == TaskQuery(taskIds=None, jobName='hello', environment='test',
-        owner=Identity(role=u'bozo', user=None),
-        statuses=ACTIVE_STATES)
-    for status_call in status_calls[1:]:
-      status_call[0][0] == TaskQuery(taskIds=None, jobName='hello', environment='test',
-          owner=Identity(role='bozo', user=None), statuses=set([ScheduleStatus.RUNNING]))
+    # The minumum number of calls is 4: once for each batch of restarts (Since the batch size
+    # is set to 5, and the total number of jobs is 20, that's 4 batches.)
+    assert api.getTasksWithoutConfigs.call_count >= 4
+
+    status_calls = api.getTasksWithoutConfigs.call_args_list
+    for status_call in status_calls:
+      status_call[0][0] == TaskQuery(
+        taskIds=None,
+        jobName='hello',
+        environment='test',
+        owner=Identity(role='bozo', user=None),
+        statuses=set([ScheduleStatus.RUNNING]))
+
+    # getTasksStatus is called only once to build an generate update instructions
+    assert api.getTasksStatus.call_count == 1
+
+    api.getTasksStatus.assert_called_once_with(TaskQuery(
+      taskIds=None,
+      jobName='hello',
+      environment='test',
+      owner=Identity(role=u'bozo', user=None),
+      statuses=ACTIVE_STATES))

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/cli/util.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/util.py b/src/test/python/apache/aurora/client/cli/util.py
index 65e679f..fb849f0 100644
--- a/src/test/python/apache/aurora/client/cli/util.py
+++ b/src/test/python/apache/aurora/client/cli/util.py
@@ -88,7 +88,7 @@ class FakeAuroraCommandContext(AuroraCommandContext):
   def add_expected_status_query_result(self, expected_result):
     self.task_status.append(expected_result)
     # each call adds an expected query result, in order.
-    self.fake_api.scheduler_proxy.getTasksStatus.side_effect = self.task_status
+    self.fake_api.scheduler_proxy.getTasksWithoutConfigs.side_effect = self.task_status
     self.fake_api.check_status.side_effect = self.task_status
 
 
@@ -168,7 +168,7 @@ class AuroraClientCommandTest(unittest.TestCase):
   @classmethod
   def setup_get_tasks_status_calls(cls, scheduler):
     status_response = cls.create_status_call_result()
-    scheduler.getTasksStatus.return_value = status_response
+    scheduler.getTasksWithoutConfigs.return_value = status_response
 
   @classmethod
   def fake_time(cls, ignored):

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/commands/test_create.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_create.py b/src/test/python/apache/aurora/client/commands/test_create.py
index 4cd1343..b8df1f2 100644
--- a/src/test/python/apache/aurora/client/commands/test_create.py
+++ b/src/test/python/apache/aurora/client/commands/test_create.py
@@ -90,8 +90,8 @@ class TestClientCreateCommand(AuroraClientCommandTest):
   @classmethod
   def assert_scheduler_called(cls, mock_api, mock_query, num_queries):
     # scheduler.scheduler() is called once, as a part of the handle_open call.
-    assert mock_api.scheduler_proxy.getTasksStatus.call_count == num_queries
-    mock_api.scheduler_proxy.getTasksStatus.assert_called_with(mock_query)
+    assert mock_api.scheduler_proxy.getTasksWithoutConfigs.call_count == num_queries
+    mock_api.scheduler_proxy.getTasksWithoutConfigs.assert_called_with(mock_query)
 
   def test_simple_successful_create_job(self):
     """Run a test of the "create" command against a mocked-out API:
@@ -113,7 +113,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
       # The monitor uses TaskQuery to get the tasks. It's called at least twice:once before
       # the job is created, and once after. So we need to set up mocks for the query results.
       mock_query = self.create_mock_query()
-      mock_scheduler_proxy.getTasksStatus.side_effect = [
+      mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = [
         self.create_mock_status_query_result(ScheduleStatus.RUNNING)
       ]
 
@@ -155,7 +155,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
           self.create_mock_status_query_result(ScheduleStatus.RUNNING),
           self.create_mock_status_query_result(ScheduleStatus.FINISHED),
       ]
-      mock_scheduler_proxy.getTasksStatus.side_effect = mock_query_results
+      mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = mock_query_results
       mock_api.create_job.return_value = self.get_createjob_response()
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
@@ -210,7 +210,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
           self.create_mock_status_query_result(ScheduleStatus.PENDING),
           self.create_mock_status_query_result(ScheduleStatus.RUNNING)
       ]
-      mock_scheduler_proxy.getTasksStatus.side_effect = mock_query_results
+      mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = mock_query_results
       mock_api.create_job.return_value = self.get_createjob_response()
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
@@ -242,7 +242,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
       # Check that create_job was not called.
       assert mock_api.create_job.call_count == 0
 
-      assert mock_scheduler_proxy.getTasksStatus.call_count == 0
+      assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 0
       # make_client should not have been called.
       assert make_client.call_count == 0
 
@@ -264,7 +264,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
       # Now check that the right API calls got made.
       # Check that create_job was not called.
       assert mock_api.create_job.call_count == 0
-      # getTasksStatus was called once, before the create_job
-      assert mock_scheduler_proxy.getTasksStatus.call_count == 0
+      # getTasksWithoutConfigs was called once, before the create_job
+      assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 0
       # make_client should not have been called.
       assert make_client.call_count == 0

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/commands/test_hooks.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_hooks.py b/src/test/python/apache/aurora/client/commands/test_hooks.py
index 0c76aea..0861f13 100644
--- a/src/test/python/apache/aurora/client/commands/test_hooks.py
+++ b/src/test/python/apache/aurora/client/commands/test_hooks.py
@@ -108,8 +108,8 @@ class TestClientCreateCommand(AuroraClientCommandTest):
   @classmethod
   def assert_scheduler_called(cls, mock_api, mock_query, num_queries):
     # scheduler.scheduler() is called once, as a part of the handle_open call.
-    assert mock_api.scheduler_proxy.getTasksStatus.call_count == num_queries
-    mock_api.scheduler_proxy.getTasksStatus.assert_called_with(mock_query)
+    assert mock_api.scheduler_proxy.getTasksWithoutConfigs.call_count == num_queries
+    mock_api.scheduler_proxy.getTasksWithoutConfigs.assert_called_with(mock_query)
 
   def test_create_job_hook_called(self):
     """Run a test of the "create" command against a mocked API;
@@ -134,7 +134,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
 
       mock_scheduler_proxy.createJob.return_value = self.get_createjob_response()
 
-      mock_scheduler_proxy.getTasksStatus.side_effect = [
+      mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = [
         self.create_mock_status_query_result(ScheduleStatus.INIT),
         self.create_mock_status_query_result(ScheduleStatus.RUNNING)
       ]
@@ -173,7 +173,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
 
       mock_scheduler_proxy.createJob.return_value = self.get_createjob_response()
 
-      mock_scheduler_proxy.getTasksStatus.side_effect = [
+      mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = [
         self.create_mock_status_query_result(ScheduleStatus.INIT),
         self.create_mock_status_query_result(ScheduleStatus.RUNNING)
       ]
@@ -215,7 +215,7 @@ class TestClientCreateCommand(AuroraClientCommandTest):
 
       mock_scheduler_proxy.createJob.return_value = self.get_createjob_response()
 
-      mock_scheduler_proxy.getTasksStatus.side_effect = [
+      mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = [
         self.create_mock_status_query_result(ScheduleStatus.INIT),
         self.create_mock_status_query_result(ScheduleStatus.RUNNING)
       ]

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/commands/test_kill.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_kill.py b/src/test/python/apache/aurora/client/commands/test_kill.py
index 94bbe1b..d8d54a2 100644
--- a/src/test/python/apache/aurora/client/commands/test_kill.py
+++ b/src/test/python/apache/aurora/client/commands/test_kill.py
@@ -90,8 +90,8 @@ class TestClientKillCommand(AuroraClientCommandTest):
 
   @classmethod
   def assert_scheduler_called(cls, mock_api, mock_query, num_queries):
-    assert mock_api.scheduler_proxy.getTasksStatus.call_count == num_queries
-    mock_api.scheduler_proxy.getTasksStatus.assert_called_with(mock_query)
+    assert mock_api.scheduler_proxy.getTasksWithoutConfigs.call_count == num_queries
+    mock_api.scheduler_proxy.getTasksWithoutConfigs.assert_called_with(mock_query)
 
   def test_kill_job_tasks_not_killed_in_time(self):
     """Test kill timed out waiting in job monitor."""
@@ -111,16 +111,14 @@ class TestClientKillCommand(AuroraClientCommandTest):
         self.create_mock_status_query_result(ScheduleStatus.KILLING),
         self.create_mock_status_query_result(ScheduleStatus.KILLING),
     ]
-    mock_scheduler_proxy.getTasksStatus.side_effect = mock_query_results
+    mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = mock_query_results
     with contextlib.nested(
         patch('time.sleep'),
         patch('apache.aurora.client.factory.make_client', return_value=mock_api),
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)
-    ) as (mock_sleep, mock_api_patch, mock_scheduler_proxy_class, mock_clusters, options,
-        mock_get_job_config):
+        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)):
 
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
@@ -142,11 +140,9 @@ class TestClientKillCommand(AuroraClientCommandTest):
         patch('apache.aurora.client.commands.core.make_client_factory',
             return_value=mock_api_factory),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)) as (
-            mock_make_client_factory,
-            options, mock_get_job_config):
-      mock_api = mock_api_factory.return_value
+        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)):
 
+      mock_api = mock_api_factory.return_value
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
         fp.flush()
@@ -170,17 +166,13 @@ class TestClientKillCommand(AuroraClientCommandTest):
         self.create_mock_status_query_result(ScheduleStatus.KILLING),
         self.create_mock_status_query_result(ScheduleStatus.KILLED),
     ]
-    mock_scheduler_proxy.getTasksStatus.side_effect = mock_query_results
+    mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = mock_query_results
     with contextlib.nested(
         patch('time.sleep'),
         patch('apache.aurora.client.commands.core.make_client',
             return_value=mock_api),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)) as (
-            sleep,
-            mock_make_client,
-            options,
-            mock_get_job_config):
+        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)):
 
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
@@ -234,9 +226,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
             return_value=mock_api),
         patch('twitter.common.app.get_options', return_value=mock_options),
         patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config),
-        patch('apache.aurora.client.commands.core.JobMonitor')) as (
-            mock_make_client,
-            options, mock_get_job_config, mock_monitor):
+        patch('apache.aurora.client.commands.core.JobMonitor')):
 
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
@@ -269,20 +259,14 @@ class TestClientKillCommand(AuroraClientCommandTest):
         self.create_mock_status_query_result(ScheduleStatus.KILLING),
         self.create_mock_status_query_result(ScheduleStatus.KILLED),
     ]
-    mock_scheduler_proxy.getTasksStatus.side_effect = mock_query_results
+    mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = mock_query_results
     with contextlib.nested(
         patch('time.sleep'),
         patch('apache.aurora.client.factory.make_client', return_value=mock_api),
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)) as (
-            mock_sleep,
-            mock_api_patch,
-            mock_scheduler_proxy_class,
-            mock_clusters,
-            options,
-            mock_get_job_config):
+        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)):
 
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
@@ -309,19 +293,15 @@ class TestClientKillCommand(AuroraClientCommandTest):
         self.create_mock_status_query_result(ScheduleStatus.KILLING),
         self.create_mock_status_query_result(ScheduleStatus.KILLED),
     ]
-    mock_scheduler_proxy.getTasksStatus.side_effect = mock_query_results
+    mock_scheduler_proxy.getTasksWithoutConfigs.side_effect = mock_query_results
     with contextlib.nested(
         patch('time.sleep'),
         patch('apache.aurora.client.factory.make_client', return_value=mock_api),
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)) as (
-            mock_sleep,
-            mock_api_factory_patch,
-            mock_scheduler_proxy_class,
-            mock_clusters,
-            options, mock_get_job_config):
+        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)):
+
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
         fp.flush()
@@ -343,7 +323,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
     mock_config.raw.return_value.enable_hooks.return_value.get.return_value = False
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
     mock_api.check_status.return_value = self.create_status_call_result()
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_call_result()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_call_result()
     mock_scheduler_proxy.killTasks.return_value = self.get_kill_job_response()
     with contextlib.nested(
         patch('apache.aurora.client.factory.make_client', return_value=mock_api),
@@ -351,12 +331,8 @@ class TestClientKillCommand(AuroraClientCommandTest):
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
         patch('twitter.common.app.get_options', return_value=mock_options),
         patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config),
-        patch('apache.aurora.client.commands.core.JobMonitor')) as (
-            mock_api_factory_patch,
-            mock_scheduler_proxy_class,
-            mock_clusters,
-            options, mock_get_job_config,
-            mock_monitor):
+        patch('apache.aurora.client.commands.core.JobMonitor')):
+
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
         fp.flush()
@@ -377,7 +353,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
     mock_config.raw.return_value.enable_hooks.return_value.get.return_value = False
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
     mock_api.check_status.return_value = self.create_status_call_result()
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_call_result()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_call_result()
     mock_api.kill_job.side_effect = [
         self.get_kill_job_error_response(), self.get_kill_job_response()]
     with contextlib.nested(
@@ -385,9 +361,7 @@ class TestClientKillCommand(AuroraClientCommandTest):
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)
-    ) as (mock_api_factory_patch, mock_scheduler_proxy_class, mock_clusters, options,
-        mock_get_job_config):
+        patch('apache.aurora.client.commands.core.get_job_config', return_value=mock_config)):
 
       with temporary_file() as fp:
         fp.write(self.get_valid_config())

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/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 0c6d5a0..b95e7ff 100644
--- a/src/test/python/apache/aurora/client/commands/test_restart.py
+++ b/src/test/python/apache/aurora/client/commands/test_restart.py
@@ -78,7 +78,7 @@ class TestRestartCommand(AuroraClientCommandTest):
   @classmethod
   def setup_get_tasks_status_calls(cls, scheduler):
     status_response = cls.create_simple_success_response()
-    scheduler.getTasksStatus.return_value = status_response
+    scheduler.getTasksWithoutConfigs.return_value = status_response
     schedule_status = Mock(spec=ScheduleStatusResult)
     status_response.result.scheduleStatusResult = schedule_status
     mock_task_config = Mock()
@@ -125,7 +125,7 @@ class TestRestartCommand(AuroraClientCommandTest):
         # Like the update test, the exact number of calls here doesn't matter.
         # what matters is that it must have been called once before batching, plus
         # at least once per batch, and there are 4 batches.
-        assert mock_scheduler_proxy.getTasksStatus.call_count >= 4
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count >= 4
         # called once per batch
         assert mock_scheduler_proxy.restartShards.call_count == 4
         # parameters for all calls are generated by the same code, so we just check one
@@ -158,7 +158,7 @@ class TestRestartCommand(AuroraClientCommandTest):
         # Like the update test, the exact number of calls here doesn't matter.
         # what matters is that it must have been called once before batching, plus
         # at least once per batch, and there are 4 batches.
-        assert mock_scheduler_proxy.getTasksStatus.call_count == 0
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 0
         # called once per batch
         assert mock_scheduler_proxy.restartShards.call_count == 0
 
@@ -167,7 +167,7 @@ class TestRestartCommand(AuroraClientCommandTest):
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
     mock_health_check = self.setup_health_checks(mock_api)
     self.setup_mock_scheduler_for_simple_restart(mock_api)
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_error_response()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_error_response()
     with contextlib.nested(
         patch('twitter.common.app.get_options', return_value=mock_options),
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
@@ -183,7 +183,7 @@ class TestRestartCommand(AuroraClientCommandTest):
         fp.write(self.get_valid_config())
         fp.flush()
         self.assertRaises(SystemExit, restart, ['west/mchucarroll/test/hello'], mock_options)
-        assert mock_scheduler_proxy.getTasksStatus.call_count == 1
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 1
         assert mock_scheduler_proxy.restartShards.call_count == 0
 
   def test_restart_failed_restart(self):
@@ -209,7 +209,7 @@ class TestRestartCommand(AuroraClientCommandTest):
         fp.write(self.get_valid_config())
         fp.flush()
         self.assertRaises(SystemExit, restart, ['west/mchucarroll/test/hello'], mock_options)
-        assert mock_scheduler_proxy.getTasksStatus.call_count == 1
+        assert mock_scheduler_proxy.getTasksWithoutConfigs.call_count == 1
         assert mock_scheduler_proxy.restartShards.call_count == 1
         mock_scheduler_proxy.restartShards.assert_called_with(JobKey(environment=self.TEST_ENV,
             role=self.TEST_ROLE, name=self.TEST_JOB), [0, 1, 2, 3, 4], None)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/commands/test_status.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_status.py b/src/test/python/apache/aurora/client/commands/test_status.py
index a5c0ef0..bda1f28 100644
--- a/src/test/python/apache/aurora/client/commands/test_status.py
+++ b/src/test/python/apache/aurora/client/commands/test_status.py
@@ -86,7 +86,7 @@ class TestListJobs(AuroraClientCommandTest):
     return resp
 
   @classmethod
-  def create_status_response_null_metadata(cls):
+  def create_status_null_metadata(cls):
     resp = cls.create_simple_success_response()
     resp.result.scheduleStatusResult = Mock(spec=ScheduleStatusResult)
     resp.result.scheduleStatusResult.tasks = set(cls.create_mock_scheduled_task_no_metadata())
@@ -101,19 +101,16 @@ class TestListJobs(AuroraClientCommandTest):
     # Calls api.check_status, which calls scheduler_proxy.getJobs
     mock_options = self.setup_mock_options()
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_response()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_response()
     with contextlib.nested(
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
-        patch('twitter.common.app.get_options', return_value=mock_options)) as (
-            mock_scheduler_proxy_class,
-            mock_clusters,
-            options):
-      status(['west/mchucarroll/test/hello'], mock_options)
+        patch('twitter.common.app.get_options', return_value=mock_options)):
 
-      # The status command sends a getTasksStatus query to the scheduler,
+      status(['west/mchucarroll/test/hello'], mock_options)
+      # The status command sends a getTasksWithoutConfigs query to the scheduler,
       # and then prints the result.
-      mock_scheduler_proxy.getTasksStatus.assert_called_with(TaskQuery(jobName='hello',
+      mock_scheduler_proxy.getTasksWithoutConfigs.assert_called_with(TaskQuery(jobName='hello',
           environment='test', owner=Identity(role='mchucarroll')))
 
   def test_unsuccessful_status(self):
@@ -121,17 +118,14 @@ class TestListJobs(AuroraClientCommandTest):
     # Calls api.check_status, which calls scheduler_proxy.getJobs
     mock_options = self.setup_mock_options()
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_failed_status_response()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_failed_status_response()
     with contextlib.nested(
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
-        patch('twitter.common.app.get_options', return_value=mock_options)) as (
-            mock_scheduler_proxy_class,
-            mock_clusters,
-            options):
-      self.assertRaises(SystemExit, status, ['west/mchucarroll/test/hello'], mock_options)
+        patch('twitter.common.app.get_options', return_value=mock_options)):
 
-      mock_scheduler_proxy.getTasksStatus.assert_called_with(TaskQuery(jobName='hello',
+      self.assertRaises(SystemExit, status, ['west/mchucarroll/test/hello'], mock_options)
+      mock_scheduler_proxy.getTasksWithoutConfigs.assert_called_with(TaskQuery(jobName='hello',
           environment='test', owner=Identity(role='mchucarroll')))
 
   def test_successful_status_nometadata(self):
@@ -139,13 +133,12 @@ class TestListJobs(AuroraClientCommandTest):
     # Calls api.check_status, which calls scheduler_proxy.getJobs
     mock_options = self.setup_mock_options()
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
-    mock_scheduler_proxy.getTasksStatus.return_value = self.create_status_response_null_metadata()
+    mock_scheduler_proxy.getTasksWithoutConfigs.return_value = self.create_status_null_metadata()
     with contextlib.nested(
         patch('apache.aurora.client.api.SchedulerProxy', return_value=mock_scheduler_proxy),
         patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS),
-        patch('twitter.common.app.get_options', return_value=mock_options)
-    ) as (mock_scheduler_proxy_class, mock_clusters, options):
-      status(['west/mchucarroll/test/hello'], mock_options)
+        patch('twitter.common.app.get_options', return_value=mock_options)):
 
-      mock_scheduler_proxy.getTasksStatus.assert_called_with(TaskQuery(jobName='hello',
+      status(['west/mchucarroll/test/hello'], mock_options)
+      mock_scheduler_proxy.getTasksWithoutConfigs.assert_called_with(TaskQuery(jobName='hello',
           environment='test', owner=Identity(role='mchucarroll')))

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9dd58ecc/src/test/python/apache/aurora/client/commands/test_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_update.py b/src/test/python/apache/aurora/client/commands/test_update.py
index ea8e092..114ac01 100644
--- a/src/test/python/apache/aurora/client/commands/test_update.py
+++ b/src/test/python/apache/aurora/client/commands/test_update.py
@@ -74,10 +74,8 @@ class TestUpdateCommand(AuroraClientCommandTest):
     with contextlib.nested(
         patch('apache.aurora.client.commands.core.make_client', return_value=mock_api),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)
-    ) as (make_client,
-          options,
-          test_clusters):
+        patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
+
       mock_api.update_job.return_value = self.create_simple_success_response()
 
       with temporary_file() as fp:
@@ -98,10 +96,8 @@ class TestUpdateCommand(AuroraClientCommandTest):
     with contextlib.nested(
         patch('apache.aurora.client.commands.core.make_client', return_value=mock_api),
         patch('twitter.common.app.get_options', return_value=mock_options),
-        patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)
-    ) as (make_client,
-          options,
-          test_clusters):
+        patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
+
       with temporary_file() as fp:
         fp.write(self.get_invalid_config('invalid_field=False,'))
         fp.flush()
@@ -145,7 +141,7 @@ class TestUpdateCommand(AuroraClientCommandTest):
     populate.result.populateJobResult = Mock(spec=PopulateJobResult)
     api.populateJobConfig.return_value = populate
     configs = []
-    for i in range(20):
+    for _ in range(20):
       task_config = TaskConfig(numCpus=1.0, ramMb=1, diskMb=1)
       configs.append(task_config)
     populate.result.populateJobResult.populated = set(configs)
@@ -171,6 +167,7 @@ class TestUpdateCommand(AuroraClientCommandTest):
   def setup_get_tasks_status_calls(cls, scheduler_proxy):
     status_response = cls.create_simple_success_response()
     scheduler_proxy.getTasksStatus.return_value = status_response
+    scheduler_proxy.getTasksWithoutConfigs.return_value = status_response
     schedule_status = Mock(spec=ScheduleStatusResult)
     status_response.result.scheduleStatusResult = schedule_status
     task_config = TaskConfig(numCpus=1.0, ramMb=10, diskMb=1)
@@ -274,18 +271,27 @@ class TestUpdateCommand(AuroraClientCommandTest):
 
   @classmethod
   def assert_correct_status_calls(cls, api):
-    # getTasksStatus gets called a lot of times. The exact number isn't fixed; it loops
+    # getTasksWithoutConfigs gets called a lot of times. The exact number isn't fixed; it loops
     # over the health checks until all of them pass for a configured period of time.
-    # The minumum number of calls is 5: once before the tasks are restarted, and then
-    # once for each batch of restarts (Since the batch size is set to 5, and the
-    # total number of jobs is 20, that's 4 batches.)
-    assert api.getTasksStatus.call_count >= 5
-    # In the first getStatus call, it uses an expansive query; in the rest, it only queries for
-    # status RUNNING.
-    status_calls = api.getTasksStatus.call_args_list
-    assert status_calls[0][0][0] == TaskQuery(taskIds=None, jobName='hello', environment='test',
+    # The minumum number of calls is 4: once for each batch of restarts (Since the batch size
+    # is set to 5, and the total number of jobs is 20, that's 4 batches.)
+    assert api.getTasksWithoutConfigs.call_count >= 4
+
+    status_calls = api.getTasksWithoutConfigs.call_args_list
+    for status_call in status_calls:
+      status_call[0][0] == TaskQuery(
+          taskIds=None,
+          jobName='hello',
+          environment='test',
+          owner=Identity(role='mchucarroll', user=None),
+          statuses=set([ScheduleStatus.RUNNING]))
+
+    # getTasksStatus is called only once to build an generate update instructions
+    assert api.getTasksStatus.call_count == 1
+
+    api.getTasksStatus.assert_called_once_with(TaskQuery(
+        taskIds=None,
+        jobName='hello',
+        environment='test',
         owner=Identity(role=u'mchucarroll', user=None),
-        statuses=ACTIVE_STATES)
-    for status_call in status_calls[1:]:
-      status_call[0][0] == TaskQuery(taskIds=None, jobName='hello', environment='test',
-          owner=Identity(role='mchucarroll', user=None), statuses=set([ScheduleStatus.RUNNING]))
+        statuses=ACTIVE_STATES))


Mime
View raw message