Skip to content

Commit

Permalink
fix(ingest): ensure that LookML files are always parsed in the same o…
Browse files Browse the repository at this point in the history
…rder (#2966)
  • Loading branch information
jameslamb authored Jul 29, 2021
1 parent e88ccd9 commit acffd8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions metadata-ingestion/src/datahub/ingestion/source/lookml.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ def resolve_includes(
# Need to handle a relative path.
glob_expr = str(pathlib.Path(path).parent / inc)
# "**" matches an arbitrary number of directories in LookML
outputs = glob.glob(glob_expr, recursive=True) + glob.glob(
f"{glob_expr}.lkml", recursive=True
outputs = sorted(
glob.glob(glob_expr, recursive=True)
+ glob.glob(f"{glob_expr}.lkml", recursive=True)
)
if "*" not in inc and not outputs:
reporter.report_failure(path, f"cannot resolve include {inc}")
Expand Down

0 comments on commit acffd8f

Please sign in to comment.