GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: More explicit error messages by tpvasconcelos · Pull Request #2708 · feast-dev/feast

fix: More explicit error messages #2708

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.

Sign up for GitHub

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

Merged
feast-ci-bot merged 1 commit into feast-dev:master from tpvasconcelos:explicit-pydantic-errors
Aug 3, 2022

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix: More explicit error messages #2708

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
7b8f8e3
Add more explicit error messages to validation checks in repo_config.…
tpvasconcelos May 16, 2022
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

7 changes: 7 additions & 0 deletions 7 sdk/python/feast/errors.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ def __init__(
)


class FeastOfflineStoreInvalidName(Exception):
def __init__(self, offline_store_class_name: str):
super().__init__(
f"Offline Store Class '{offline_store_class_name}' should end with the string `OfflineStore`.'"
)


class FeastOnlineStoreInvalidName(Exception):
def __init__(self, online_store_class_name: str):
super().__init__(
Expand Down
16 changes: 10 additions & 6 deletions 16 sdk/python/feast/repo_config.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from feast.errors import (
FeastFeatureServerTypeInvalidError,
FeastFeatureServerTypeSetError,
FeastOfflineStoreInvalidName,
FeastOnlineStoreInvalidName,
FeastProviderNotSetError,
)
from feast.importer import import_class
Expand Down Expand Up @@ -278,7 +280,8 @@ def _validate_online_store_config(cls, values):
return values

# Make sure that the provider configuration is set. We need it to set the defaults
assert "provider" in values
if "provider" not in values:
raise FeastProviderNotSetError()

# Set the default type
# This is only direct reference to a provider or online store that we should have
Expand Down Expand Up @@ -315,7 +318,8 @@ def _validate_offline_store_config(cls, values):
return values

# Make sure that the provider configuration is set. We need it to set the defaults
assert "provider" in values
if "provider" not in values:
raise FeastProviderNotSetError()

# Set the default type
if "type" not in values["offline_store"]:
Expand Down Expand Up @@ -455,8 +459,8 @@ def get_batch_engine_config_from_type(batch_engine_type: str):
def get_online_config_from_type(online_store_type: str):
if online_store_type in ONLINE_STORE_CLASS_FOR_TYPE:
online_store_type = ONLINE_STORE_CLASS_FOR_TYPE[online_store_type]
else:
assert online_store_type.endswith("OnlineStore")
elif not online_store_type.endswith("OnlineStore"):
raise FeastOnlineStoreInvalidName(online_store_type)
module_name, online_store_class_type = online_store_type.rsplit(".", 1)
config_class_name = f"{online_store_class_type}Config"

Expand All @@ -466,8 +470,8 @@ def get_online_config_from_type(online_store_type: str):
def get_offline_config_from_type(offline_store_type: str):
if offline_store_type in OFFLINE_STORE_CLASS_FOR_TYPE:
offline_store_type = OFFLINE_STORE_CLASS_FOR_TYPE[offline_store_type]
else:
assert offline_store_type.endswith("OfflineStore")
elif not offline_store_type.endswith("OfflineStore"):
raise FeastOfflineStoreInvalidName(offline_store_type)
module_name, offline_store_class_type = offline_store_type.rsplit(".", 1)
config_class_name = f"{offline_store_class_type}Config"

Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.