aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wfar...@apache.org
Subject aurora git commit: Remove deprecated fields made redundant by JobKey.
Date Thu, 28 Jan 2016 02:23:28 GMT
Repository: aurora
Updated Branches:
  refs/heads/master fee5943a9 -> 89fad5a88


Remove deprecated fields made redundant by JobKey.

Bugs closed: AURORA-1598

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


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

Branch: refs/heads/master
Commit: 89fad5a8895482b6c3fa45356137aa250d766dfe
Parents: fee5943
Author: Bill Farner <wfarner@apache.org>
Authored: Wed Jan 27 18:23:20 2016 -0800
Committer: Bill Farner <wfarner@apache.org>
Committed: Wed Jan 27 18:23:20 2016 -0800

----------------------------------------------------------------------
 NEWS                                            |  4 +
 .../thrift/org/apache/aurora/gen/api.thrift     |  7 --
 .../org/apache/aurora/scheduler/base/Query.java |  9 +-
 .../aurora/scheduler/base/TaskTestUtil.java     |  4 +-
 .../configuration/ConfigurationManager.java     | 66 ++-------------
 .../storage/db/views/DbTaskConfig.java          |  4 -
 .../thrift/SchedulerThriftInterface.java        |  7 +-
 src/main/python/apache/aurora/admin/admin.py    |  6 +-
 src/main/python/apache/aurora/client/api/sla.py |  6 +-
 .../python/apache/aurora/client/cli/jobs.py     |  6 +-
 .../python/apache/aurora/client/cli/task.py     |  2 +-
 src/main/python/apache/aurora/config/thrift.py  |  4 +-
 .../apache/aurora/executor/common/announcer.py  |  5 +-
 .../apache/aurora/executor/common/sandbox.py    |  2 +-
 .../scheduler/storage/db/CronJobMapper.xml      |  1 -
 .../scheduler/storage/db/TaskConfigMapper.xml   |  3 -
 .../aurora/scheduler/storage/db/TaskMapper.xml  |  3 -
 .../scheduler/assets/js/controllers.js          |  2 +-
 .../resources/scheduler/assets/js/services.js   |  2 +-
 .../configuration/ConfigurationManagerTest.java | 42 ++++------
 .../aurora/scheduler/cron/quartz/CronIT.java    |  4 +-
 .../scheduler/cron/quartz/QuartzTestUtil.java   |  2 +-
 .../preemptor/PreemptionVictimFilterTest.java   |  7 +-
 .../storage/AbstractCronJobStoreTest.java       |  2 +-
 .../scheduler/storage/log/LogManagerTest.java   |  8 +-
 .../aurora/scheduler/thrift/Fixtures.java       |  8 +-
 .../thrift/ReadOnlySchedulerImplTest.java       | 64 ++++++---------
 .../thrift/SchedulerThriftInterfaceTest.java    | 86 ++++----------------
 .../aurora/scheduler/updater/JobDiffTest.java   |  5 +-
 .../python/apache/aurora/admin/test_admin.py    |  6 +-
 .../python/apache/aurora/client/api/test_api.py |  3 -
 .../python/apache/aurora/client/api/test_sla.py |  6 +-
 .../apache/aurora/client/cli/test_status.py     | 15 ----
 .../python/apache/aurora/client/cli/util.py     |  4 -
 .../python/apache/aurora/config/test_thrift.py  |  5 +-
 .../aurora/executor/common/test_announcer.py    |  4 -
 .../common/test_resource_manager_integration.py |  9 +-
 .../aurora/executor/test_thermos_executor.py    |  6 +-
 38 files changed, 108 insertions(+), 321 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/NEWS
----------------------------------------------------------------------
diff --git a/NEWS b/NEWS
index 29702d5..39e6a0b 100644
--- a/NEWS
+++ b/NEWS
@@ -42,6 +42,10 @@
 - Removed the following deprecated `HealthCheckConfig` client-side configuration fields: `endpoint`,
   `expected_response`, `expected_response_code`.  These are now set exclusively in like-named fields
   of `HttpHealthChecker.`
+- Removed deprecated (now redundant) fields:
+  - `Identity.role`
+  - `TaskConfig.environment`
+  - `TaskConfig.jobName`
 
 0.11.0
 ------

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/api/src/main/thrift/org/apache/aurora/gen/api.thrift
----------------------------------------------------------------------
diff --git a/api/src/main/thrift/org/apache/aurora/gen/api.thrift b/api/src/main/thrift/org/apache/aurora/gen/api.thrift
index 95313a0..12400a7 100644
--- a/api/src/main/thrift/org/apache/aurora/gen/api.thrift
+++ b/api/src/main/thrift/org/apache/aurora/gen/api.thrift
@@ -38,7 +38,6 @@ const string AURORA_EXECUTOR_NAME = 'AuroraExecutor'
 
 // TODO(maxim): Remove in 0.7.0. (AURORA-749)
 struct Identity {
-  1: string role
   2: string user
 }
 
@@ -218,12 +217,6 @@ struct TaskConfig {
  // TODO(maxim): Remove in 0.7.0. (AURORA-749)
  /** contains the role component of JobKey */
  17: Identity owner
- // TODO(maxim): Remove in 0.7.0. (AURORA-749)
- /** contains the environment component of JobKey */
- 26: string environment
- // TODO(maxim): Remove in 0.7.0. (AURORA-749)
- /** contains the name component of JobKey */
-  3: string jobName
   7: bool isService
   8: double numCpus
   9: i64 ramMb

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/java/org/apache/aurora/scheduler/base/Query.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/base/Query.java b/src/main/java/org/apache/aurora/scheduler/base/Query.java
index fbadfd3..ee01eaa 100644
--- a/src/main/java/org/apache/aurora/scheduler/base/Query.java
+++ b/src/main/java/org/apache/aurora/scheduler/base/Query.java
@@ -130,15 +130,8 @@ public final class Query {
       this.query = new TaskQuery();
     }
 
-    Builder(final TaskQuery query) {
+    Builder(TaskQuery query) {
       // It is expected that the caller calls deepCopy.
-      // TODO(maxim): Safe to keep only Role here as TaskQuery is not returned back to the client.
-      // Remove in 0.7.0. (AURORA-749)
-      if (query.isSetOwner()) {
-        query.setRole(query.getOwner().getRole());
-        query.unsetOwner();
-      }
-
       this.query = query;
     }
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/java/org/apache/aurora/scheduler/base/TaskTestUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/base/TaskTestUtil.java b/src/main/java/org/apache/aurora/scheduler/base/TaskTestUtil.java
index 02ba1e3..4c64a1c 100644
--- a/src/main/java/org/apache/aurora/scheduler/base/TaskTestUtil.java
+++ b/src/main/java/org/apache/aurora/scheduler/base/TaskTestUtil.java
@@ -60,9 +60,7 @@ public final class TaskTestUtil {
   public static ITaskConfig makeConfig(IJobKey job) {
     return ITaskConfig.build(new TaskConfig()
         .setJob(job.newBuilder())
-        .setJobName(job.getName())
-        .setEnvironment(job.getEnvironment())
-        .setOwner(new Identity(job.getRole(), job.getRole() + "-user"))
+        .setOwner(new Identity().setUser(job.getRole() + "-user"))
         .setIsService(true)
         .setNumCpus(1.0)
         .setRamMb(1024)

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java b/src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java
index e4dbf06..6300e5f 100644
--- a/src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java
+++ b/src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java
@@ -37,7 +37,6 @@ import org.apache.aurora.scheduler.base.JobKeys;
 import org.apache.aurora.scheduler.base.UserProvidedStrings;
 import org.apache.aurora.scheduler.storage.entities.IConstraint;
 import org.apache.aurora.scheduler.storage.entities.IContainer;
-import org.apache.aurora.scheduler.storage.entities.IIdentity;
 import org.apache.aurora.scheduler.storage.entities.IJobConfiguration;
 import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
 import org.apache.aurora.scheduler.storage.entities.ITaskConstraint;
@@ -113,28 +112,6 @@ public class ConfigurationManager {
     this.defaultDockerParameters = Objects.requireNonNull(defaultDockerParameters);
   }
 
-  private static void requireNonNull(Object value, String error) throws TaskDescriptionException {
-    if (value == null) {
-      throw new TaskDescriptionException(error);
-    }
-  }
-
-  private static void assertOwnerValidity(IIdentity jobOwner) throws TaskDescriptionException {
-    requireNonNull(jobOwner, "No job owner specified!");
-    requireNonNull(jobOwner.getRole(), "No job role specified!");
-    requireNonNull(jobOwner.getUser(), "No job user specified!");
-
-    if (!UserProvidedStrings.isGoodIdentifier(jobOwner.getRole())) {
-      throw new TaskDescriptionException(
-          "Job role contains illegal characters: " + jobOwner.getRole());
-    }
-
-    if (!UserProvidedStrings.isGoodIdentifier(jobOwner.getUser())) {
-      throw new TaskDescriptionException(
-          "Job user contains illegal characters: " + jobOwner.getUser());
-    }
-  }
-
   private static String getRole(IValueConstraint constraint) {
     return Iterables.getOnlyElement(constraint.getValues()).split("/")[0];
   }
@@ -180,12 +157,9 @@ public class ConfigurationManager {
       throw new TaskDescriptionException("Job key " + job.getKey() + " is invalid.");
     }
 
-    if (job.isSetOwner()) {
-      assertOwnerValidity(job.getOwner());
-
-      if (!job.getKey().getRole().equals(job.getOwner().getRole())) {
-        throw new TaskDescriptionException("Role in job key must match job owner.");
-      }
+    if (job.isSetOwner() && !UserProvidedStrings.isGoodIdentifier(job.getOwner().getUser())) {
+      throw new TaskDescriptionException(
+          "Job user contains illegal characters: " + job.getOwner().getUser());
     }
 
     builder.setTaskConfig(
@@ -219,39 +193,13 @@ public class ConfigurationManager {
 
     maybeFillLinks(builder);
 
-    if (!UserProvidedStrings.isGoodIdentifier(config.getJobName())) {
-      throw new TaskDescriptionException(
-          "Job name contains illegal characters: " + config.getJobName());
-    }
-
-    if (!UserProvidedStrings.isGoodIdentifier(config.getEnvironment())) {
-      throw new TaskDescriptionException(
-          "Environment contains illegal characters: " + config.getEnvironment());
-    }
-
     if (config.isSetTier() && !UserProvidedStrings.isGoodIdentifier(config.getTier())) {
       throw new TaskDescriptionException("Tier contains illegal characters: " + config.getTier());
     }
 
-    if (config.isSetJob()) {
-      if (!JobKeys.isValid(config.getJob())) {
-        // Job key is set but invalid
-        throw new TaskDescriptionException("Job key " + config.getJob() + " is invalid.");
-      }
-
-      if (!config.getJob().getRole().equals(config.getOwner().getRole())) {
-        // Both owner and job key are set but don't match
-        throw new TaskDescriptionException("Role must match job owner.");
-      }
-    } else {
-      // TODO(maxim): Make sure both key and owner are populated to support older clients.
-      // Remove in 0.7.0. (AURORA-749).
-      // Job key is not set -> populate from owner, environment and name
-      assertOwnerValidity(config.getOwner());
-      builder.setJob(JobKeys.from(
-          config.getOwner().getRole(),
-          config.getEnvironment(),
-          config.getJobName()).newBuilder());
+    if (!JobKeys.isValid(config.getJob())) {
+      // Job key is set but invalid
+      throw new TaskDescriptionException("Job key " + config.getJob() + " is invalid.");
     }
 
     if (!builder.isSetExecutorConfig()) {
@@ -276,7 +224,7 @@ public class ConfigurationManager {
       }
 
       String dedicatedRole = getRole(valueConstraint);
-      if (!config.getOwner().getRole().equals(dedicatedRole)) {
+      if (!config.getJob().getRole().equals(dedicatedRole)) {
         throw new TaskDescriptionException(
             "Only " + dedicatedRole + " may use hosts dedicated for that role.");
       }

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java b/src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
index 16f2cb1..eb848ad 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
@@ -32,8 +32,6 @@ public final class DbTaskConfig {
   private long rowId;
   private JobKey job;
   private Identity owner;
-  private String environment;
-  private String jobName;
   private boolean isService;
   private double numCpus;
   private long ramMb;
@@ -61,8 +59,6 @@ public final class DbTaskConfig {
     return new TaskConfig()
         .setJob(job)
         .setOwner(owner)
-        .setEnvironment(environment)
-        .setJobName(jobName)
         .setIsService(isService)
         .setNumCpus(numCpus)
         .setRamMb(ramMb)

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
index 6767024..ae05cd4 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
@@ -919,12 +919,6 @@ class SchedulerThriftInterface implements AnnotatedAuroraAdmin {
   public Response startJobUpdate(JobUpdateRequest mutableRequest, @Nullable String message) {
     requireNonNull(mutableRequest);
 
-    // TODO(maxim): Switch to key field instead when AURORA-749 is fixed.
-    IJobKey job = JobKeys.assertValid(IJobKey.build(new JobKey()
-        .setRole(mutableRequest.getTaskConfig().getOwner().getRole())
-        .setEnvironment(mutableRequest.getTaskConfig().getEnvironment())
-        .setName(mutableRequest.getTaskConfig().getJobName())));
-
     if (!mutableRequest.getTaskConfig().isIsService()) {
       return invalidRequest(NON_SERVICE_TASK);
     }
@@ -965,6 +959,7 @@ class SchedulerThriftInterface implements AnnotatedAuroraAdmin {
     }
 
     return storage.write(storeProvider -> {
+      IJobKey job = request.getTaskConfig().getJob();
       if (getCronJob(storeProvider, job).isPresent()) {
         return invalidRequest(NO_CRON);
       }

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/python/apache/aurora/admin/admin.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/admin/admin.py b/src/main/python/apache/aurora/admin/admin.py
index b68f546..750b616 100644
--- a/src/main/python/apache/aurora/admin/admin.py
+++ b/src/main/python/apache/aurora/admin/admin.py
@@ -79,7 +79,7 @@ def make_admin_client(cluster):
 @app.command_option('--states', dest='states', default='RUNNING',
     help='Only match tasks with given state(s).')
 @app.command_option('-l', '--listformat', dest='listformat',
-    default="%role%/%jobName%/%instanceId% %status%",
+    default="%role%/%name%/%instanceId% %status%",
     help='Format string of job/task items to print out.')
 # TODO(ksweeney): Allow query by environment here.
 def query(args, options):
@@ -273,8 +273,8 @@ def scheduler_print_recovery_tasks(cluster):
   for task in resp.result.queryRecoveryResult.tasks:
     assigned = task.assignedTask
     conf = assigned.task
-    log.info('\t'.join((conf.job.role if conf.job else conf.owner.role,
-                        conf.job.name if conf.job else conf.jobName,
+    log.info('\t'.join((conf.job.role,
+                        conf.job.name,
                         str(assigned.instanceId),
                         ScheduleStatus._VALUES_TO_NAMES[task.status],
                         assigned.taskId)))

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/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 5855685..e282ec9 100644
--- a/src/main/python/apache/aurora/client/api/sla.py
+++ b/src/main/python/apache/aurora/client/api/sla.py
@@ -35,9 +35,9 @@ def job_key_from_scheduled(task, cluster):
   config = task.assignedTask.task
   return AuroraJobKey(
       cluster=cluster.name,
-      role=config.job.role if config.job else config.owner.role,
-      env=config.job.environment if config.job else config.environment,
-      name=config.job.name if config.job else config.jobName
+      role=config.job.role,
+      env=config.job.environment,
+      name=config.job.name
   )
 
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/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 deba3a9..67ab4f0 100644
--- a/src/main/python/apache/aurora/client/cli/jobs.py
+++ b/src/main/python/apache/aurora/client/cli/jobs.py
@@ -650,9 +650,9 @@ class StatusCommand(Verb):
       task_info = assigned_task.task
       task_strings = []
       task_strings.append("\tTask role: %s, env: %s, name: %s, instance: %s, status: %s on %s" %
-             (task_info.job.role if task_info.job else task_info.owner.role,
-              task_info.job.environment if task_info.job else task_info.environment,
-              task_info.job.name if task_info.job else task_info.jobName,
+             (task_info.job.role,
+              task_info.job.environment,
+              task_info.job.name,
               assigned_task.instanceId,
               ScheduleStatus._VALUES_TO_NAMES[scheduled_task.status],
               assigned_task.slaveHost))

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/python/apache/aurora/client/cli/task.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/task.py b/src/main/python/apache/aurora/client/cli/task.py
index b722cd8..a8a4edc 100644
--- a/src/main/python/apache/aurora/client/cli/task.py
+++ b/src/main/python/apache/aurora/client/cli/task.py
@@ -124,7 +124,7 @@ class SshCommand(Verb):
     ssh_command = ['ssh', '-t']
     ssh_command += context.options.ssh_options if context.options.ssh_options else []
     assigned = first_task.assignedTask
-    role = assigned.task.job.role if assigned.task.job else assigned.task.owner.role
+    role = assigned.task.job.role
     slave_host = assigned.slaveHost
 
     for tunnel in context.options.tunnels:

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/python/apache/aurora/config/thrift.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/config/thrift.py b/src/main/python/apache/aurora/config/thrift.py
index b40a7fd..be0cd68 100644
--- a/src/main/python/apache/aurora/config/thrift.py
+++ b/src/main/python/apache/aurora/config/thrift.py
@@ -176,7 +176,7 @@ THERMOS_TASK_ID_REF = Ref.from_address('thermos.task_id')
 def convert(job, metadata=frozenset(), ports=frozenset()):
   """Convert a Pystachio MesosJob to an Aurora Thrift JobConfiguration."""
 
-  owner = Identity(role=fully_interpolated(job.role()), user=getpass.getuser())
+  owner = Identity(user=getpass.getuser())
   key = JobKey(
     role=assert_valid_field('role', fully_interpolated(job.role())),
     environment=assert_valid_field('environment', fully_interpolated(job.environment())),
@@ -191,8 +191,6 @@ def convert(job, metadata=frozenset(), ports=frozenset()):
     return default if item is Empty else fully_interpolated(item)
 
   # job components
-  task.jobName = fully_interpolated(job.name())
-  task.environment = fully_interpolated(job.environment())
   task.production = fully_interpolated(job.production(), bool)
   task.isService = select_service_bit(job)
   task.maxTaskFailures = fully_interpolated(job.max_task_failures())

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/python/apache/aurora/executor/common/announcer.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/common/announcer.py b/src/main/python/apache/aurora/executor/common/announcer.py
index c89cf4c..34e36e0 100644
--- a/src/main/python/apache/aurora/executor/common/announcer.py
+++ b/src/main/python/apache/aurora/executor/common/announcer.py
@@ -121,10 +121,7 @@ class DefaultAnnouncerCheckerProvider(AnnouncerCheckerProvider):
 
   def make_zk_path(self, assigned_task):
     config = assigned_task.task
-    role, environment, name = (
-        config.job.role if config.job else config.owner.role,
-        config.job.environment if config.job else config.environment,
-        config.job.name if config.job else config.jobName)
+    role, environment, name = (config.job.role, config.job.environment, config.job.name)
     return posixpath.join(self.__root, role, environment, name)
 
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/python/apache/aurora/executor/common/sandbox.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/common/sandbox.py b/src/main/python/apache/aurora/executor/common/sandbox.py
index d4c366e..4780232 100644
--- a/src/main/python/apache/aurora/executor/common/sandbox.py
+++ b/src/main/python/apache/aurora/executor/common/sandbox.py
@@ -51,7 +51,7 @@ class SandboxInterface(Interface):
 
 class SandboxProvider(Interface):
   def _get_sandbox_user(self, assigned_task):
-    return assigned_task.task.job.role if assigned_task.task.job else assigned_task.task.owner.role
+    return assigned_task.task.job.role
 
   @abstractmethod
   def from_assigned_task(self, assigned_task):

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/resources/org/apache/aurora/scheduler/storage/db/CronJobMapper.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/storage/db/CronJobMapper.xml b/src/main/resources/org/apache/aurora/scheduler/storage/db/CronJobMapper.xml
index ee603f4..1434f45 100644
--- a/src/main/resources/org/apache/aurora/scheduler/storage/db/CronJobMapper.xml
+++ b/src/main/resources/org/apache/aurora/scheduler/storage/db/CronJobMapper.xml
@@ -65,7 +65,6 @@
       type="org.apache.aurora.scheduler.storage.db.views.DbJobConfiguration">
 
     <id column="c_id" />
-    <result property="owner.role" column="j_role"/>
     <result property="owner.user" column="creator_user"/>
     <result
         property="cronCollisionPolicy"

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml b/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml
index 4e8966d..b1394cf 100644
--- a/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml
+++ b/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml
@@ -128,9 +128,6 @@
 
   <resultMap id="taskConfigMap" type="org.apache.aurora.scheduler.storage.db.views.DbTaskConfig">
     <id column="id" property="rowId" />
-    <result column="j_role" property="owner.role"/>
-    <result column="j_environment" property="environment"/>
-    <result column="j_name" property="jobName"/>
     <result column="creator_user" property="owner.user"/>
     <result column="executor_name" property="executorConfig.name"/>
     <result column="executor_data" property="executorConfig.data"/>

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml b/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml
index db6c642..ae52c40 100644
--- a/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml
+++ b/src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml
@@ -121,9 +121,6 @@
       <if test="role != null">
         j.role = #{role}
       </if>
-      <if test="owner != null and owner.role != null">
-        AND j.role = #{owner.role}
-      </if>
       <if test="environment != null">
         AND j.environment = #{environment}
       </if>

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/resources/scheduler/assets/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/js/controllers.js b/src/main/resources/scheduler/assets/js/controllers.js
index dff6645..84417eb 100644
--- a/src/main/resources/scheduler/assets/js/controllers.js
+++ b/src/main/resources/scheduler/assets/js/controllers.js
@@ -133,7 +133,7 @@
             return {
               role: $scope.role, // required for roleEnvLink directive
               environment: summary.job.key.environment,
-              jobName: summary.job.taskConfig.jobName,
+              jobName: summary.job.key.name,
               jobType: getJobType(summary.job),
               isProduction: summary.job.taskConfig.production ? 'yes' : '',
               pendingTasks: summary.stats.pendingTaskCount,

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/main/resources/scheduler/assets/js/services.js
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/js/services.js b/src/main/resources/scheduler/assets/js/services.js
index f9e8580..1a76a3f 100644
--- a/src/main/resources/scheduler/assets/js/services.js
+++ b/src/main/resources/scheduler/assets/js/services.js
@@ -511,7 +511,7 @@
                   var job = summary.job;
                   return job.cronSchedule !== null &&
                     job.key.environment === env &&
-                    job.taskConfig.jobName === jobName;
+                    job.key.name === jobName;
                 })
                 .map(function (summary) {
                   var collisionPolicy =

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java b/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
index 317506e..d2789d0 100644
--- a/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
@@ -13,9 +13,9 @@
  */
 package org.apache.aurora.scheduler.configuration;
 
-import java.util.Arrays;
 import java.util.List;
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMultimap;
 import com.google.common.collect.ImmutableSet;
@@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableSet;
 import org.apache.aurora.gen.Constraint;
 import org.apache.aurora.gen.Container;
 import org.apache.aurora.gen.CronCollisionPolicy;
-import org.apache.aurora.gen.DockerContainer;
 import org.apache.aurora.gen.DockerParameter;
 import org.apache.aurora.gen.ExecutorConfig;
 import org.apache.aurora.gen.Identity;
@@ -33,6 +32,8 @@ import org.apache.aurora.gen.LimitConstraint;
 import org.apache.aurora.gen.TaskConfig;
 import org.apache.aurora.gen.TaskConstraint;
 import org.apache.aurora.gen.ValueConstraint;
+import org.apache.aurora.scheduler.base.JobKeys;
+import org.apache.aurora.scheduler.base.TaskTestUtil;
 import org.apache.aurora.scheduler.configuration.ConfigurationManager.TaskDescriptionException;
 import org.apache.aurora.scheduler.storage.entities.IDockerParameter;
 import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
@@ -69,9 +70,7 @@ public class ConfigurationManagerTest {
               .setIsService(false)
               .setTaskLinks(ImmutableMap.of())
               .setExecutorConfig(new ExecutorConfig("aurora", "config"))
-              .setEnvironment("devel")
               .setRequestedPorts(ImmutableSet.of())
-              .setJobName(null)
               .setPriority(0)
               .setOwner(null)
               .setContactEmail("foo@twitter.com")
@@ -97,19 +96,9 @@ public class ConfigurationManagerTest {
                           .setName(DEDICATED_ATTRIBUTE)
                           .setConstraint(TaskConstraint.value(new ValueConstraint(
                               false, ImmutableSet.of("foo"))))))
-              .setOwner(new Identity()
-                  .setRole("owner-role")
-                  .setUser("owner-user")));
-  private static final TaskConfig CONFIG_WITH_CONTAINER = ITaskConfig.build(new TaskConfig()
-      .setJobName("container-test")
-      .setEnvironment("devel")
-      .setExecutorConfig(new ExecutorConfig())
-      .setOwner(new Identity("role", "user"))
-      .setNumCpus(1)
-      .setRamMb(1)
-      .setDiskMb(1)
-      .setContainer(Container.docker(new DockerContainer("testimage"))))
-      .newBuilder();
+              .setOwner(new Identity().setUser("owner-user")));
+  private static final ITaskConfig CONFIG_WITH_CONTAINER =
+      TaskTestUtil.makeConfig(JobKeys.from("role", "env", "job"));
 
   private ConfigurationManager configurationManager;
   private ConfigurationManager dockerConfigurationManager;
@@ -135,7 +124,7 @@ public class ConfigurationManagerTest {
 
   @Test
   public void testBadContainerConfig() throws TaskDescriptionException {
-    TaskConfig taskConfig = CONFIG_WITH_CONTAINER.deepCopy();
+    TaskConfig taskConfig = CONFIG_WITH_CONTAINER.newBuilder();
     taskConfig.getContainer().getDocker().setImage(null);
 
     expectTaskDescriptionException("A container must specify an image");
@@ -144,7 +133,7 @@ public class ConfigurationManagerTest {
 
   @Test
   public void testDisallowedDockerParameters() throws TaskDescriptionException {
-    TaskConfig taskConfig = CONFIG_WITH_CONTAINER.deepCopy();
+    TaskConfig taskConfig = CONFIG_WITH_CONTAINER.newBuilder();
     taskConfig.getContainer().getDocker().addToParameters(new DockerParameter("foo", "bar"));
 
     ConfigurationManager noParamsManager = new ConfigurationManager(
@@ -157,8 +146,6 @@ public class ConfigurationManagerTest {
   @Test
   public void testInvalidTier() throws TaskDescriptionException {
     ITaskConfig config = ITaskConfig.build(UNSANITIZED_JOB_CONFIGURATION.deepCopy().getTaskConfig()
-        .setJobName("job")
-        .setEnvironment("env")
         .setTier("pr/d"));
 
     expectTaskDescriptionException("Tier contains illegal characters");
@@ -167,18 +154,20 @@ public class ConfigurationManagerTest {
 
   @Test
   public void testDefaultDockerParameters() throws TaskDescriptionException {
-    ITaskConfig result = dockerConfigurationManager.validateAndPopulate(
-        ITaskConfig.build(CONFIG_WITH_CONTAINER.deepCopy()));
+    TaskConfig builder = CONFIG_WITH_CONTAINER.newBuilder();
+    builder.getContainer().getDocker().setParameters(ImmutableList.of());
+
+    ITaskConfig result = dockerConfigurationManager.validateAndPopulate(ITaskConfig.build(builder));
 
     // The resulting task config should contain parameters supplied to the ConfigurationManager.
     List<IDockerParameter> params = result.getContainer().getDocker().getParameters();
     assertThat(
-        params, is(Arrays.asList(IDockerParameter.build(new DockerParameter("foo", "bar")))));
+        params, is(ImmutableList.of(IDockerParameter.build(new DockerParameter("foo", "bar")))));
   }
 
   @Test
   public void testPassthroughDockerParameters() throws TaskDescriptionException {
-    TaskConfig taskConfig = CONFIG_WITH_CONTAINER.deepCopy();
+    TaskConfig taskConfig = CONFIG_WITH_CONTAINER.newBuilder();
     DockerParameter userParameter = new DockerParameter("bar", "baz");
     taskConfig.getContainer().getDocker().getParameters().clear();
     taskConfig.getContainer().getDocker().addToParameters(userParameter);
@@ -188,8 +177,7 @@ public class ConfigurationManagerTest {
 
     // The resulting task config should contain parameters supplied from user config.
     List<IDockerParameter> params = result.getContainer().getDocker().getParameters();
-    assertThat(
-        params, is(Arrays.asList(IDockerParameter.build(userParameter))));
+    assertThat(params, is(ImmutableList.of(IDockerParameter.build(userParameter))));
   }
 
   private void expectTaskDescriptionException(String message) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java b/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java
index 3ce78e3..469b53b 100644
--- a/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java
@@ -57,9 +57,7 @@ public class CronIT extends EasyMockTest {
   public static final CrontabEntry CRONTAB_ENTRY = CrontabEntry.parse("* * * * *");
 
   private static final IJobKey JOB_KEY = JobKeys.from("roll", "b", "c");
-  private static final Identity IDENTITY = new Identity()
-      .setRole(JOB_KEY.getRole())
-      .setUser("user");
+  private static final Identity IDENTITY = new Identity().setUser("user");
 
   private static final IJobConfiguration CRON_JOB = IJobConfiguration.build(
       new JobConfiguration()

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/cron/quartz/QuartzTestUtil.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/cron/quartz/QuartzTestUtil.java b/src/test/java/org/apache/aurora/scheduler/cron/quartz/QuartzTestUtil.java
index ef9aae1..3c5ecd6 100644
--- a/src/test/java/org/apache/aurora/scheduler/cron/quartz/QuartzTestUtil.java
+++ b/src/test/java/org/apache/aurora/scheduler/cron/quartz/QuartzTestUtil.java
@@ -38,7 +38,7 @@ final class QuartzTestUtil {
       new JobConfiguration()
           .setCronSchedule("* * * * SUN")
           .setInstanceCount(10)
-          .setOwner(new Identity("role", "user"))
+          .setOwner(new Identity().setUser("user"))
           .setKey(AURORA_JOB_KEY.newBuilder())
           .setTaskConfig(TaskTestUtil.makeConfig(AURORA_JOB_KEY)
               .newBuilder()

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/preemptor/PreemptionVictimFilterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/preemptor/PreemptionVictimFilterTest.java b/src/test/java/org/apache/aurora/scheduler/preemptor/PreemptionVictimFilterTest.java
index ef20641..b6f5e46 100644
--- a/src/test/java/org/apache/aurora/scheduler/preemptor/PreemptionVictimFilterTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/preemptor/PreemptionVictimFilterTest.java
@@ -13,7 +13,6 @@
  */
 package org.apache.aurora.scheduler.preemptor;
 
-import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -21,13 +20,13 @@ import com.google.common.base.Optional;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
 
 import org.apache.aurora.common.quantity.Amount;
 import org.apache.aurora.common.quantity.Data;
 import org.apache.aurora.common.testing.easymock.EasyMockTest;
 import org.apache.aurora.gen.AssignedTask;
 import org.apache.aurora.gen.Attribute;
-import org.apache.aurora.gen.Constraint;
 import org.apache.aurora.gen.HostAttributes;
 import org.apache.aurora.gen.JobKey;
 import org.apache.aurora.gen.ScheduleStatus;
@@ -550,9 +549,7 @@ public class PreemptionVictimFilterTest extends EasyMockTest {
             .setJob(new JobKey(role, env, job))
             .setPriority(priority)
             .setProduction(production)
-            .setJobName(job)
-            .setEnvironment(env)
-            .setConstraints(new HashSet<Constraint>()));
+            .setConstraints(Sets.newHashSet()));
     return new ScheduledTask().setAssignedTask(assignedTask);
   }
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java b/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
index 22a6b43..c316e49 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
@@ -138,7 +138,7 @@ public abstract class AbstractCronJobStoreTest {
         IJobConfiguration.build(
             new JobConfiguration()
                 .setKey(job.newBuilder())
-                .setOwner(new Identity(job.getRole(), "user"))
+                .setOwner(new Identity().setUser("user"))
                 .setCronSchedule("schedule")
                 .setCronCollisionPolicy(CronCollisionPolicy.CANCEL_NEW)
                 .setTaskConfig(config.newBuilder())

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
index 0443bb3..0256c06 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java
@@ -39,9 +39,7 @@ import org.apache.aurora.common.testing.easymock.EasyMockTest;
 import org.apache.aurora.gen.AssignedTask;
 import org.apache.aurora.gen.Attribute;
 import org.apache.aurora.gen.HostAttributes;
-import org.apache.aurora.gen.ScheduleStatus;
 import org.apache.aurora.gen.ScheduledTask;
-import org.apache.aurora.gen.TaskConfig;
 import org.apache.aurora.gen.storage.DeduplicatedSnapshot;
 import org.apache.aurora.gen.storage.Frame;
 import org.apache.aurora.gen.storage.FrameChunk;
@@ -56,6 +54,7 @@ import org.apache.aurora.gen.storage.Snapshot;
 import org.apache.aurora.gen.storage.Transaction;
 import org.apache.aurora.gen.storage.storageConstants;
 import org.apache.aurora.scheduler.base.JobKeys;
+import org.apache.aurora.scheduler.base.TaskTestUtil;
 import org.apache.aurora.scheduler.log.Log.Entry;
 import org.apache.aurora.scheduler.log.Log.Position;
 import org.apache.aurora.scheduler.log.Log.Stream;
@@ -514,10 +513,7 @@ public class LogManagerTest extends EasyMockTest {
         .setTimestamp(1L)
         .setHostAttributes(ImmutableSet.of(new HostAttributes("host",
             ImmutableSet.of(new Attribute("hostname", ImmutableSet.of("abc"))))))
-        .setTasks(ImmutableSet.of(
-            new ScheduledTask().setStatus(ScheduleStatus.RUNNING)
-                .setAssignedTask(new AssignedTask().setTaskId("task_id")
-                    .setTask(new TaskConfig().setJobName("job_name")))));
+        .setTasks(ImmutableSet.of(TaskTestUtil.makeTask("task_id", TaskTestUtil.JOB).newBuilder()));
   }
 
   private SaveTasks createSaveTasks(String... taskIds) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java b/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java
index e456056..be98f38 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java
@@ -62,7 +62,7 @@ import static org.junit.Assert.assertEquals;
 final class Fixtures {
   static final String ROLE = "bar_role";
   static final String USER = "foo_user";
-  static final Identity ROLE_IDENTITY = new Identity(ROLE, USER);
+  static final Identity IDENTITY = new Identity().setUser(USER);
   static final String JOB_NAME = "job_foo";
   static final IJobKey JOB_KEY = JobKeys.from(ROLE, "devel", JOB_NAME);
   static final ILockKey LOCK_KEY = ILockKey.build(LockKey.job(JOB_KEY.newBuilder()));
@@ -94,7 +94,7 @@ final class Fixtures {
 
   static JobConfiguration makeJob(TaskConfig task, int shardCount) {
     return new JobConfiguration()
-        .setOwner(ROLE_IDENTITY)
+        .setOwner(IDENTITY)
         .setInstanceCount(shardCount)
         .setTaskConfig(task)
         .setKey(JOB_KEY.newBuilder());
@@ -103,9 +103,7 @@ final class Fixtures {
   static TaskConfig defaultTask(boolean production) {
     return new TaskConfig()
         .setJob(JOB_KEY.newBuilder())
-        .setOwner(new Identity(ROLE, USER))
-        .setEnvironment("devel")
-        .setJobName(JOB_NAME)
+        .setOwner(IDENTITY)
         .setContactEmail("testing@twitter.com")
         .setExecutorConfig(new ExecutorConfig("aurora", "data"))
         .setNumCpus(1)

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
index 0428c77..3ba0342 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java
@@ -98,11 +98,11 @@ import static org.apache.aurora.scheduler.base.Numbers.convertRanges;
 import static org.apache.aurora.scheduler.base.Numbers.toRanges;
 import static org.apache.aurora.scheduler.thrift.Fixtures.CRON_JOB;
 import static org.apache.aurora.scheduler.thrift.Fixtures.CRON_SCHEDULE;
+import static org.apache.aurora.scheduler.thrift.Fixtures.IDENTITY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.JOB_KEY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.LOCK;
 import static org.apache.aurora.scheduler.thrift.Fixtures.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.UPDATE_KEY;
 import static org.apache.aurora.scheduler.thrift.Fixtures.USER;
 import static org.apache.aurora.scheduler.thrift.Fixtures.assertOkResponse;
@@ -148,27 +148,21 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
   @Test
   public void testGetJobSummary() throws Exception {
     long nextCronRunMs = 100;
-    TaskConfig ownedCronJobTask = nonProductionTask()
-        .setJob(JOB_KEY.newBuilder())
-        .setJobName(JOB_KEY.getName())
-        .setOwner(ROLE_IDENTITY)
-        .setEnvironment(JOB_KEY.getEnvironment());
+    TaskConfig ownedCronJobTask = nonProductionTask().setJob(JOB_KEY.newBuilder());
     JobConfiguration ownedCronJob = makeJob()
         .setCronSchedule(CRON_SCHEDULE)
         .setTaskConfig(ownedCronJobTask);
     IScheduledTask ownedCronJobScheduledTask = IScheduledTask.build(new ScheduledTask()
         .setAssignedTask(new AssignedTask().setTask(ownedCronJobTask))
         .setStatus(ScheduleStatus.ASSIGNED));
-    Identity otherOwner = new Identity("other", "other");
+    Identity otherOwner = new Identity().setUser("other");
     JobConfiguration unownedCronJob = makeJob()
         .setOwner(otherOwner)
         .setCronSchedule(CRON_SCHEDULE)
         .setKey(JOB_KEY.newBuilder().setRole("other"))
         .setTaskConfig(ownedCronJobTask.deepCopy().setOwner(otherOwner));
     TaskConfig ownedImmediateTaskInfo = defaultTask(false)
-        .setJob(JOB_KEY.newBuilder().setName("immediate"))
-        .setJobName("immediate")
-        .setOwner(ROLE_IDENTITY);
+        .setJob(JOB_KEY.newBuilder().setName("immediate"));
     Set<JobConfiguration> ownedCronJobOnly = ImmutableSet.of(ownedCronJob);
     Set<JobSummary> ownedCronJobSummaryOnly = ImmutableSet.of(
         new JobSummary()
@@ -188,7 +182,7 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
         .setStatus(ScheduleStatus.ASSIGNED));
     JobConfiguration ownedImmediateJob = new JobConfiguration()
         .setKey(JOB_KEY.newBuilder().setName("immediate"))
-        .setOwner(ROLE_IDENTITY)
+        .setOwner(IDENTITY)
         .setInstanceCount(1)
         .setTaskConfig(ownedImmediateTaskInfo);
     Builder query = Query.roleScoped(ROLE);
@@ -243,9 +237,8 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
     String cronSchedule = "* * 31 2 *";
 
     TaskConfig task = nonProductionTask()
-        .setJobName(JOB_KEY.getName())
-        .setOwner(ROLE_IDENTITY)
-        .setEnvironment(JOB_KEY.getEnvironment());
+        .setJob(JOB_KEY.newBuilder())
+        .setOwner(IDENTITY);
     JobConfiguration job = makeJob()
         .setCronSchedule(cronSchedule)
         .setTaskConfig(task);
@@ -393,15 +386,13 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
         .setKey(jobKey2)
         .setTaskConfig(nonProductionTask());
     TaskConfig immediateTaskConfig = defaultTask(false)
-        .setJob(JOB_KEY.newBuilder().setName("immediate"))
-        .setJobName("immediate")
-        .setOwner(ROLE_IDENTITY);
+        .setJob(JOB_KEY.newBuilder().setName("immediate"));
     IScheduledTask immediateTask = IScheduledTask.build(new ScheduledTask()
         .setAssignedTask(new AssignedTask().setTask(immediateTaskConfig))
         .setStatus(ScheduleStatus.ASSIGNED));
     JobConfiguration immediateJob = new JobConfiguration()
         .setKey(JOB_KEY.newBuilder().setName("immediate"))
-        .setOwner(ROLE_IDENTITY)
+        .setOwner(IDENTITY)
         .setInstanceCount(1)
         .setTaskConfig(immediateTaskConfig);
 
@@ -421,26 +412,21 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
 
   @Test
   public void testGetJobs() throws Exception {
-    TaskConfig ownedCronJobTask = nonProductionTask()
-        .setJobName(JOB_KEY.getName())
-        .setOwner(ROLE_IDENTITY)
-        .setEnvironment(JOB_KEY.getEnvironment());
+    TaskConfig ownedCronJobTask = nonProductionTask();
     JobConfiguration ownedCronJob = makeJob()
         .setCronSchedule(CRON_SCHEDULE)
         .setTaskConfig(ownedCronJobTask);
     IScheduledTask ownedCronJobScheduledTask = IScheduledTask.build(new ScheduledTask()
         .setAssignedTask(new AssignedTask().setTask(ownedCronJobTask))
         .setStatus(ScheduleStatus.ASSIGNED));
-    Identity otherOwner = new Identity("other", "other");
+    Identity otherOwner = new Identity().setUser("other");
     JobConfiguration unownedCronJob = makeJob()
         .setOwner(otherOwner)
         .setCronSchedule(CRON_SCHEDULE)
         .setKey(JOB_KEY.newBuilder().setRole("other"))
         .setTaskConfig(ownedCronJobTask.deepCopy().setOwner(otherOwner));
     TaskConfig ownedImmediateTaskInfo = defaultTask(false)
-        .setJob(JOB_KEY.newBuilder().setName("immediate"))
-        .setJobName("immediate")
-        .setOwner(ROLE_IDENTITY);
+        .setJob(JOB_KEY.newBuilder().setName("immediate"));
     Set<JobConfiguration> ownedCronJobOnly = ImmutableSet.of(ownedCronJob);
     Set<JobConfiguration> unownedCronJobOnly = ImmutableSet.of(unownedCronJob);
     Set<JobConfiguration> bothCronJobs = ImmutableSet.of(ownedCronJob, unownedCronJob);
@@ -449,7 +435,7 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
         .setStatus(ScheduleStatus.ASSIGNED));
     JobConfiguration ownedImmediateJob = new JobConfiguration()
         .setKey(JOB_KEY.newBuilder().setName("immediate"))
-        .setOwner(ROLE_IDENTITY)
+        .setOwner(IDENTITY)
         .setInstanceCount(1)
         .setTaskConfig(ownedImmediateTaskInfo);
     Query.Builder query = Query.roleScoped(ROLE).active();
@@ -649,8 +635,8 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
 
   @Test
   public void testGetRoleSummary() throws Exception {
-    final String BAZ_ROLE = "baz_role";
-    final Identity BAZ_ROLE_IDENTITY = new Identity(BAZ_ROLE, USER);
+    String bazRole = "baz_role";
+    Identity bazRoleIdentity = new Identity().setUser(USER);
 
     JobConfiguration cronJobOne = makeJob()
         .setCronSchedule("1 * * * *")
@@ -663,32 +649,28 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
 
     JobConfiguration cronJobThree = makeJob()
         .setCronSchedule("3 * * * *")
-        .setKey(JOB_KEY.newBuilder().setRole(BAZ_ROLE))
+        .setKey(JOB_KEY.newBuilder().setRole(bazRole))
         .setTaskConfig(nonProductionTask())
-        .setOwner(BAZ_ROLE_IDENTITY);
+        .setOwner(bazRoleIdentity);
 
     Set<JobConfiguration> crons = ImmutableSet.of(cronJobOne, cronJobTwo, cronJobThree);
 
     TaskConfig immediateTaskConfig = defaultTask(false)
-        .setJob(JOB_KEY.newBuilder().setName("immediate"))
-        .setJobName("immediate")
-        .setOwner(ROLE_IDENTITY);
+        .setJob(JOB_KEY.newBuilder().setName("immediate"));
     IScheduledTask task1 = IScheduledTask.build(new ScheduledTask()
         .setAssignedTask(new AssignedTask().setTask(immediateTaskConfig)));
     IScheduledTask task2 = IScheduledTask.build(new ScheduledTask()
         .setAssignedTask(new AssignedTask().setTask(immediateTaskConfig.setNumCpus(2))));
 
     TaskConfig immediateTaskConfigTwo = defaultTask(false)
-        .setJob(JOB_KEY.newBuilder().setRole(BAZ_ROLE_IDENTITY.getRole()).setName("immediateTwo"))
-        .setJobName("immediateTwo")
-        .setOwner(BAZ_ROLE_IDENTITY);
+        .setJob(JOB_KEY.newBuilder().setRole(bazRole).setName("immediateTwo"))
+        .setOwner(bazRoleIdentity);
     IScheduledTask task3 = IScheduledTask.build(new ScheduledTask()
         .setAssignedTask(new AssignedTask().setTask(immediateTaskConfigTwo)));
 
     TaskConfig immediateTaskConfigThree = defaultTask(false)
-        .setJob(JOB_KEY.newBuilder().setRole(BAZ_ROLE_IDENTITY.getRole()).setName("immediateThree"))
-        .setJobName("immediateThree")
-        .setOwner(BAZ_ROLE_IDENTITY);
+        .setJob(JOB_KEY.newBuilder().setRole(bazRole).setName("immediateThree"))
+        .setOwner(bazRoleIdentity);
     IScheduledTask task4 = IScheduledTask.build(new ScheduledTask()
         .setAssignedTask(new AssignedTask().setTask(immediateTaskConfigThree)));
 
@@ -702,7 +684,7 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest {
     expectedResult.addToSummaries(
         new RoleSummary().setRole(ROLE).setCronJobCount(2).setJobCount(1));
     expectedResult.addToSummaries(
-        new RoleSummary().setRole(BAZ_ROLE).setCronJobCount(1).setJobCount(2));
+        new RoleSummary().setRole(bazRole).setCronJobCount(1).setJobCount(2));
 
     control.replay();
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/89fad5a8/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..2b0451b 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() {
@@ -679,7 +671,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
   @Test
   public void testKillTasksInvalidJobName() throws Exception {
     TaskQuery query = new TaskQuery()
-        .setOwner(ROLE_IDENTITY)
+        .setOwner(IDENTITY)
         .setJobName("");
 
     control.replay();
@@ -874,10 +866,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 +955,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 +1067,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 +1086,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 +1109,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 +1131,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 +1191,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 +1305,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 +1575,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 +1644,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 +2123,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/89fad5a8/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/89fad5a8/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/89fad5a8/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/89fad5a8/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/89fad5a8/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/89fad5a8/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/89fad5a8/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/89fad5a8/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/89fad5a8/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/89fad5a8/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