diff --git a/job-controller/src/main/java/feast/jobcontroller/runner/dataflow/DataflowJobManager.java b/job-controller/src/main/java/feast/jobcontroller/runner/dataflow/DataflowJobManager.java index 4ceb8f50b8..38be7522fd 100644 --- a/job-controller/src/main/java/feast/jobcontroller/runner/dataflow/DataflowJobManager.java +++ b/job-controller/src/main/java/feast/jobcontroller/runner/dataflow/DataflowJobManager.java @@ -304,6 +304,10 @@ public List listRunningJobs() { .setStores( stores.stream() .collect(Collectors.toMap(StoreProto.Store::getName, s -> s))) + .setLabels( + dfJob.getLabels() == null + ? new HashMap<>() + : new HashMap<>(dfJob.getLabels())) .build(); job.setExtId(dfJob.getId()); diff --git a/job-controller/src/test/java/feast/jobcontroller/runner/dataflow/DataflowJobManagerTest.java b/job-controller/src/test/java/feast/jobcontroller/runner/dataflow/DataflowJobManagerTest.java index 5ac80788a5..7cf922febb 100644 --- a/job-controller/src/test/java/feast/jobcontroller/runner/dataflow/DataflowJobManagerTest.java +++ b/job-controller/src/test/java/feast/jobcontroller/runner/dataflow/DataflowJobManagerTest.java @@ -275,7 +275,8 @@ public void shouldRetrieveRunningJobsFromDataflow() { hasProperty("stores", hasValue(store)), hasProperty("extId", equalTo("job-2")), hasProperty("created", equalTo(created.toDate())), - hasProperty("lastUpdated", equalTo(created.toDate()))))); + hasProperty("lastUpdated", equalTo(created.toDate())), + hasProperty("labels", hasEntry("application", "feast"))))); } @Test