Skip to content

Commit

Permalink
fix(titus): Store application ref for server groups and instances (#4992
Browse files Browse the repository at this point in the history
)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
robzienert and mergify[bot] committed Oct 7, 2020
1 parent ad84606 commit 7f81bdd
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -737,6 +737,7 @@ private void cacheServerGroup(ServerGroupData data, Map<String, CacheData> serve
attributes.put("region", region.getName());
attributes.put("account", account.getName());
attributes.put("targetGroups", data.targetGroupNames);
attributes.put("application", data.name.getApp());

Map<String, Collection<String>> relationships = serverGroupCache.getRelationships();
relationships.computeIfAbsent(APPLICATIONS.ns, key -> new HashSet<>()).add(data.appNameKey);
Expand Down Expand Up @@ -766,6 +767,7 @@ private void cacheInstance(InstanceData data, Map<String, CacheData> instances)
instanceCache.getAttributes().put(HEALTH.ns, singletonList(getTitusHealth(data.task)));
instanceCache.getAttributes().put("task", data.task);
instanceCache.getAttributes().put("jobId", data.jobId);
instanceCache.getAttributes().put("application", Names.parseName(data.serverGroup).getApp());

if (!data.serverGroup.isEmpty()) {
instanceCache
Expand Down

0 comments on commit 7f81bdd

Please sign in to comment.