(
repo_config: RepoConfig,
repo_path: Path,
skip_source_validation: bool,
skip_feature_view_validation: bool = False,
)
| 242 | |
| 243 | |
| 244 | def plan( |
| 245 | repo_config: RepoConfig, |
| 246 | repo_path: Path, |
| 247 | skip_source_validation: bool, |
| 248 | skip_feature_view_validation: bool = False, |
| 249 | ): |
| 250 | os.chdir(repo_path) |
| 251 | repo = _get_repo_contents(repo_path, repo_config.project, repo_config) |
| 252 | for project in repo.projects: |
| 253 | repo_config.project = project.name |
| 254 | store, registry = _get_store_and_registry(repo_config) |
| 255 | # TODO: When we support multiple projects in a single repo, we should filter repo contents by project |
| 256 | if not skip_source_validation: |
| 257 | provider = store._get_provider() |
| 258 | data_sources = [ |
| 259 | t.batch_source for t in repo.feature_views if t.batch_source is not None |
| 260 | ] |
| 261 | # Make sure the data source used by this feature view is supported by Feast |
| 262 | for data_source in data_sources: |
| 263 | provider.validate_data_source(store.config, data_source) |
| 264 | |
| 265 | registry_diff, infra_diff, _ = store.plan( |
| 266 | repo, skip_feature_view_validation=skip_feature_view_validation |
| 267 | ) |
| 268 | click.echo(registry_diff.to_string()) |
| 269 | click.echo(infra_diff.to_string()) |
| 270 | |
| 271 | |
| 272 | def _get_repo_contents( |
no test coverage detected