You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/04/03 16:03:30 UTC
[GitHub] [incubator-superset] Pinimo opened a new issue #9461: CLI: Command
not found `superset fab reset-password`
Pinimo opened a new issue #9461: CLI: Command not found `superset fab reset-password`
URL: https://github.com/apache/incubator-superset/issues/9461
When using the CLI, the subcommand `reset-password` is not found in the `superset fab` command.
### Expected results
```
superset@e133a8dc5:/app$ superset fab reset-password --help
Usage: superset fab reset-password [OPTIONS]
Resets a user password
Options:
--username TEXT
--password TEXT
```
### Actual results
```
superset@e133a8dc5:/app$ superset fab reset-password --help
Usage: superset fab [OPTIONS] COMMAND [ARGS]...
Try 'superset fab --help' for help.
Error: No such command 'reset-password'.
```
#### Screenshots
None
#### How to reproduce the bug
To reproduce:
```bash
me@computer$ git fetch --all
me@computer$ git checkout origin/0.36
me@computer$ docker-compose build
me@computer$ docker run -it incubator-superset_superset-init /bin/bash
superset@e133a8dc5:/app$ superset fab reset-password --help
```
### Environment
(please complete the following information):
- superset version: 0.36
- python version: Python 3.6.9
- node.js version: `node -v`
- npm version: `npm -v`
### Checklist
Make sure these boxes are checked 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.
- [x] I have checked the issue tracker for the same issue and I haven't found one similar.
### Additional context
None
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar closed issue #9461: CLI: Command not
found `superset fab reset-password` in 0.36.0rc3
Posted by GitBox <gi...@apache.org>.
dpgaspar closed issue #9461: CLI: Command not found `superset fab reset-password` in 0.36.0rc3
URL: https://github.com/apache/incubator-superset/issues/9461
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on issue #9461: CLI:
Command not found `superset fab reset-password` in 0.36.0rc3
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #9461: CLI: Command not found `superset fab reset-password` in 0.36.0rc3
URL: https://github.com/apache/incubator-superset/issues/9461#issuecomment-610447568
mmm, yes it's not included on Docker, you can hack it by changing this line, if this is a major constraint to you: https://github.com/apache/incubator-superset/blob/master/Dockerfile#L89
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on issue #9461: CLI:
Command not found `superset fab reset-password` in 0.36.0rc3
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #9461: CLI: Command not found `superset fab reset-password` in 0.36.0rc3
URL: https://github.com/apache/incubator-superset/issues/9461#issuecomment-610409417
Hi @Pinimo,
Thank you for reporting this, yes seems like the new CLI on FAB is missing the `reset-password` option. You can still use: `fabmanager reset-password`.
Going to address this on FAB
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] Pinimo commented on issue #9461: CLI: Command
not found `superset fab reset-password` in 0.36.0rc3
Posted by GitBox <gi...@apache.org>.
Pinimo commented on issue #9461: CLI: Command not found `superset fab reset-password` in 0.36.0rc3
URL: https://github.com/apache/incubator-superset/issues/9461#issuecomment-610439671
Hi @dpgaspar,
Thank you for your kind reply. Yes, it is certainly a FAB issue. For the workaround, unfortunately, it looks like `fabmanager` is gone too...
```
me@mycomputer:incubator-superset % 0.36 $ docker-compose build superset-init
me@mycomputer:incubator-superset % 0.36 $ docker-compose run superset-init /bin/bash
Starting incubator-superset_redis_1 ... done
Starting incubator-superset_db_1 ... done
superset@8b1dd49a4263:/app$ fabmanager
bash: fabmanager: command not found
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on issue #9461: CLI:
Command not found `superset fab reset-password` in 0.36.0rc3
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #9461: CLI: Command not found `superset fab reset-password` in 0.36.0rc3
URL: https://github.com/apache/incubator-superset/issues/9461#issuecomment-612868242
flask fab reset-password is already on flask-appbuilder master branch, will be included next release
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] Pinimo commented on issue #9461: CLI: Command
not found `superset fab reset-password` in 0.36.0rc3
Posted by GitBox <gi...@apache.org>.
Pinimo commented on issue #9461: CLI: Command not found `superset fab reset-password` in 0.36.0rc3
URL: https://github.com/apache/incubator-superset/issues/9461#issuecomment-610385168
Right now, I am working around this by using the following hack. But any feedback on the root cause would be greatly appreciated.
It seems to me that none of the commands that used to be provided by `fabmanager` are available any more.
```python
#!/bin/bash
python << EOFPY
import psycopg2
from os import getenv
from werkzeug.security import generate_password_hash
def reset_admin_password():
""" Connect to the PostgreSQL database server """
conn = None
try:
# read connection parameters
params = {
'host': getenv('POSTGRES_HOST'),
'user': getenv('POSTGRES_USER'),
'dbname': getenv('POSTGRES_DB'),
'password': getenv('POSTGRES_PASSWORD'),
'user': getenv('POSTGRES_USER'),
}
# connect to the PostgreSQL server
print('Connecting to the PostgreSQL database...')
conn = psycopg2.connect(**params)
# create a cursor
cur = conn.cursor()
# execute a statement
pwhash = generate_password_hash(getenv('SUPERSET_ADMIN_PASSWORD'))
cur.execute(f'''
UPDATE ab_user
SET password = '{pwhash}'
WHERE username = 'admin'
''')
conn.commit()
print("Resetted admin password in DB hack")
# close the communication with the PostgreSQL
cur.close()
except (Exception, psycopg2.DatabaseError) as error:
print(error)
finally:
if conn is not None:
conn.close()
print('Database connection closed.')
if __name__ == '__main__':
if getenv('SUPERSET_ADMIN_PASSWORD'):
reset_admin_password()
else:
print('SUPERSET_ADMIN_PASSWORD not defined in env variables, exiting')
EOFPY
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org