-
Notifications
You must be signed in to change notification settings - Fork 16.1k
fix: allow metadata to parse json #33444
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
Conversation
There was a problem hiding this 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 |
|---|---|---|
| Inefficient Empty Object Check ▹ view | 🧠 Incorrect | |
| Nested ternary making value assignment hard to read ▹ view | 🧠 Not in scope |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx | ✅ |
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.
| width="100%" | ||
| height="160px" | ||
| value={ | ||
| !Object.keys(extraJson?.metadata_params || {}).length |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| value={ | ||
| !Object.keys(extraJson?.metadata_params || {}).length | ||
| ? '' | ||
| : extraJson?.metadata_params | ||
| : typeof extraJson?.metadata_params === 'string' | ||
| ? extraJson?.metadata_params | ||
| : JSON.stringify(extraJson?.metadata_params) | ||
| } |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
6546b2e to
89db23f
Compare
89db23f to
9b0e180
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In times like this I wish we used something like thrift or protobuf to define types, and then autogenerate the server/client code...
|
@eschutho Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
|
@eschutho Ephemeral environment spinning up at http://54.191.220.223:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
(cherry picked from commit b050897)
(cherry picked from commit b050897)
SUMMARY
When editing in the Metadata Parameters in the database editor, if possible, we parse the string to a javascript object, but were not converting it back to a string in order for the ace editor to display the text, resulting in an error.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After:

TESTING INSTRUCTIONS
edit the metadata parameters and save, reload the database
ADDITIONAL INFORMATION