Skip to content

Commit

Permalink
fix: use _resolve_element method in config load
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Sep 20, 2023
1 parent 4ffe4e6 commit 7c57220
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions datahub-actions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def get_long_description():

return description


acryl_datahub_min_version = os.environ.get("ACRYL_DATAHUB_MIN_VERSION", "0.9.4")

acryl_datahub_min_version = os.environ.get("ACRYL_DATAHUB_MIN_VERSION") or "0.10.3"
Expand Down Expand Up @@ -74,7 +75,7 @@ def get_long_description():
"kafka": set(), # included by default
# Action Plugins
"executor": {
"acryl-executor==0.0.3.11",
"acryl-executor==0.0.3.12",
},
"slack": {
"slack-bolt>=1.15.5",
Expand All @@ -84,7 +85,9 @@ def get_long_description():
},
"tag_propagation": set(),
"term_propagation": set(),
"snowflake_tag_propagation": {f"acryl-datahub[snowflake]>={acryl_datahub_min_version}"}
"snowflake_tag_propagation": {
f"acryl-datahub[snowflake]>={acryl_datahub_min_version}"
}
# Transformer Plugins (None yet)
}

Expand Down
6 changes: 3 additions & 3 deletions datahub-actions/src/datahub_actions/cli/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import click
from click_default_group import DefaultGroup
from datahub.configuration.config_loader import load_config_file, resolve_element
from datahub.configuration.config_loader import load_config_file, _resolve_element

import datahub_actions as datahub_actions_package
from datahub_actions.pipeline.pipeline import Pipeline
Expand All @@ -37,7 +37,7 @@

def best_effort_resolve_element(x: str) -> str:
try:
return resolve_element(x)
return _resolve_element(x)
except Exception:
return x

Expand Down Expand Up @@ -94,7 +94,7 @@ def run(ctx: Any, config: List[str], debug: bool) -> None:
for pipeline_config in config:
pipeline_config_file = pathlib.Path(pipeline_config)
with unittest.mock.patch(
"datahub.configuration.config_loader.resolve_element"
"datahub.configuration.config_loader._resolve_element"
) as mock_resolve_element:
mock_resolve_element.side_effect = best_effort_resolve_element
pipeline_config_dict = load_config_file(pipeline_config_file)
Expand Down

0 comments on commit 7c57220

Please sign in to comment.