Skip to content

Commit

Permalink
fix: upgrade config loading logic to new acryl-datahub
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Jan 24, 2024
1 parent 8a16628 commit 96d2d41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions datahub-actions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def get_long_description():
return description


acryl_datahub_min_version = os.environ.get("ACRYL_DATAHUB_MIN_VERSION") or "0.11.0"
acryl_datahub_min_version = os.environ.get("ACRYL_DATAHUB_MIN_VERSION") or "0.12.1.2"

base_requirements = {
f"acryl-datahub[kafka]>={acryl_datahub_min_version},<=0.12.1.2",
f"acryl-datahub[kafka]>={acryl_datahub_min_version}",
# Compatibility.
"typing_extensions>=3.7.4; python_version < '3.8'",
"mypy_extensions>=0.4.3",
Expand Down
10 changes: 7 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,11 @@

import click
from click_default_group import DefaultGroup
from datahub.configuration.config_loader import _resolve_element, load_config_file
from datahub.configuration.config_loader import (
Environ,
_resolve_element,
load_config_file,
)

import datahub_actions as datahub_actions_package
from datahub_actions.pipeline.pipeline import Pipeline
Expand All @@ -35,9 +39,9 @@
pipeline_manager = PipelineManager()


def best_effort_resolve_element(x: str) -> str:
def best_effort_resolve_element(x: str, environ: Environ) -> str:
try:
return _resolve_element(x)
return _resolve_element(x, environ=environ)
except Exception:
return x

Expand Down

0 comments on commit 96d2d41

Please sign in to comment.