Bug description

With Superset 5.0.0, I create a metric and save the dataset An error message is sometimes displayed

https://github.com/user-attachments/assets/738bdb8f-cc78-4b95-9025-217ef23af1f4

A fix seems to be present : https://github.com/apache/superset/pull/33523 with the tag 5.0 but I use already this version

I don't reproduce it on 6.0.0RC1

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

The error message you see when creating a metric in Superset 5.0.0 is a known issue caused by a schema validation error, often related to the currency field in metrics. This happens because a migration changed the currency field from a string to a JSON object, which can trigger validation errors like "Length must be between 1 and 128" if legacy data is present. The metric is still saved, but further dataset modifications may be blocked unless you remove the affected metric or set its currency field to null.

The fix for this bug was merged after the 5.0.0 release and is not included in that version, but it is present in later releases such as 6.0.0RC1, which is why you don't see the issue there. For now, you can work around it by removing or recreating metrics without currency settings until you upgrade to a version with the fix. More details are available in this issue discussion and here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: msyavuz

I've encountered this before, i think for some reason it tries to add the column metric again