dosubot[bot] commented on issue #34891:
URL: https://github.com/apache/superset/issues/34891#issuecomment-3234639435

   <!-- Greeting -->
   Hi @oceantume! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   You're correct—there are two main issues with the `set-database-uri` CLI 
command:
   
   1. The `--database_name` and `--uri` options are defined as optional in the 
CLI, but the code requires them. If either is missing, the command fails with 
an unhandled exception instead of a user-friendly error message. This is due to 
the lack of validation before passing these arguments downstream, which leads 
to errors like `'NoneType' object has no attribute 'strip'` when `uri` is 
omitted 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/cli/update.py)).
   
   2. The `--skip_create` flag's help text is misleading. It says "Create the 
DB if it doesn't exist," but when you use the flag, it actually skips database 
creation. The logic is inverted: setting `--skip_create` prevents creation, 
which is the opposite of what the help text suggests 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/cli/update.py)).
   
   For now, always provide both `--database_name` and `--uri` when running the 
command, and be aware that `--skip_create` means "do not create the DB if it 
doesn't exist." There are no recent fixes or workarounds in the codebase for 
these issues.
   
   Let me know if you need help with a workaround or want details on how to 
patch the CLI locally.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/7c31defd-b7f2-44b5-8567-4b31df859af2?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/7c31defd-b7f2-44b5-8567-4b31df859af2?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/7c31defd-b7f2-44b5-8567-4b31df859af2?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/7c31defd-b7f2-44b5-8567-4b31df859af2?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/7c31defd-b7f2-44b5-8567-4b31df859af2?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/7c31defd-b7f2-44b5-8567-4b31df859af2?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/7c31defd-b7f2-44b5-8567-4b31df859af2?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34891)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to