Skip to content

fix: detect duplicate feature view/data source names at parse time - #6756

Open
mayuriphad wants to merge 1 commit into
feast-dev:masterfrom
mayuriphad:fix/flaky-duplicate-featureview-cli-6417
Open

fix: detect duplicate feature view/data source names at parse time#6756
mayuriphad wants to merge 1 commit into
feast-dev:masterfrom
mayuriphad:fix/flaky-duplicate-featureview-cli-6417

Conversation

@mayuriphad

Copy link
Copy Markdown

Problem

test_cli_apply_duplicated_featureview_names (and related tests) intermittently fail in CI with:

AssertionError: assert (-1 != 0 and b'Feature view names must be case-insensitively unique' in b'')

Root cause: duplicate feature view/data source name detection happens deep inside store.plan()/store.apply() via _validate_feature_views()/_validate_data_sources() in feature_store.py, after FeatureStore and its dependencies (Dask, provider, registry) have already been initialized. On process shutdown, slow atexit handlers (Dask thread pool, PySpark JVM) can block long enough that the test harness's subprocess timeout fires and kills the process with SIGKILL before any output is flushed — so the real error message is lost and the test sees only an empty, non-zero exit.

The CLI also didn't handle ConflictingFeatureViewNames/DataSourceRepeatNamesException (both FeastError subclasses) at all — only FeastProviderLoginError was caught — so these errors propagated as unhandled tracebacks.

Fix

  1. sdk/python/feast/repo_operations.py: call the existing _validate_feature_views() / _validate_data_sources() validators (imported from feature_store.py, no logic duplicated) at the end of parse_repo(), right after the repo contents are collected — before any FeatureStore/Dask/PySpark initialization happens. This fails fast, close to where the actual problem (duplicate names in the repo) exists.
  2. sdk/python/feast/cli/cli.py: add except FeastError handling (after the existing FeastProviderLoginError handler) in plan_command and apply_total_command, so any FeastError (including these) is surfaced as a clean message via click.ClickException with a non-zero exit code, rather than an unhandled traceback.

Testing

Ran the directly affected tests locally (all pass):

tests/integration/cli/test_cli_apply_duplicates.py::test_cli_apply_duplicated_featureview_names PASSED
tests/integration/cli/test_cli_apply_duplicates.py::test_cli_apply_duplicate_data_source_names PASSED
tests/integration/cli/test_cli_apply_duplicates.py::test_cli_apply_imported_featureview PASSED
tests/integration/cli/test_cli_apply_duplicates.py::test_cli_apply_imported_featureview_with_duplication PASSED
tests/integration/cli/test_cli_apply_duplicates.py::test_cli_apply_duplicated_featureview_names_multiple_py_files PASSED

Fixes #6417

Copilot AI lite review requested due to automatic review settings August 18, 2026 11:53
@mayuriphad
mayuriphad requested a review from a team as a code owner August 18, 2026 11:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Signed-off-by: mayuriphad <mayuriphad656@gmail.com>
@mayuriphad
mayuriphad force-pushed the fix/flaky-duplicate-featureview-cli-6417 branch from 2df34a2 to 03e84b3 Compare August 19, 2026 01:47
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.

Flaky test: test_cli_apply_duplicated_featureview_names fails with empty output on subprocess timeout

2 participants