Code0x58 commented on code in PR #3830:
URL: https://github.com/apache/incubator-heron/pull/3830#discussion_r895150253
##########
heron/tools/tracker/src/python/tracker.py:
##########
@@ -64,17 +66,18 @@ def sync_topologies(self) -> None:
def on_topologies_watch(state_manager: StateManager, topologies:
List[str]) -> None:
"""watch topologies"""
topologies = set(topologies)
- Log.info("State watch triggered for topologies.")
- Log.debug("Topologies: %s", topologies)
- cached_names = {t.name for t in
self.get_stmgr_topologies(state_manager.name)}
- Log.debug("Existing topologies: %s", cached_names)
- for name in cached_names - topologies:
- Log.info("Removing topology: %s in rootpath: %s",
- name, state_manager.rootpath)
- self.remove_topology(name, state_manager.name)
-
- for name in topologies - cached_names:
- self.add_new_topology(state_manager, name)
+ Log.info(f"State watch triggered for topologies of
{state_manager.name}.")
+ Log.debug(f"Received topologies: {state_manager.name}, {topologies}")
Review Comment:
is that the case for things like `Log.debug("Existing topologies: %s",
cached_names")`? That is different from `Log.debug("Existing topologies: %s" %
cached_names)` which is where I'd expect to see what linter warning (and a
warning about using a pre-formatted string in a log method, but maybe my
styling there is out of date)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]