You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by ni...@apache.org on 2021/06/15 05:14:35 UTC

[incubator-heron] branch master updated: Fix extra.links of heron-tracker (#3696)

This is an automated email from the ASF dual-hosted git repository.

nicknezis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/master by this push:
     new addbb35  Fix extra.links of heron-tracker (#3696)
addbb35 is described below

commit addbb35a30526a66fe4526169020f731ae601946
Author: choi se <th...@gmail.com>
AuthorDate: Tue Jun 15 14:14:25 2021 +0900

    Fix extra.links of heron-tracker (#3696)
---
 heron/tools/tracker/src/python/config.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/heron/tools/tracker/src/python/config.py b/heron/tools/tracker/src/python/config.py
index b3057c7..9190f0f 100644
--- a/heron/tools/tracker/src/python/config.py
+++ b/heron/tools/tracker/src/python/config.py
@@ -50,13 +50,14 @@ class Config:
       for extra_link in self.configs[EXTRA_LINKS_KEY]:
         self.extra_links.append(self.validate_extra_link(extra_link))
 
-  def validate_extra_link(self, extra_link: dict) -> None:
+  def validate_extra_link(self, extra_link: dict):
     """validate extra link"""
     if EXTRA_LINK_NAME_KEY not in extra_link or EXTRA_LINK_FORMATTER_KEY not in extra_link:
       raise Exception("Invalid extra.links format. " +
                       "Extra link must include a 'name' and 'formatter' field")
 
     self.validated_formatter(extra_link[EXTRA_LINK_FORMATTER_KEY])
+    return extra_link
 
   def validated_formatter(self, url_format: str) -> None:
     """Check visualization url format has no unrecongnised parameters."""
@@ -97,4 +98,4 @@ class Config:
   @staticmethod
   def config_str(config):
     keys = ("type", "name", "hostport", "rootpath", "tunnelhost")
-    return "".join("\t{k}: {config[k]}\n" for k in keys if k in config).rstrip()
+    return "".join("\t{}: {}\n".format(k, config[k]) for k in keys if k in config).rstrip()