Skip to content

fix: bug when updating dashboard #34193

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

Merged

Conversation

SBIN2010
Copy link
Contributor

This PR fix bag after #34147

To reproduce the error
Снимок экрана от 2025-07-16 22-00-34
, you need to try changing the dashboard with the owner assigned to the dashboard, and the dashboard should not contain any tags attached.
When receiving data about the dashboard, information is received about related tags whose type is not custom_tag

To fix the dashboard saving error, a filter for tags has been added

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@dosubot dosubot bot added the dashboard:error Related to Dashboard errors label Jul 16, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Functionality Missing Null Check in Tag Filtering ▹ view ✅ Fix detected
Files scanned
File Path Reviewed
superset-frontend/src/dashboard/components/Header/index.jsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@@ -415,7 +415,7 @@ const Header = () => {
owners: dashboardInfo.owners,
roles: dashboardInfo.roles,
slug,
tags: dashboardInfo.tags,
tags: dashboardInfo.tags.filter(item => item.type === 1 || !item.type),

This comment was marked as resolved.

@SBIN2010 SBIN2010 changed the title Fix/bag updated dashboard fix: bag updated dashboard Jul 16, 2025
@@ -415,7 +415,9 @@ const Header = () => {
owners: dashboardInfo.owners,
roles: dashboardInfo.roles,
slug,
tags: dashboardInfo.tags,
tags: (dashboardInfo.tags || []).filter(
item => item.type === 1 || !item.type,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have some sort of enum/constant anywhere on the frontend that properly labels what TagType == 1 means?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found it on the backend -> https://github.com/apache/superset/blob/master/superset/tags/models.py#L61-L77 but couldn't find it on the frontend. Maybe we need a corresponding enum on the frontend if we don't have one already ... hoping we don't hard-code meaningless values related to TagType in other places in the frontend...

@mistercrunch
Copy link
Member

Nice, great improvement! You should install pre-commit if you haven't -> https://superset.apache.org/docs/contributing/development/#git-hooks , but looks like you need

Oh looks like npm was down/strugglnig and failed npm ci in our CI, I re-triggered the job ...

@SBIN2010 SBIN2010 changed the title fix: bag updated dashboard fix: bug when updating dashboard Jul 21, 2025
@rusackas
Copy link
Member

@mistercrunch CI is passing if this looks good to ya otherwise :D

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for improving the types on the frontend!

@mistercrunch mistercrunch merged commit b24aca0 into apache:master Jul 21, 2025
62 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:error Related to Dashboard errors size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants