Skip to content

Commit 680a489

Browse files
Raise import error when repo configs module cannot be imported (#2065)
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
1 parent 2729f17 commit 680a489

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sdk/python/tests/integration/feature_repos/repo_configuration.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from feast import FeatureStore, FeatureView, RepoConfig, driver_test_data
1616
from feast.constants import FULL_REPO_CONFIGS_MODULE_ENV_NAME
1717
from feast.data_source import DataSource
18+
from feast.errors import FeastModuleImportError
1819
from tests.integration.feature_repos.integration_test_repo_config import (
1920
IntegrationTestRepoConfig,
2021
)
@@ -86,8 +87,10 @@
8687
try:
8788
module = importlib.import_module(full_repo_configs_module)
8889
FULL_REPO_CONFIGS = getattr(module, "FULL_REPO_CONFIGS")
89-
except Exception:
90-
FULL_REPO_CONFIGS = DEFAULT_FULL_REPO_CONFIGS
90+
except Exception as e:
91+
raise FeastModuleImportError(
92+
"FULL_REPO_CONFIGS", full_repo_configs_module
93+
) from e
9194
else:
9295
FULL_REPO_CONFIGS = DEFAULT_FULL_REPO_CONFIGS
9396

0 commit comments

Comments
 (0)