-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
[bugfix] prevent d3-format from raising #6386
Conversation
Since apache#6287 and effectively moving to a new version of d3, d3-format and d3-time-format raises when receiving invalid input strings. This code wraps the potential issues inside `try` blocks that will effectively return an `ERROR` string as output to the formatting function.
Codecov Report
@@ Coverage Diff @@
## master #6386 +/- ##
=======================================
Coverage 77.31% 77.31%
=======================================
Files 67 67
Lines 9581 9581
=======================================
Hits 7408 7408
Misses 2173 2173 Continue to review full report at Codecov.
|
Thanks for the fix. I am also addressing this in the BTW, if the format is invalid (e.g. |
About |
@kristw did a bit of thinking about "the proper way" here, and ideally the control itself would do the validation and provide much more context to the user. I'm thinking even showing a small table of source number to formatted number mapping that shows the user as they select or type new format strings. For now though, I'm just trying to ship a version of Superset that doesn't crash. |
sgtm. I just post a PR for the |
Ok nice, we'll probably need similar for time formatting. In the meantime, should we merge this as master is broken? |
Yes, please merge. |
Since apache#6287 and effectively moving to a new version of d3, d3-format and d3-time-format raises when receiving invalid input strings. This code wraps the potential issues inside `try` blocks that will effectively return an `ERROR` string as output to the formatting function. (cherry picked from commit 4690563)
Since #6287 and effectively moving to a new version of d3, d3-format and d3-time-format raises when receiving invalid input strings. This code wraps the potential issues inside `try` blocks that will effectively return an `ERROR` string as output to the formatting function. (cherry picked from commit 4690563)
Since apache#6287 and effectively moving to a new version of d3, d3-format and d3-time-format raises when receiving invalid input strings. This code wraps the potential issues inside `try` blocks that will effectively return an `ERROR` string as output to the formatting function.
Since apache#6287 and effectively moving to a new version of d3, d3-format and d3-time-format raises when receiving invalid input strings. This code wraps the potential issues inside `try` blocks that will effectively return an `ERROR` string as output to the formatting function. (cherry picked from commit b5238c9)
Since #6287 and
effectively moving to a new version of d3, d3-format and d3-time-format
raises when receiving invalid input strings.
This code wraps the potential issues inside
try
blocks that willeffectively return an
ERROR
string as output to the formattingfunction.
@kristw