|
101 | 101 | if full_repo_configs_module is not None:
|
102 | 102 | try:
|
103 | 103 | module = importlib.import_module(full_repo_configs_module)
|
104 |
| - AVAILABLE_ONLINE_STORES = getattr(module, "AVAILABLE_ONLINE_STORES") |
105 |
| - AVAILABLE_OFFLINE_STORES = getattr(module, "AVAILABLE_OFFLINE_STORES") |
106 |
| - except Exception as e: |
| 104 | + except ImportError as e: |
107 | 105 | raise FeastModuleImportError(
|
108 |
| - "FULL_REPO_CONFIGS", full_repo_configs_module |
| 106 | + full_repo_configs_module, "FULL_REPO_CONFIGS" |
109 | 107 | ) from e
|
110 | 108 |
|
| 109 | + try: |
| 110 | + AVAILABLE_ONLINE_STORES = getattr(module, "AVAILABLE_ONLINE_STORES") |
| 111 | + AVAILABLE_OFFLINE_STORES = getattr(module, "AVAILABLE_OFFLINE_STORES") |
| 112 | + except AttributeError: |
| 113 | + try: |
| 114 | + FULL_REPO_CONFIGS: List[IntegrationTestRepoConfig] = getattr( |
| 115 | + module, "FULL_REPO_CONFIGS" |
| 116 | + ) |
| 117 | + except AttributeError as e: |
| 118 | + raise FeastModuleImportError( |
| 119 | + full_repo_configs_module, "FULL_REPO_CONFIGS" |
| 120 | + ) from e |
| 121 | + |
| 122 | + AVAILABLE_OFFLINE_STORES = [ |
| 123 | + (config.provider, config.offline_store_creator) |
| 124 | + for config in FULL_REPO_CONFIGS |
| 125 | + ] |
| 126 | + AVAILABLE_OFFLINE_STORES = list(set(AVAILABLE_OFFLINE_STORES)) # unique only |
| 127 | + |
| 128 | + AVAILABLE_ONLINE_STORES = { |
| 129 | + c.online_store["type"] |
| 130 | + if isinstance(c.online_store, dict) |
| 131 | + else c.online_store: (c.online_store, c.online_store_creator) |
| 132 | + for c in FULL_REPO_CONFIGS |
| 133 | + } |
| 134 | + |
111 | 135 |
|
112 | 136 | if os.getenv("FEAST_LOCAL_ONLINE_CONTAINER", "False").lower() == "true":
|
113 | 137 | replacements: Dict[
|
|
0 commit comments