| 442 | |
| 443 | |
| 444 | class ConflictingFeatureViewNames(FeastError): |
| 445 | # TODO: print file location of conflicting feature views |
| 446 | def __init__( |
| 447 | self, |
| 448 | feature_view_name: str, |
| 449 | existing_type: Optional[str] = None, |
| 450 | new_type: Optional[str] = None, |
| 451 | ): |
| 452 | if existing_type and new_type: |
| 453 | if existing_type == new_type: |
| 454 | # Same-type duplicate |
| 455 | super().__init__( |
| 456 | f"Multiple {existing_type}s with name '{feature_view_name}' found. " |
| 457 | f"Feature view names must be case-insensitively unique. " |
| 458 | f"It may be necessary to ignore certain files in your feature " |
| 459 | f"repository by using a .feastignore file." |
| 460 | ) |
| 461 | else: |
| 462 | # Cross-type conflict |
| 463 | super().__init__( |
| 464 | f"Feature view name '{feature_view_name}' is already used by a {existing_type}. " |
| 465 | f"Cannot register a {new_type} with the same name. " |
| 466 | f"Feature view names must be unique across FeatureView, StreamFeatureView, and OnDemandFeatureView." |
| 467 | ) |
| 468 | else: |
| 469 | super().__init__( |
| 470 | f"The feature view name: {feature_view_name} refers to feature views of different types." |
| 471 | ) |
| 472 | |
| 473 | |
| 474 | class FeastInvalidInfraObjectType(FeastError): |
no outgoing calls
no test coverage detected