Skip to content

fix: Scope feature view name conflict check to current project in file-based registry#6369

Merged
ntkathole merged 6 commits intofeast-dev:masterfrom
Abhishek8108:fix/cross-project-feature-view-name-conflict
May 6, 2026
Merged

fix: Scope feature view name conflict check to current project in file-based registry#6369
ntkathole merged 6 commits intofeast-dev:masterfrom
Abhishek8108:fix/cross-project-feature-view-name-conflict

Conversation

@Abhishek8108
Copy link
Copy Markdown
Contributor

@Abhishek8108 Abhishek8108 commented May 5, 2026

What this PR does

Fixes #6209.

_check_conflicting_feature_view_names built its lookup map from all feature views in cached_registry_proto without filtering by project. In a shared file-based registry with multiple projects, this caused false ConflictingFeatureViewNames errors when two different projects defined feature views with the same name.

Root cause

_existing_feature_view_names_to_fvs iterated over all three collections (feature views, stream feature views, on-demand feature views) in the entire RegistryProto without scoping to the current project. The dict is keyed by name only, so a FeatureView named driver_stats in project_a and a FeatureView also named driver_stats in project_b would collide, triggering a spurious error on the second feast apply.

Fix

  • Added a project: str parameter to both _check_conflicting_feature_view_names and _existing_feature_view_names_to_fvs
  • Each collection is now filtered by fv.spec.project == project so only feature views belonging to the current project are included in the conflict map
  • The call site in apply_feature_view passes the project argument that is already in scope

Tests

  • Added test_cross_project_feature_view_names_do_not_conflict in tests/unit/local_feast_tests/test_local_feature_store.py: two FeatureStore instances sharing a registry file but different projects both apply a FeatureView named driver_stats — asserts no ConflictingFeatureViewNames is raised
  • Existing test_apply_conflicting_feature_view_names continues to pass — same-project type conflicts are still detected correctly

@Abhishek8108 Abhishek8108 requested a review from a team as a code owner May 5, 2026 21:24
@Abhishek8108 Abhishek8108 changed the title fix: scope feature view name conflict check to current project in file-based registry fix: Scope feature view name conflict check to current project in file-based registry May 5, 2026
@Abhishek8108
Copy link
Copy Markdown
Contributor Author

Abhishek8108 commented May 5, 2026

Hi — wanted to flag that the remaining CI failure is on the unit-test-python (3.12, macos-14) job and appears to be a runner environment issue unrelated to this PR.

The root cause visible in the job logs is a psutil version conflict on the macOS runner:

ImportError: version conflict:
'.venv/lib/python3.12/site-packages/psutil/_psutil_osx.abi3.so'
C extension module was built for another version of psutil (5.9.8 instead of 5.9.0)

Because the feast CLI subprocess cannot even complete its import, every test that spawns a CLI subprocess exits immediately with code -1 and empty stdout. This explains all three failures:

  • test_cli_apply_imported_featureview — expects exit 0, gets -1
  • test_cli_apply_duplicated_featureview_names — expects the error message in output, gets empty bytes
  • test_milvus_retrieve_online_documents_v2_missing_entity_key — unrelated Milvus internal error on the same runner

None of these tests are in files changed by this PR, and the same macOS 3.12 job passes on master. The Ubuntu jobs (3.10, 3.11, 3.12) and macOS 3.11 all pass cleanly.

Would you be able to re-trigger the macOS 3.12 job, or confirm you're happy to merge with the understanding that this failure is a transient runner issue? Happy to do anything else needed on my end — thank you for your time!

…e-based registry

_check_conflicting_feature_view_names built its lookup map from all
feature views in cached_registry_proto without filtering by project.
In a shared file-based registry with multiple projects, this caused
false ConflictingFeatureViewNames errors when two different projects
defined feature views with the same name.

Add a project parameter to both _check_conflicting_feature_view_names
and _existing_feature_view_names_to_fvs, and filter each collection
by fv.spec.project == project so only same-project views are compared.

Fixes feast-dev#6209

Signed-off-by: Abhishek8108 <87538407+Abhishek8108@users.noreply.github.com>
…anifest

The placeholder value your-marquez-api-key in openlineage-secret_v1_secret.yaml
triggers detect-secrets. Mark it as an allowlist exception.

Signed-off-by: Abhishek8108 <87538407+Abhishek8108@users.noreply.github.com>
FileSource requires the file to exist when apply() succeeds (no early
exception). Replace the bare path string with a mkstemp() path so the
test passes in CI.

Signed-off-by: Abhishek8108 <87538407+Abhishek8108@users.noreply.github.com>
…oject test

apply() reads the parquet schema when the apply succeeds (no early
exception). Use the prep_file_source() helper — the same pattern all
other tests that call apply() use — to produce a real, schema-valid
parquet file instead of an empty temp file.

Signed-off-by: Abhishek8108 <87538407+Abhishek8108@users.noreply.github.com>
Replace the FeatureStore-level test (which fought parquet inference and
dill source extraction) with a direct Registry-level test mirroring the
pattern in test_sql_registry.py.

Two tests in tests/unit/infra/registry/test_file_registry.py:
- test_same_project_name_conflict_batch_vs_stream: confirms that a
  FeatureView and StreamFeatureView with the same name in the same
  project still raise ConflictingFeatureViewNames (existing behaviour)
- test_cross_project_name_does_not_conflict_batch_vs_stream: confirms
  that the same name across different projects and different view types
  no longer raises (the bug fixed by this PR)

Signed-off-by: Abhishek8108 <87538407+Abhishek8108@users.noreply.github.com>
Signed-off-by: Abhishek8108 <87538407+Abhishek8108@users.noreply.github.com>
@ntkathole ntkathole force-pushed the fix/cross-project-feature-view-name-conflict branch from 75cf87c to e9b2e81 Compare May 6, 2026 04:28
Copy link
Copy Markdown
Member

@ntkathole ntkathole left a comment

Choose a reason for hiding this comment

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

lgtm

@ntkathole ntkathole merged commit a4fde83 into feast-dev:master May 6, 2026
36 of 40 checks passed
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.

check_conflicting_feature_view_names falsely flags cross-project name conflicts in shared registries

2 participants