fix: Detect duplicate feature view/data source names early in parse_repo (#6417) - #6466
fix: Detect duplicate feature view/data source names early in parse_repo (#6417)#6466obielin wants to merge 2 commits into
Conversation
c58993b to
4b34498
Compare
|
Hi @ntkathole and @franciscojavierarceo — this is the updated, clean PR replacing #6454, which was closed due to DCO sign-off issues. All 5 commits are now properly signed off (DCO ✅), the import bug in |
2023a56 to
b874bba
Compare
…-dev#6417) Move duplicate feature view name and data source name detection into parse_repo() before FeatureStore initialization. Also add FeastError handler in CLI plan/apply commands for clean error output. Signed-off-by: Linda Oraegbunam <108290852+obielin@users.noreply.github.com> Signed-off-by: Linda Oraegbunam <obielinda@gmail.com>
Add import sys, FeastError import, and except FeastError handlers in plan_command and apply_total_command for clean error output and sys.exit(1). Signed-off-by: Linda Oraegbunam <108290852+obielin@users.noreply.github.com> Signed-off-by: Linda Oraegbunam <obielinda@gmail.com>
b874bba to
e0884bf
Compare
|
Hi @ntkathole friendly ping on this one. I've just rebased onto the latest master: no conflicts, DCO green. On why there's no test signal here: this PR is from a fork, so the workflow runs are sitting in "awaiting approval", and A few points I'd like your steer on, since they're the parts most likely to need a maintainer decision. The I can also add a unit test asserting that |
What this PR does / why we need it
Fixes the flaky test
test_cli_apply_duplicated_featureview_names(and similar tests) that intermittently fails in CI with empty output due to subprocess timeout.Root cause: Duplicate feature view name detection happened too late in the pipeline — inside
store.plan()/store.apply()via_validate_feature_views(), afterFeatureStoreand heavy dependencies (Dask, registry, provider) had already been initialized. When the validation error was raised, slowatexithandlers (Dask thread pool) could block process exit indefinitely, causing the 60s timeout to trigger and the output to be lost.Changes
sdk/python/feast/repo_operations.pyConflictingFeatureViewNamesandDataSourceRepeatNamesExceptionimports fromfeast.errorsparse_repo()before anyFeatureStoreinitialization:FeatureView,StreamFeatureView,OnDemandFeatureView) are case-insensitively unique → raisesConflictingFeatureViewNamesimmediately if collision foundDataSourceRepeatNamesExceptionimmediately if collision foundsdk/python/feast/cli/cli.pyimport sysFeastErrorto the import fromfeast.errorsexcept FeastErrorhandler (after existingFeastProviderLoginError) in bothplan_commandandapply_total_command— prints a clean error message and exits with code 1 instead of letting validation errors propagate as unhandled tracebacksHow has this been tested
sdk/python/tests/integration/cli/test_cli_apply_duplicates.pycover the fix:test_cli_apply_duplicated_featureview_namestest_cli_apply_duplicate_data_source_namestest_cli_apply_duplicated_featureview_names_multiple_py_filesThese tests assert
rc != 0and the expected error message in the output, which is now guaranteed since the error is raised before any heavy initialization.Closes
Closes #6417