gavinsweet commented on issue #8538:
URL: https://github.com/apache/superset/issues/8538#issuecomment-1731994031

   Just to help anyone else coming across this.
   
   Trying to migrate / upgrade superset using backup of postgres metadata, 
shifting to new version. 
   I went from superset 2.0.x to 2.10.
   Then seeing problems with invalid decryption key, so you see the datasets in 
superset ui but the database connections barf.
   
   First, fix secret keys in superset_config.py
   
   PREVIOUS_SECRET_KEY = 'CHANGE_ME_TO_A_COMPLEX_RANDOM_SECRET' 
   SECRET_KEY = 'some-really-random-key' 
   
   <= determined original key from other (original) installation by getting 
session on superset container:
   $ docker exec -it superset_worker bash
   then:
   # superset shell
   then:
   >>> from flask import current_app; print(current_app.config["SECRET_KEY"])
   
   <= generate from: 
   bash$ openssl rand -base64 42
   
   Second, ensure to specify a version in your docker-compose config:
   $ vi docker-compose-non-dev.yml 
   x-superset-image: &superset-image 
apachesuperset.docker.scarf.sh/apache/superset:2.1.0
   
   Third, as per comments above, update the password and encrypted_extra values 
for your db connections in the restored metadata db:
   psql: update dbs set password = null, encrypted_extra = null
   
   Fourth, you should now be able to login to superset ui, go to database 
connections, and just re-enter the password(s) for your database(s) - then the 
dataset(s) for those databases come back to life.
   
   
   
   


-- 
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