diff --git a/requirements.txt b/requirements.txt index dfd534ef..0d6fc737 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cdislogging==1.0.0 cryptography>=2.1.2 -dictionaryutils==3.0.1 +dictionaryutils==3.0.2 elasticsearch==6.3.1 elasticsearch-dsl==6.2.1 gen3datamodel==3.0.2 diff --git a/setup.py b/setup.py index b5b64bd2..c8dbc363 100644 --- a/setup.py +++ b/setup.py @@ -5,9 +5,9 @@ version='0.0.1', install_requires=[ "cryptography>=2.1.2", - "dictionaryutils~=3.0.0", + "dictionaryutils~=3.0.2", "hdfs==2.1.0", - "gen3datamodel~=3.0.0", + "gen3datamodel~=3.0.2", "psqlgraph~=3.0.0", "psycopg2~=2.8.4", "pyspark~=2.4.4", diff --git a/tube/etl/indexers/injection/parser.py b/tube/etl/indexers/injection/parser.py index b6accbc3..7e3a6381 100644 --- a/tube/etl/indexers/injection/parser.py +++ b/tube/etl/indexers/injection/parser.py @@ -110,9 +110,9 @@ def update_level(self): just_assigned = set([]) for root in self.roots: for child in root.children: + child.level = level if len(child.children) == 0 or child in just_assigned: continue - child.level = level just_assigned.add(child) assigned_levels = assigned_levels.union(just_assigned) @@ -123,22 +123,10 @@ def update_level(self): new_assigned = set([]) for collector in just_assigned: for child in collector.children: - # TODO: PXP-5067 investigate int-string comparison in node lvls - # (Why were we assigning edge tbl names to leaf node lvls?) - - # For now, commenting this out... - #if len(child.children) == 0 or child in assigned_levels: - # continue - #child.level = level - #new_assigned.add(child) - - # ...and proposing this fix: - if child in assigned_levels: - continue + if len(child.children) == 0 or child in assigned_levels: + continue child.level = level - if len(child.children) != 0: - new_assigned.add(child) - + new_assigned.add(child) just_assigned = new_assigned assigned_levels = assigned_levels.union(new_assigned) level += 1 @@ -174,7 +162,7 @@ def construct_reversed_collection_tree(self, flat_paths): segments = list(p.path) _, edge_up_tbl = get_edge_table(self.model, p.src, segments[0]) if p.src not in collectors: - collectors[p.src] = CollectingNode(p.src, edge_up_tbl) + collectors[p.src] = CollectingNode(p.src) child = collectors[p.src] if len(segments) > 1: for fst in segments[0:len(segments)-1]: @@ -205,7 +193,7 @@ def construct_auth_path_tree(self, flat_paths): segments = list(p.path) _, edge_up_tbl = get_edge_table(self.model, p.src, segments[0]) if p.src not in collectors: - collectors[p.src] = CollectingNode(p.src, edge_up_tbl) + collectors[p.src] = CollectingNode(p.src) child = collectors[p.src] if len(segments) > 1: for node in segments[0:len(segments)-2]: