Skip to content

test(dashboard): prove BigInt column values no longer break native filter config - #41840

Merged
rusackas merged 1 commit into
masterfrom
test/issue-35087-bigint-filters
Jul 7, 2026
Merged

test(dashboard): prove BigInt column values no longer break native filter config#41840
rusackas merged 1 commit into
masterfrom
test/issue-35087-bigint-filters

Conversation

@rusackas

@rusackas rusackas commented Jul 7, 2026

Copy link
Copy Markdown
Member

SUMMARY

Test-only PR that proves #35087 is fixed on master, and closes it.

The issue reported Unexpected error: TypeError: Do not know how to serialize a BigInt when clicking "Add or edit filters" on a dashboard where a chart had queried a BigInt column. The crash came from JSON.stringify(charts) in a useMemo dependency array in FiltersConfigForm, evaluated on every render of the filters config modal — chart data responses containing integers beyond Number.MAX_SAFE_INTEGER are parsed into native BigInt values by parseResponse (parseMethod: 'json-bigint'), and JSON.stringify throws on any BigInt.

That stringify call was fixed by #34539 (merged Aug 2025), which serializes only the chart ids. However, #34539's regression test only covered opening the modal onto an existing filter configuration (createNewOnOpen: false), while the issue's repro is the fresh "Add or edit filters" flow that auto-creates a new filter. This PR adds a test for that exact path and strengthens the shared fixture with a value above Number.MAX_SAFE_INTEGER (9007199254740993n), mirroring what parseResponse actually produces for large integer columns.

The new test passes on master, confirming the reported path no longer throws. No production code changes.

closes #35087

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A (test-only change)

TESTING INSTRUCTIONS

cd superset-frontend
npm run test -- src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx --maxWorkers=2

The new test is creates a new filter when a chart contains BigInt values. To see it fail as it would have before the fix, revert the #34539 change in FiltersConfigForm.tsx (restore JSON.stringify(charts) in the initiallyExcludedCharts dependency array) and re-run — the render throws TypeError: Do not know how to serialize a BigInt.

ADDITIONAL INFORMATION

  • Has associated issue: closes Unexpected error: TypeError: Do not know how to serialize a BigInt #35087
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

🤖 Generated with Claude Code

…lter config (#35087)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dosubot dosubot Bot added the dashboard:native-filters Related to the native filters of the Dashboard label Jul 7, 2026
@bito-code-review

bito-code-review Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #8eec04

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 1d6f419..1d6f419
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.78%. Comparing base (9e50d9e) to head (1d6f419).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #41840   +/-   ##
=======================================
  Coverage   64.78%   64.78%           
=======================================
  Files        2689     2689           
  Lines      148936   148936           
  Branches    34365    34365           
=======================================
  Hits        96481    96481           
  Misses      50690    50690           
  Partials     1765     1765           
Flag Coverage Δ
javascript 69.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rusackas rusackas added the merge-if-green If approved and tests are green, please go ahead and merge it for me label Jul 7, 2026
@rusackas
rusackas merged commit 51a171f into master Jul 7, 2026
71 checks passed
@rusackas
rusackas deleted the test/issue-35087-bigint-filters branch July 7, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard:native-filters Related to the native filters of the Dashboard merge-if-green If approved and tests are green, please go ahead and merge it for me size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected error: TypeError: Do not know how to serialize a BigInt

3 participants