Skip to content

fix: Fixed IntegrityError on SqlRegistry#6047

Open
ntkathole wants to merge 1 commit intofeast-dev:masterfrom
ntkathole:debug_rest_api
Open

fix: Fixed IntegrityError on SqlRegistry#6047
ntkathole wants to merge 1 commit intofeast-dev:masterfrom
ntkathole:debug_rest_api

Conversation

@ntkathole
Copy link
Member

@ntkathole ntkathole commented Mar 3, 2026

What this PR does / why we need it:

This PR fixes rest api tests intermittent failures. Sometimes gRPC registry server is crashing on startup with a UniqueViolation:

sqlalchemy.exc.IntegrityError: (psycopg.errors.UniqueViolation) 
duplicate key value violates unique constraint "projects_pkey"
DETAIL:  Key (project_id)=(driver_ranking) already exists.

The Feast pod has two containers (online server + registry server) and these create their own SqlRegistry instance against the same shared Postgres. During initialization, multiple processes race on _maybe_init_project_metadata() -- INSERT into feast_metadata

Fixes #5977


Open with Devin

@ntkathole ntkathole self-assigned this Mar 3, 2026
@ntkathole ntkathole requested a review from a team as a code owner March 3, 2026 11:45
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
@ntkathole ntkathole changed the title chore: Debug rest apis fix: Fixed IntegrityError on SqlRegistry Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

registry-rest-api-tests CI workflow sometimes fails due to missing HTTP readiness check

1 participant