Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use _resolve_element method in config load #99

Merged
merged 5 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
hsheth2 marked this conversation as resolved.
Show resolved Hide resolved
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 _resolve_element, load_config_file

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
Loading