Skip to content

Commit

Permalink
fetch job labels from dataflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pyalex committed Sep 1, 2020
1 parent a926e6f commit 2f0c9e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ public List<Job> 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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f0c9e9

Please sign in to comment.