Skip to content

fix: prevent the frontend from crashing on invalid indexes in results#513

Merged
alwayslove2013 merged 3 commits intozilliztech:mainfrom
s-h-a-d-o-w:fix-index-crash
May 6, 2025
Merged

fix: prevent the frontend from crashing on invalid indexes in results#513
alwayslove2013 merged 3 commits intozilliztech:mainfrom
s-h-a-d-o-w:fix-index-crash

Conversation

@s-h-a-d-o-w
Copy link
Copy Markdown
Contributor

When the index type specified in a result can't be matched to the config classes of a given database, it currently crashes to frontend because of the attempt to make a call on a NoneType.

This makes it so that the empty config is used in such cases but also prints an error to the console, so that people can ideally fix the problematic index config.

Fixes #512

@sre-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alwayslove2013, s-h-a-d-o-w
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alwayslove2013
Copy link
Copy Markdown
Contributor

@s-h-a-d-o-w Nice! This will greatly improve the debugging capabilities of vdbbench, making it easier for users to identify problems when extending support to other clients. That's fantastic!

Currently, there are some format and lint issues in this PR. Please try to address those.

pip install ruff --upgrade
pip install black --upgrade
make format
make lint

@s-h-a-d-o-w
Copy link
Copy Markdown
Contributor Author

Sorry about that! Passes on my machine now.

@s-h-a-d-o-w s-h-a-d-o-w requested a review from alwayslove2013 May 6, 2025 10:04
@alwayslove2013 alwayslove2013 merged commit b1e5cb7 into zilliztech:main May 6, 2025
4 checks passed
@s-h-a-d-o-w s-h-a-d-o-w deleted the fix-index-crash branch May 6, 2025 11:07
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.

Frontend crashes due to missing index?

3 participants