Skip to content

fix: Read only the known project metadata keys in the SQL registry - #391

Merged
vanitabhagwat merged 2 commits into
masterfrom
fix/project-metadata-known-keys
Nov 19, 2026
Merged

vanitabhagwat merged 2 commits into
masterfrom
fix/project-metadata-known-keys

Conversation

@vanitabhagwat

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

get_project_metadata_model, get_all_project_metadata and _list_project_metadata select every feast_metadata row of a project, or of the whole table, and then use only project_uuid and last_updated_timestamp.

Feature server reports (#389) are also stored in feast_metadata. With reports on, a project can hold up to 50 report rows, about 750 KB, all of which were fetched on these reads:

  • get_project_metadata_model runs on every REST registry request that looks up a project.
  • get_all_project_metadata runs on GET /projects and scanned the whole table.

The three reads now filter on the two keys in SQL (metadata_key IN (...)). Results are unchanged. A project that has only other keys no longer appears in project metadata listings, so report rows can't create a phantom project.

Tests (TestProjectMetadataReadsOnlyKnownKeys):

  • Results are identical with 20 report rows and an extra 5 KB key present.
  • A project with only other keys isn't listed.
  • Each read's SQL filters on the two keys.
  • Only 2 rows are fetched even with more than 20 rows present.

With the change reverted, 3 of the 4 fail. The fourth checks that results are unchanged, so it passes either way. tests/unit/infra/registry and tests/unit/permissions (663 tests) pass, and ruff and mypy are clean.

Which issue(s) this PR fixes:

EAPC-23485 (follow-up to #389)

🤖 Generated with Claude Code

vanitabhagwat and others added 2 commits November 17, 2026 15:03
get_project_metadata_model, get_all_project_metadata and
_list_project_metadata selected every feast_metadata row of a project (or of
the whole table) and then used only PROJECT_UUID and LAST_UPDATED_TIMESTAMP.
Feature server reports are also stored in feast_metadata, so with reports on,
up to 50 report rows (~750 KB) per project were fetched on every REST
registry request that resolves a project, and GET /projects scanned them all.
Filter on the two keys in SQL. Results are unchanged; a project that only has
other keys no longer appears in project metadata listings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ubuntu-latest moved to 26.04, whose default JDK can't start PySpark 3.5
("getSubject is not supported"), failing every Spark unit test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vanitabhagwat
vanitabhagwat merged commit 393e0ae into master Nov 19, 2026
67 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants