posit-dev / posit-dev/positron

Data Explorer: Surface timeout errors to user

Open
#9,846 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area: data explorer polishing usability
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Describe the issue:

During testing of #9265, we ran across an issue where searching failed silently for a dataset of 9 million columns (right under the new boundary limit we added of 10 million rows) in #9806. The source of this issue is the backend search request timing out after 5 seconds but no error/message was surfaced to the user.

Steps to reproduce the issue:

I used the following code example for testing:

import pandas as pd
import numpy as np

rows = 1
under_cols = 9_999_999

undercol = pd.DataFrame(
    np.random.rand(rows, under_cols),
    columns=[f'col_{i}' for i in range(under_cols)]
)
  1. Open the console pane in Developer Tools (Help -> Toggle Developer Tools)
  2. Run the code snippet above in a Python console
  3. Open the dataframe in the Data Explorer via the Variables pane
  4. In the Summary Panel search bar, type in a column name (I typed col_6)
  5. OBSERVE: (1) the loading indicator in the status bar goes from loading -> idle after 5 seconds, (2) the Summary Panel results are NOT filtered, and (3) a RPC timed out after 5 seconds error in the Developer Tools Console

Expected or desired behavior:

In scenarios where a user has a large dataset where a search/filter could take longer than 5 seconds, we should surface this error as a notification to the user so they get some visual feedback. Additionally, we could increase the timeout to be longer if searching the average dataset size for users takes longer.

Were there any error messages in the UI, Output panel, or Developer Tools console?

workbench.desktop.main.js:21260   ERR RPC timed out after 5 seconds: {"jsonrpc":"2.0","method":"search_schema","id":"cdef3907-3565-4485-b661-1bdcdca862ec","params":{"filters":[{"filter_type":"text_search","params":{"search_type":"contains","term":"col_6","case_sensitive":false}}],"sort_order":"original"}}: Error: RPC timed out after 5 seconds: {"jsonrpc":"2.0","method":"search_schema","id":"cdef3907-3565-4485-b661-1bdcdca862ec","params":{"filters":[{"filter_type":"text_search","params":{"search_type":"contains","term":"col_6","case_sensitive":false}}],"sort_order":"original"}}
    at vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:263666:23
error @ workbench.desktop.main.js:21260
error @ workbench.desktop.main.js:21345
error @ workbench.desktop.main.js:731141
handleUnexpectedError @ workbench.desktop.main.js:723330
(anonymous) @ workbench.desktop.main.js:723317
onUnexpectedError @ workbench.desktop.main.js:612
onUnexpectedError @ workbench.desktop.main.js:630
(anonymous) @ workbench.desktop.main.js:723314

workbench.desktop.main.js:21260   ERR RPC timed out after 5 seconds: {"jsonrpc":"2.0","method":"search_schema","id":"cdef3907-3565-4485-b661-1bdcdca862ec","params":{"filters":[{"filter_type":"text_search","params":{"search_type":"contains","term":"col_6","case_sensitive":false}}],"sort_order":"original"}}
error @ workbench.desktop.main.js:21260
error @ workbench.desktop.main.js:21345
error @ workbench.desktop.main.js:731141
handleUnexpectedError @ workbench.desktop.main.js:723330
(anonymous) @ workbench.desktop.main.js:723317
onUnexpectedError @ workbench.desktop.main.js:612
onUnexpectedError @ workbench.desktop.main.js:630
(anonymous) @ workbench.desktop.main.js:723314

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Data Explorer Summary Panel search flow and the backend search request that calls search_schema, then reproduce the timeout using the provided pandas and NumPy example. Done means a five-second RPC timeout produces visible feedback in the user interface instead of silently leaving results unfiltered; consider the issue's separate suggestion about increasing the timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, pandas, python, typescript
Domain
api, data, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.