Bug description

When attempting to enter commas in order to limit the ability to upload data to specific database schemas only, the UI doesn't accept comma keystrokes and the comma separated value list therefore cannot be created.

Apache Superset Can't enter commas into database configuration setup

How to reproduce the bug

My deployment:

Docker compose onto Linux VPS (Ubuntu)

Reproduction steps:

-> Click into database connections -> Edit a database -> Advanced options -> Limit upload permissions to specific schemas -> Attempt to upload desired schemas as comma separated values by typing names of desired schemas with separating commas

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [X] 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: rusackas

This still seems to be the case in 4.1.1 / master. Seems like it shouldn't be tough to fix, so I'll ping @yousoph / @geido in case they want to farm this out.

Comment From: Ajay-Satish-01

I can work on this but I have a question.

If we already have schema present, should it be immutable? That seems to be the behavior now. After the input field is populated by the existing schema, we are unable to edit it.

Comment From: Vam-tech-star

Hi Ajay-Satish-01

Thank you for your question and for your interest in contributing to Apache Superset. The current behavior where the schema field becomes immutable after being populated might be intentional to prevent accidental modifications to critical database configurations. However, this can be inconvenient in scenarios where updates to the schema are necessary. To address this, we can consider the following approach: 1.)Make the Schema Editable: This allow users to edit the schema field after it has been populated to provide flexibility for making necessary updates without resetting the entire configuration. 2.)Add a Confirmation Mechanism: Implement a confirmation dialog that prompts users to confirm changes to the schema. This can help prevent accidental modifications while still allowing for updates when needed. 3.)Version Control for Configurations: Introduce a version control mechanism for database configurations. This way, any changes to the schema can be tracked, and users can revert to previous configurations if necessary. 4.)User Permissions: Ensure that only users with the appropriate permissions can edit the schema field. This can help maintain the integrity of the database configurations. Next Steps: Discuss with the maintainers or the community to get their input on whether making the schema editable aligns with the project's design principles. Implement the changes based on the feedback received. Thoroughly test the implementation to ensure it works as expected and does not introduce any new issues. By making the schema field editable with the appropriate safeguards, we can provide a more flexible and user-friendly experience while maintaining the integrity of the database configurations.

Your feedback on this approach would be greatly appreciated.

Best regards, Vam-tech-star

Comment From: mohitpaddhariya

@rusackas Could you please assign me that issue?

Comment From: geido

Hey @dev-mohit06 sure! Thanks for the help!

Comment From: rusackas

The issue persists, just to throw a new timestamp on this issue.

Comment From: geido


πŸŽ‰ Preset Bounty Available: $100 USD πŸŽ‰

To claim this bounty, please carefully follow the steps below.


πŸ“‹ Steps to Participate

  1. Review Guidelines:
    Read through the Preset Bounty Program Contribution Guide for complete details on bounty requirements.

  2. Show Your Interest:
    Complete the Preset Bounty Program Survey and comment this issue to express your interest.

  3. Join the Slack Channel:
    After completing the survey, you’ll receive an invitation to the dedicated Apache Superset Slack channel.

  4. Get Assigned:
    To officially start, ensure a Bounty Program Manager has assigned you to this issue.

  5. Submit Your Solution:
    When ready, submit your solution with the Fixes #{issue_number} notation in your Pull Request description.

  6. Claim Your Bounty:
    Sign up at GitPay.me and submit your solution via: https://gitpay.me/#/task/1212


πŸ’‘ Additional Notes

  • Only developers assigned by a Bounty Program Manager should start working on this issue to win the bounty.
  • Be sure to follow the guide closely to avoid any delays in payment. Please, allow a few days after your PR has been merged for the bounty to be released.

Good luck, and happy coding! πŸŽ‰

Comment From: Nandu9494

@geido I would like to take this, Please assign to me

Comment From: Sameerali0

@dosu can you tell me where the code is located for this and also why this is happening and possible solutions.

Comment From: dosubot[bot]

The code for the "Schemas Allowed for File Upload" field is in the frontend at superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx. It's implemented as a plain text <Input /> (not a Select or tag input), and its value is managed by the dbReducer in DatabaseModal/index.tsxβ€”which splits the input by commas and stores it as an array in the extra JSON for the database config. The field is only shown if file uploads are supported and enabled for the database. You can see the relevant code here.

There are no props like disabled or readOnly on the input, so the field should be editable as long as file upload is enabled and the database isn't managed externally. No event handlers block comma input. If you're unable to type commas or edit the field after it's populated, it's likely a UI bug or a state issue, not a deliberate restriction in the component code. The reducer logic does convert the input into an array, but this shouldn't prevent further editing as a comma-separated string unless something else in the UI is interfering source.

Possible solutions: - Double-check that "Allow file uploads to database" is enabled; otherwise, the field is hidden. - If the field is visible but not editable, look for any UI state or modal logic that could be disabling it (for example, if the database is managed externally, the modal disables the action button, but the field itself should still be editable). - If you confirm a UI bug (e.g., the field is visible but not accepting input), focus on the state management and input handler logic in ExtraOptions.tsx and dbReducer for debugging.

Let me know if you need a more detailed walkthrough of the code or want to discuss a specific fix!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report πŸ› | Other  Join Discord Share on X