Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: Fixed IntegrityError on SqlRegistry
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
  • Loading branch information
ntkathole committed Mar 3, 2026
commit ea3abd2f87d7f6144dcd99be74b0bdd1c0d54a12
12 changes: 10 additions & 2 deletions sdk/python/feast/infra/registry/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
update,
)
from sqlalchemy.engine import Engine
from sqlalchemy.exc import IntegrityError

from feast import utils
from feast.base_feature_view import BaseFeatureView
Expand Down Expand Up @@ -1028,8 +1029,15 @@ def _maybe_init_project_metadata(self, project):
"last_updated_timestamp": update_time,
"project_id": project,
}
insert_stmt = insert(feast_metadata).values(values)
conn.execute(insert_stmt)
try:
with conn.begin_nested():
conn.execute(insert(feast_metadata).values(values))
except IntegrityError:
logger.info(
"Project metadata for %s already initialized by "
"another process.",
project,
)
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.

def _delete_object(
self,
Expand Down
Loading