JustinTsui opened a new issue #15356: URL: https://github.com/apache/superset/issues/15356
I'm using docker image apache/superset:latest (image id 399849195b83) and following the docs from [How to use this image from https://hub.docker.com/r/apache/superset. When I'm setting admin account with another username, seems nothing wrong with the command. But the following `load examples` and `init` will cause an error (see section screenshots below). ```shell $ docker exec -it superset superset fab create-admin \ --username notadminhere \ --firstname John \ --lastname Doe \ --email john....@example.com \ --password admin123 2021-06-24 08:04:24,539:INFO:superset.utils.logging_configurator:logging was configured successfully 2021-06-24 08:04:24,547:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'> /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled. "Flask-Caching: CACHE_TYPE is set to null, " Recognized Database Authentications. Admin User notadminhere created. ``` Errors will disappear if I re-run the image and change username to admin. So I'm guessing maybe somewhere using the exact string `admin` as a condition and that's the root cause. Not sure if I'm doing it wrong or it's an already known issue. ### Expected results Can create an account as admin which username is not limited to `admin`. ### Actual results Admin account with another name will fail the init process, and the web isn't displayed correctly. #### Screenshots `load examples` and / or `init` commands will fail as below. ``` Traceback (most recent call last): File "/usr/local/bin/superset", line 33, in <module> sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')()) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 586, in main return super(FlaskGroup, self).main(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator return __ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/app/superset/cli.py", line 198, in load_examples load_examples_run(load_test_data, load_big_data, only_metadata, force) File "/app/superset/cli.py", line 123, in load_examples_run from superset import examples File "/app/superset/examples/__init__.py", line 19, in <module> from .birth_names import load_birth_names File "/app/superset/examples/birth_names.py", line 47, in <module> "Admin user does not exist. " superset.exceptions.NoDataException: Admin user does not exist. Please, check if test users are properly loaded (`superset load_test_users`). ``` #### How to reproduce the bug ```shell docker run -d -p 8765:8088 --name superset apache/superset docker exec -it superset superset fab create-admin \ --username notadminhere \ --firstname John \ --lastname Doe \ --email john....@example.com \ --password admin123 # successed docker exec -it superset superset db upgrade # successed docker exec -it superset superset load_examples # failed docker exec -it superset superset init # also failed ``` ### Environment Docker image apache/superset:lates t(image id 399849195b83) ### Checklist Make sure to follow these steps before submitting your issue - thank you! - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any. - [x] I have reproduced the issue with at least the latest released version of superset. - [ ] I have checked the issue tracker for the same issue and I haven't found one similar. -- 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. 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