fix: Scope feature view name conflict check to current project in file-based registry#6369
Conversation
|
Hi — wanted to flag that the remaining CI failure is on the The root cause visible in the job logs is a Because the
None of these tests are in files changed by this PR, and the same macOS 3.12 job passes on 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>
75cf87c to
e9b2e81
Compare
What this PR does
Fixes #6209.
_check_conflicting_feature_view_namesbuilt its lookup map from all feature views incached_registry_protowithout filtering by project. In a shared file-based registry with multiple projects, this caused falseConflictingFeatureViewNameserrors when two different projects defined feature views with the same name.Root cause
_existing_feature_view_names_to_fvsiterated over all three collections (feature views, stream feature views, on-demand feature views) in the entireRegistryProtowithout scoping to the current project. The dict is keyed by name only, so aFeatureViewnameddriver_statsinproject_aand aFeatureViewalso nameddriver_statsinproject_bwould collide, triggering a spurious error on the secondfeast apply.Fix
project: strparameter to both_check_conflicting_feature_view_namesand_existing_feature_view_names_to_fvsfv.spec.project == projectso only feature views belonging to the current project are included in the conflict mapapply_feature_viewpasses theprojectargument that is already in scopeTests
test_cross_project_feature_view_names_do_not_conflictintests/unit/local_feast_tests/test_local_feature_store.py: twoFeatureStoreinstances sharing a registry file but different projects both apply aFeatureViewnameddriver_stats— asserts noConflictingFeatureViewNamesis raisedtest_apply_conflicting_feature_view_namescontinues to pass — same-project type conflicts are still detected correctly