aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [1/2] aurora git commit: Reapply deprecated thrift removal patches.
Date Wed, 10 Feb 2016 00:14:58 GMT
Repository: aurora
Updated Branches:
  refs/heads/master dd7993490 -> ec0f38a75


http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
index 4ad9211..c774ac0 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
@@ -126,6 +126,7 @@ import static org.apache.aurora.scheduler.configuration.ConfigurationManager.DED
 import static org.apache.aurora.scheduler.storage.backup.Recovery.RecoveryException;
 import static org.apache.aurora.scheduler.thrift.Fixtures.CRON_JOB;
 import static org.apache.aurora.scheduler.thrift.Fixtures.ENOUGH_QUOTA;
+import static org.apache.aurora.scheduler.thrift.Fixtures.IDENTITY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.INSTANCE_KEY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.INVALID_TASK_CONFIG;
 import static org.apache.aurora.scheduler.thrift.Fixtures.JOB_KEY;
@@ -134,7 +135,6 @@ import static org.apache.aurora.scheduler.thrift.Fixtures.LOCK;
 import static org.apache.aurora.scheduler.thrift.Fixtures.LOCK_KEY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.NOT_ENOUGH_QUOTA;
 import static org.apache.aurora.scheduler.thrift.Fixtures.ROLE;
-import static org.apache.aurora.scheduler.thrift.Fixtures.ROLE_IDENTITY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.TASK_ID;
 import static org.apache.aurora.scheduler.thrift.Fixtures.UPDATE_KEY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.USER;
@@ -255,10 +255,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
 
   @Test
   public void testCreateJobNoLock() throws Exception {
-    // Validate key is populated during sanitizing.
-    JobConfiguration jobConfig = makeProdJob();
-    jobConfig.getTaskConfig().unsetJob();
-
     IJobConfiguration job = IJobConfiguration.build(makeProdJob());
     SanitizedConfiguration sanitized = fromUnsanitized(job);
     lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty());
@@ -275,7 +271,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
 
     control.replay();
 
-    assertOkResponse(thrift.createJob(jobConfig, null));
+    assertOkResponse(thrift.createJob(makeProdJob(), null));
   }
 
   @Test
@@ -419,7 +415,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
     control.replay();
 
     JobConfiguration job =
-        new JobConfiguration().setKey(JOB_KEY.newBuilder()).setOwner(ROLE_IDENTITY);
+        new JobConfiguration().setKey(JOB_KEY.newBuilder()).setOwner(IDENTITY);
     assertResponse(INVALID_REQUEST, thrift.createJob(job, null));
   }
 
@@ -501,10 +497,9 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
         .setDiskMb(1024)
         .setIsService(true)
         .setProduction(true)
-        .setOwner(ROLE_IDENTITY)
-        .setEnvironment("devel")
+        .setOwner(IDENTITY)
         .setContainer(Container.mesos(new MesosContainer()))
-        .setJobName(JOB_NAME);
+        .setJob(JOB_KEY.newBuilder());
     JobConfiguration job = makeJob(task);
 
     JobConfiguration sanitized = job.deepCopy();
@@ -519,8 +514,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
         .setRequestedPorts(ImmutableSet.of())
         .setTaskLinks(ImmutableMap.of())
         .setConstraints(ImmutableSet.of())
-        .setMaxTaskFailures(0)
-        .setEnvironment("devel");
+        .setMaxTaskFailures(0);
 
     lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty());
     storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active());
@@ -590,9 +584,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
             .setInstanceId(0)
             .setTask(new TaskConfig()
                 .setJob(JOB_KEY.newBuilder().setName(jobName))
-                .setOwner(ROLE_IDENTITY)
-                .setEnvironment("devel")
-                .setJobName(jobName))));
+                .setOwner(IDENTITY))));
   }
 
   private void expectTransitionsToKilling() {
@@ -678,9 +670,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
 
   @Test
   public void testKillTasksInvalidJobName() throws Exception {
-    TaskQuery query = new TaskQuery()
-        .setOwner(ROLE_IDENTITY)
-        .setJobName("");
+    TaskQuery query = new TaskQuery().setJobName("");
 
     control.replay();
 
@@ -874,10 +864,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
     cronJobManager.updateJob(anyObject(SanitizedCronJob.class));
     control.replay();
 
-    // Validate key is populated during sanitizing.
-    JobConfiguration jobConfig = CRON_JOB;
-    jobConfig.getTaskConfig().unsetJob();
-    assertOkResponse(thrift.replaceCronTemplate(jobConfig, null));
+    assertOkResponse(thrift.replaceCronTemplate(CRON_JOB, null));
   }
 
   @Test
@@ -966,10 +953,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
     cronJobManager.updateJob(SanitizedCronJob.from(sanitized));
     control.replay();
 
-    // Validate key is populated during sanitizing.
-    JobConfiguration jobConfig = CRON_JOB;
-    jobConfig.getTaskConfig().unsetJob();
-    assertResponse(OK, thrift.scheduleCronJob(jobConfig, null));
+    assertResponse(OK, thrift.scheduleCronJob(CRON_JOB, null));
   }
 
   @Test
@@ -1081,7 +1065,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
 
     IJobConfiguration job = IJobConfiguration.build(makeJob());
     JobKey rewrittenJobKey = JobKeys.from("a", "b", "c").newBuilder();
-    Identity rewrittenIdentity = new Identity(rewrittenJobKey.getRole(), "steve");
+    Identity rewrittenIdentity = new Identity().setUser("steve");
     RewriteConfigsRequest request = new RewriteConfigsRequest(
         ImmutableList.of(ConfigRewrite.jobRewrite(new JobConfigRewrite(
             job.newBuilder(),
@@ -1100,12 +1084,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
         storedConfig.deepCopy().setExecutorConfig(new ExecutorConfig("aurora", "rewritten"));
     IScheduledTask storedTask = IScheduledTask.build(
         new ScheduledTask().setAssignedTask(new AssignedTask().setTask(storedConfig)));
-    InstanceKey instance = new InstanceKey(
-        JobKeys.from(
-            storedConfig.getOwner().getRole(),
-            storedConfig.getEnvironment(),
-            storedConfig.getJobName()).newBuilder(),
-        0);
+    InstanceKey instance = new InstanceKey(storedConfig.getJob(), 0);
 
     storageUtil.expectTaskFetch(
         Query.instanceScoped(IInstanceKey.build(instance)).active(), storedTask);
@@ -1128,12 +1107,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
         new AssignedTask()
             .setTaskId(taskId)
             .setTask(storedConfig)));
-    InstanceKey instanceKey = new InstanceKey(
-        JobKeys.from(
-            storedConfig.getOwner().getRole(),
-            storedConfig.getEnvironment(),
-            storedConfig.getJobName()).newBuilder(),
-        0);
+    InstanceKey instanceKey = new InstanceKey(storedConfig.getJob(), 0);
 
     storageUtil.expectTaskFetch(
         Query.instanceScoped(IInstanceKey.build(instanceKey)).active(), storedTask);
@@ -1155,12 +1129,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
         new AssignedTask()
             .setTaskId(taskId)
             .setTask(config)));
-    InstanceKey instanceKey = new InstanceKey(
-        JobKeys.from(
-            config.getOwner().getRole(),
-            config.getEnvironment(),
-            config.getJobName()).newBuilder(),
-        0);
+    InstanceKey instanceKey = new InstanceKey(config.getJob(), 0);
 
     storageUtil.expectTaskFetch(
         Query.instanceScoped(IInstanceKey.build(instanceKey)).active(), task);
@@ -1220,10 +1189,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
 
     control.replay();
 
-    // Validate key is populated during sanitizing.
-    JobConfiguration requestConfig = oldJob.deepCopy();
-    requestConfig.getTaskConfig().unsetJob();
-
     RewriteConfigsRequest request = new RewriteConfigsRequest(
         ImmutableList.of(ConfigRewrite.jobRewrite(
             new JobConfigRewrite(oldJob, newJob))));
@@ -1338,9 +1303,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
 
     control.replay();
 
-    // Validate key is populated during sanitizing.
     AddInstancesConfig config = createInstanceConfig(populatedTask.newBuilder());
-    config.getTaskConfig().unsetJob();
     assertOkResponse(deprecatedAddInstances(config, LOCK.newBuilder()));
   }
 
@@ -1610,11 +1573,8 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
 
     control.replay();
 
-    // Validate key is populated during sanitizing.
-    JobUpdateRequest request = buildJobUpdateRequest(update);
-    request.getTaskConfig().unsetJob();
-
-    Response response = assertOkResponse(thrift.startJobUpdate(request, AUDIT_MESSAGE));
+    Response response =
+        assertOkResponse(thrift.startJobUpdate(buildJobUpdateRequest(update), AUDIT_MESSAGE));
     assertEquals(
         new StartJobUpdateResult(UPDATE_KEY.newBuilder()),
         response.getResult().getStartJobUpdateResult());
@@ -1682,20 +1642,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
         AUDIT_MESSAGE);
   }
 
-  @Test(expected = IllegalArgumentException.class)
-  public void testStartUpdateFailsInvalidJobKey() throws Exception {
-    control.replay();
-    thrift.startJobUpdate(
-        new JobUpdateRequest(
-            new TaskConfig()
-                .setJobName("&")
-                .setEnvironment("devel")
-                .setOwner(new Identity(ROLE, null)),
-            5,
-            buildJobUpdateSettings()),
-        AUDIT_MESSAGE);
-  }
-
   @Test
   public void testStartUpdateFailsInvalidGroupSize() throws Exception {
     control.replay();
@@ -2175,7 +2121,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
     return IJobUpdate.build(new JobUpdate()
         .setSummary(new JobUpdateSummary()
             .setKey(UPDATE_KEY.newBuilder())
-            .setUser(ROLE_IDENTITY.getUser()))
+            .setUser(IDENTITY.getUser()))
         .setInstructions(new JobUpdateInstructions()
             .setSettings(buildJobUpdateSettings())
             .setDesiredState(new InstanceTaskConfig()

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java b/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java
index 67fe14b..09d13a3 100644
--- a/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java
@@ -228,9 +228,8 @@ public class JobDiffTest extends EasyMockTest {
 
   private static ITaskConfig makeTask(String job, String config) {
     return ITaskConfig.build(new TaskConfig()
-        .setOwner(new Identity("owner", "owner"))
-        .setEnvironment("test")
-        .setJobName(job)
+        .setJob(JobKeys.from("role", "test", job).newBuilder())
+        .setOwner(new Identity().setUser("owner"))
         .setExecutorConfig(new ExecutorConfig().setData(config)));
   }
 }

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/python/apache/aurora/admin/test_admin.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/admin/test_admin.py b/src/test/python/apache/aurora/admin/test_admin.py
index e8da335..22605ec 100644
--- a/src/test/python/apache/aurora/admin/test_admin.py
+++ b/src/test/python/apache/aurora/admin/test_admin.py
@@ -26,7 +26,6 @@ from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     GetLocksResult,
     GetQuotaResult,
-    Identity,
     JobKey,
     Lock,
     LockKey,
@@ -54,7 +53,7 @@ class TestQueryCommand(AuroraClientCommandTest):
     mock_options.force = force
     mock_options.shards = shards
     mock_options.states = states
-    mock_options.listformat = listformat or '%role%/%jobName%/%instanceId% %status%'
+    mock_options.listformat = listformat or '%role%/%name%/%instanceId% %status%'
     mock_options.verbosity = False
     return mock_options
 
@@ -70,7 +69,8 @@ class TestQueryCommand(AuroraClientCommandTest):
     return [ScheduledTask(
         assignedTask=AssignedTask(
             instanceId=0,
-            task=TaskConfig(owner=Identity(role='test_role'), jobName='test_job')),
+            task=TaskConfig(job=JobKey(role='role', environment='test', name='job'))
+        ),
         status=ScheduleStatus.RUNNING
     )]
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/python/apache/aurora/client/api/test_api.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_api.py b/src/test/python/apache/aurora/client/api/test_api.py
index 1f041f4..974fc7e 100644
--- a/src/test/python/apache/aurora/client/api/test_api.py
+++ b/src/test/python/apache/aurora/client/api/test_api.py
@@ -106,9 +106,6 @@ class TestJobUpdateApis(unittest.TestCase):
     mock_task_config = create_autospec(spec=JobConfiguration, instance=True)
     mock_task_config.taskConfig = TaskConfig()
     config.job.return_value = mock_task_config
-    config.role.return_value = "role"
-    config.environment.return_value = "env"
-    config.name.return_value = "name"
     config.instances.return_value = 5
     return config
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/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 674e7f8..2bc2dd9 100644
--- a/src/test/python/apache/aurora/client/api/test_sla.py
+++ b/src/test/python/apache/aurora/client/api/test_sla.py
@@ -26,7 +26,6 @@ from apache.aurora.common.cluster import Cluster
 from gen.apache.aurora.api.constants import LIVE_STATES
 from gen.apache.aurora.api.ttypes import (
     AssignedTask,
-    Identity,
     JobKey,
     Response,
     ResponseCode,
@@ -69,10 +68,7 @@ class SlaTest(unittest.TestCase):
             slaveHost=host,
             task=TaskConfig(
                 production=prod if prod is not None else True,
-                job=JobKey(role=self._role, environment=self._env, name=name or self._name),
-                jobName=name or self._name,
-                owner=Identity(role=self._role),
-                environment=self._env)),
+                job=JobKey(role=self._role, environment=self._env, name=name or self._name))),
         status=ScheduleStatus.RUNNING,
         taskEvents=[TaskEvent(
             status=ScheduleStatus.RUNNING,

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/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 a75f15e..7f36b46 100644
--- a/src/test/python/apache/aurora/client/cli/test_status.py
+++ b/src/test/python/apache/aurora/client/cli/test_status.py
@@ -28,7 +28,6 @@ from .util import AuroraClientCommandTest, FakeAuroraCommandContext
 from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     GetJobsResult,
-    Identity,
     JobConfiguration,
     JobKey,
     Metadata,
@@ -52,7 +51,6 @@ class TestJobStatus(AuroraClientCommandTest):
       instance += 1
       task.assignedTask.instanceId = instance
       task.assignedTask.task.job = JobKey(role='bozo', environment='test', name='woops')
-      task.assignedTask.task.jobName = 'woops'
     return tasks
 
   @classmethod
@@ -149,9 +147,6 @@ class TestJobStatus(AuroraClientCommandTest):
           slaveHost="junk.nothing",
           task=TaskConfig(
             job=JobKey(role="nobody", environment="prod", name='flibber'),
-            owner=Identity(role="nobody"),
-            environment="prod",
-            jobName="flibber",
             isService=False,
             numCpus=2,
             ramMb=2048,
@@ -437,18 +432,13 @@ class TestJobStatus(AuroraClientCommandTest):
                 "assignedTask": {
                   "task": {
                     "isService": False,
-                    "environment": "prod",
                     "container": {
                       "mesos": {}
                     },
                     "requestedPorts": [
                       "http"
                     ],
-                    "jobName": "flibber",
                     "priority": 7,
-                    "owner": {
-                      "role": "nobody"
-                    },
                     "job": {
                       "environment": "prod",
                       "role": "nobody",
@@ -493,18 +483,13 @@ class TestJobStatus(AuroraClientCommandTest):
                 "assignedTask": {
                   "task": {
                     "isService": False,
-                    "environment": "prod",
                     "container": {
                       "mesos": {}
                     },
                     "requestedPorts": [
                       "http"
                     ],
-                    "jobName": "flibber",
                     "priority": 7,
-                    "owner": {
-                      "role": "nobody"
-                    },
                     "job": {
                       "environment": "prod",
                       "role": "nobody",

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/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 7ae5886..7b4558e 100644
--- a/src/test/python/apache/aurora/client/cli/util.py
+++ b/src/test/python/apache/aurora/client/cli/util.py
@@ -29,7 +29,6 @@ from gen.apache.aurora.api.constants import ACTIVE_STATES
 from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     ExecutorConfig,
-    Identity,
     JobKey,
     Response,
     ResponseCode,
@@ -216,9 +215,6 @@ class AuroraClientCommandTest(unittest.TestCase):
         executorConfig=ExecutorConfig(data='fake data'),
         metadata=[],
         job=JobKey(role=cls.TEST_ROLE, environment=cls.TEST_ENV, name=name),
-        owner=Identity(role=cls.TEST_ROLE),
-        environment=cls.TEST_ENV,
-        jobName=name,
         numCpus=2,
         ramMb=2,
         diskMb=2)

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/python/apache/aurora/config/test_thrift.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/config/test_thrift.py b/src/test/python/apache/aurora/config/test_thrift.py
index 1bd7459..88292d3 100644
--- a/src/test/python/apache/aurora/config/test_thrift.py
+++ b/src/test/python/apache/aurora/config/test_thrift.py
@@ -56,10 +56,9 @@ def test_simple_config():
   assert job.instanceCount == 1
   tti = job.taskConfig
   assert job.key == expected_key
-  assert job.owner == Identity(role=HELLO_WORLD.role().get(), user=getpass.getuser())
+  assert job.owner == Identity(user=getpass.getuser())
   assert job.cronSchedule is None
   assert tti.job == expected_key
-  assert tti.jobName == 'hello_world'
   assert tti.isService is False
   assert tti.numCpus == 0.1
   assert tti.ramMb == 64
@@ -70,7 +69,6 @@ def test_simple_config():
   assert tti.maxTaskFailures == 1
   assert tti.constraints == set()
   assert tti.metadata == set()
-  assert tti.environment == HELLO_WORLD.environment().get()
   assert tti.tier is None
 
 
@@ -111,7 +109,6 @@ def test_config_with_options():
   assert tti.isService
   assert job.cronCollisionPolicy == CronCollisionPolicy.RUN_OVERLAP
   assert len(tti.constraints) == 2
-  assert tti.environment == 'prod'
   assert job.key.environment == 'prod'
 
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/python/apache/aurora/executor/common/test_announcer.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/executor/common/test_announcer.py b/src/test/python/apache/aurora/executor/common/test_announcer.py
index bb9e4b0..f4032c7 100644
--- a/src/test/python/apache/aurora/executor/common/test_announcer.py
+++ b/src/test/python/apache/aurora/executor/common/test_announcer.py
@@ -189,7 +189,6 @@ def make_assigned_task(thermos_config, assigned_ports=None):
   from gen.apache.aurora.api.ttypes import (
       AssignedTask,
       ExecutorConfig,
-      Identity,
       JobKey,
       TaskConfig
   )
@@ -201,9 +200,6 @@ def make_assigned_task(thermos_config, assigned_ports=None):
           role=thermos_config.role().get(),
           environment="prod",
           name=thermos_config.name().get()),
-      owner=Identity(role=thermos_config.role().get(), user=thermos_config.role().get()),
-      environment=thermos_config.environment().get(),
-      jobName=thermos_config.name().get(),
       executorConfig=executor_config)
 
   return AssignedTask(

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
b/src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
index c473808..fe74bd1 100644
--- a/src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
+++ b/src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
@@ -31,14 +31,15 @@ from gen.apache.thermos.ttypes import RunnerCkpt, RunnerHeader
 # TODO(jcohen): There should really be a single canonical source for creating test jobs/tasks
 def make_assigned_task(thermos_config, assigned_ports=None):
   from gen.apache.aurora.api.constants import AURORA_EXECUTOR_NAME
-  from gen.apache.aurora.api.ttypes import AssignedTask, ExecutorConfig, Identity, TaskConfig
+  from gen.apache.aurora.api.ttypes import AssignedTask, ExecutorConfig, JobKey, TaskConfig
 
   assigned_ports = assigned_ports or {}
   executor_config = ExecutorConfig(name=AURORA_EXECUTOR_NAME, data=thermos_config.json_dumps())
   task_config = TaskConfig(
-      owner=Identity(role=thermos_config.role().get(), user=thermos_config.role().get()),
-      environment=thermos_config.environment().get(),
-      jobName=thermos_config.name().get(),
+      job=JobKey(
+          role=thermos_config.role().get(),
+          environment='test',
+          name=thermos_config.name().get()),
       executorConfig=executor_config)
 
   return AssignedTask(

http://git-wip-us.apache.org/repos/asf/aurora/blob/ec0f38a7/src/test/python/apache/aurora/executor/test_thermos_executor.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/executor/test_thermos_executor.py b/src/test/python/apache/aurora/executor/test_thermos_executor.py
index 32e8b9b..ef60ec2 100644
--- a/src/test/python/apache/aurora/executor/test_thermos_executor.py
+++ b/src/test/python/apache/aurora/executor/test_thermos_executor.py
@@ -57,7 +57,7 @@ from apache.thermos.core.runner import TaskRunner
 from apache.thermos.monitoring.monitor import TaskMonitor
 
 from gen.apache.aurora.api.constants import AURORA_EXECUTOR_NAME
-from gen.apache.aurora.api.ttypes import AssignedTask, ExecutorConfig, Identity, JobKey,
TaskConfig
+from gen.apache.aurora.api.ttypes import AssignedTask, ExecutorConfig, JobKey, TaskConfig
 
 if 'THERMOS_DEBUG' in os.environ:
   LogOptions.set_stderr_log_level('google:DEBUG')
@@ -139,8 +139,7 @@ def make_task(thermos_config, assigned_ports={}, **kw):
           executorConfig=ExecutorConfig(
               name=AURORA_EXECUTOR_NAME,
               data=thermos_config.json_dumps()),
-          job=JobKey(role=role, environment='env', name='name'),
-          owner=Identity(role=role, user=role)),
+          job=JobKey(role=role, environment='env', name='name')),
       assignedPorts=assigned_ports,
       **kw)
   td = mesos_pb2.TaskInfo()
@@ -540,7 +539,6 @@ class TestThermosExecutor(object):
         AssignedTask(
             task=TaskConfig(
                 job=JobKey(role=role, environment='env', name='name'),
-                owner=Identity(role=role, user=role),
                 executorConfig=ExecutorConfig(name=AURORA_EXECUTOR_NAME, data='garbage'))))
 
     te = FastThermosExecutor(


Mime
View raw message