mikebridge opened a new pull request, #43779: URL: https://github.com/apache/superset/pull/43779
### SUMMARY The Explore adhoc-filter value picker swallows every failure of its suggestions request into an empty option list — indistinguishable from a column that genuinely has no values. That silence is how #43777's bug (an HTTP 500 on every semantic view) went unreported for four months: the only evidence was in server logs and the browser's network tab. The blind spot applies to every datasource type; any server-side break in the values endpoint reads as "no suggestions". The picker now tells the two apart, in `AdhocFilterEditPopoverSimpleTabContent`: - A rejection carrying a **4xx** status is the caller's problem (an unknown column, no access) and stays quiet exactly as before. - A **5xx**, or a request that got **no answer at all** (network failure, timeout), shows an inline note in the dropdown — *"Suggestions could not be loaded. You can still type a value."* — through the same `helperText` slot the picker already uses for its "Only the first N values are listed" hint. Manual entry keeps working beneath it. - The note clears on the next successful load and does not survive a column change. `AsyncSelect`'s built-in error state was considered and deliberately not used: once set it is never reset, and it replaces the entire option list — including the `allowNewOptions` entry for the value the user typed — which would trade one dead end for another. Fixed in passing: a failed load returned `totalCount: 0`, which `AsyncSelect` (`0 >= 0`) took as "every value is loaded", serving all later searches client-side from the empty page — after one failure the server was never asked again for that column. The failure path now reports the same count-exceeds-page shape the success path already uses, so the next search retries. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF **Before:** a failed suggestions request renders exactly like an empty column: a bare "Type a value here" dropdown, no message. **After:** the dropdown shows *"Suggestions could not be loaded. You can still type a value."* as an inline note above the entry area; a typed value still appears as a selectable option beneath it. Verified live against a backend whose values endpoint genuinely 500s, on both a regular dataset and a semantic view — same note, same manual-entry path. ### TESTING INSTRUCTIONS Automated (5 new tests in the picker's existing suite, 44 total): ```bash cd superset-frontend npx jest src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/AdhocFilterEditPopoverSimpleTabContent.test.tsx ``` Manual: 1. In Explore, add an adhoc filter on a text column and open the value field: values load, no note (baseline). 2. Force the values request to fail (block `*/column/*/values/*` in devtools, or stop the dataset's database): reopen the picker — the note appears, and typing a value still offers it for selection; picking it populates the filter. 3. Let the request succeed again (new search text or reopen): the note is gone and values list normally. 4. Make the request fail with a 4xx (e.g. `curl` an unknown column): the picker shows the ordinary empty list, no note. 5. Repeat on a semantic view with `SEMANTIC_LAYERS` enabled: identical behaviour — the picker is shared. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
