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: upgrade config loading logic to new acryl-datahub #109

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading