Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(native filters): groupby filter issue #21084

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

stevetracvc
Copy link
Contributor

SUMMARY

There's an odd error when trying to use the groupby filter, resulting in "TypeError: Cannot read properties of undefined (reading 'length')"

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

broken:
groupby_broken
groupby_error_1

works:
groupby_works

TESTING INSTRUCTIONS

Create a new groupby filter on a dashboard and see how you get the black error boxes.

Full error message:

Oops! An error occurred!
TypeError: Cannot read properties of undefined (reading 'length')
Stack Trace:
in PluginFilterGroupBy (created by CustomLoadableRenderer)
in CustomLoadableRenderer (created by SuperChartCore)
in div (created by SuperChartCore)
in SuperChartCore (created by ParentSize)
in ErrorBoundary (created by ParentSize)
in div (created by ParentSize)
in ParentSize (created by SuperChart)
in div
in Unknown (created by SuperChart)
in SuperChart (created by WithTheme(SuperChart))
in WithTheme(SuperChart) (created by FilterValue)
in div (created by Styled(div))
in Styled(div) (created by FilterValue)
in FilterValue (created by FilterControl)
in div (created by FormItemInput)
in div (created by FormItemInput)
in div (created by Col)
in Col (created by FormItemInput)
in FormItemInput (created by FormItem)
in div (created by Row)
in Row (created by FormItem)
in FormItem (created by Styled(FormItem))
in Styled(FormItem) (created by FilterControl)
in div (created by Trigger)
in Trigger (created by ForwardRef(Tooltip))
in ForwardRef(Tooltip) (created by Tooltip)
in Tooltip (created by Popover)
in Popover (created by FilterCard)
in FilterCard (created by FilterControl)
in form (created by ForwardRef(Form))
in ForwardRef(Form) (created by ForwardRef(InternalForm))
in SizeContextProvider (created by ForwardRef(InternalForm))
in ForwardRef(InternalForm) (created by Styled(Component))
in Styled(Component) (created by Form)
in Form (created by Styled(Form))
in Styled(Form) (created by FilterControl)
in FilterControl (created by FilterControls)
in InPortal (created by FilterControls)
in div (created by Styled(div))
in Styled(div) (created by FilterControls)
in FilterControls (created by FilterBar)
in div (created by EmotionCssPropInternal)
in EmotionCssPropInternal (created by FilterBar)
in div (created by Styled(div))
in Styled(div) (created by FilterBar)
in div (created by Styled(div))
in Styled(div) (created by FilterBar)
in FilterBar (created by DashboardBuilder)
in ErrorBoundary (created by DashboardBuilder)
in div (created by Styled(div))
in Styled(div) (created by DashboardBuilder)
in div (created by Styled(div))
in Styled(div) (created by DashboardBuilder)
in div (created by Styled(div))
in Styled(div) (created by DashboardBuilder)
in DashboardBuilder (created by Dashboard)
in Dashboard (created by ConnectFunction)
in ConnectFunction (created by DashboardPage)
in DashboardPage (created by DashboardRoute)
in DashboardRoute (created by App)
in ErrorBoundary (created by App)
in Suspense (created by App)
in Route (created by App)
in Switch (created by App)
in LocationProvider (created by Context.Consumer)
in Route (created by QueryParamProvider)
in QueryParamProvider (created by RootContextProviders)
in DynamicPluginProvider (created by RootContextProviders)
in EmbeddedUiConfigProvider (created by RootContextProviders)
in FlashProvider (created by RootContextProviders)
in Unknown (created by RootContextProviders)
in Provider (created by RootContextProviders)
in ThemeProvider (created by RootContextProviders)
in RootContextProviders (created by App)
in Router (created by BrowserRouter)
in BrowserRouter (created by App)
in App

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@stevetracvc stevetracvc changed the title fix(native filters) groupby filter issue fix(native filters): groupby filter issue Aug 14, 2022
@stevetracvc
Copy link
Contributor Author

I didn't dig into why this fixes it, as you'd expect that array to not be empty. But it does appear to fix it. Might mean there's an underlying problem somewhere else.

Old Slack thread discussing it a bit.
https://apache-superset.slack.com/archives/C016B3LG5B4/p1643044538072600

@codecov
Copy link

codecov bot commented Aug 14, 2022

Codecov Report

Merging #21084 (c517d2d) into master (394d62e) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master   #21084   +/-   ##
=======================================
  Coverage   66.27%   66.27%           
=======================================
  Files        1770     1770           
  Lines       67524    67524           
  Branches     7178     7178           
=======================================
  Hits        44754    44754           
  Misses      20936    20936           
  Partials     1834     1834           
Flag Coverage Δ
javascript 52.00% <0.00%> (ø)

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

Impacted Files Coverage Δ
...filters/components/GroupBy/GroupByFilterPlugin.tsx 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zhaoyongjie zhaoyongjie self-requested a review August 22, 2022 13:04
@zhaoyongjie zhaoyongjie merged commit d79b0bf into apache:master Aug 22, 2022
@eschutho eschutho added the v2.0.1 label Sep 2, 2022
eschutho pushed a commit that referenced this pull request Sep 20, 2022
Fahrenheit35 pushed a commit to Fahrenheit35/superset that referenced this pull request Nov 11, 2022
@mistercrunch mistercrunch added 🍒 2.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v2.0 v2.0.1 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants