Issue Summary

Upgraded redash from v5 to v7 using and after that data source do not appaear on the redash console but the record exists in postgres database in encrypted version

Technical details:

  • Redash Version:7.0.0+b18042 . earlier version 5.0.2
  • Browser/OS:Chrome
  • How did you install Redash: Using docker image and deployment using ECS on AWS

docker images -a
docker run -it 0a8d2ac57b83 bash
export REDASH_DATABASE_URL=“postgresql://svc_redash:xxxxxx@xxxxxx/postgres”
export REDASH_REDIS_URL=“redis://redis.redashxxxxxxxx.net:6379/0”
bin/run ./manage.py check_settings
bin/run ./manage.py db upgrade

more details about the environment could be found on the below thread

even adding new data sources are not being visible in console but data exists in the table

Did you run the database migrations during your upgrade? Data source information is now encrypted in the Redash database. I wonder if that has something to do with what you’re seeing.

i ran the below command for the upgrade
bin/run ./manage.py db upgrade

shall i try without the upgrade to see if it works fine or not?even adding new data sources does not appear on console which is very weird

Have you had any success with this?

@samirs Have you managed to find a solution for this? I’m also suffering from the same issue and couldn’t find any solution, so far.

no solutions yet and we have to postpone the upgrade for prod because of this

Did your secret key change, by chance, during the upgrade?

no change to secret key

have you been able to find any luck with this @ahmokhtari and @jesse

finally able to get this fixed.

==========
ran the below on the local docker container and upgraded the database using the correct “REDASH_COOKIE_SECRET”

redash@a8fa5259c934:/app$ export REDASH_DATABASE_URL=“postgresql://svc_redash:xxxxxxxx@redash-dex.xxx.rds.amazonaws.com:5432/postgres”
redash@a8fa5259c934:/app$ export REDASH_REDIS_URL=“redis://redis.redash.xxxxxxnet:6379/0”
redash@a8fa5259c934:/app$ export REDASH_COOKIE_SECRET=xxxxxxxxxxxxxxxxxxx
redash@a8fa5259c934:/app$ ./manage.py db upgrade
/usr/local/lib/python2.7/dist-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
CryptographyDeprecationWarning,
[2020-08-18 22:12:30,219][PID:112][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2020-08-18 22:12:30,257][PID:112][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2020-08-18 22:12:33,776][PID:112][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2020-08-18 22:12:33,777][PID:112][INFO][alembic.runtime.migration] Will assume transactional DDL.
[2020-08-18 22:12:33,892][PID:112][INFO][alembic.runtime.migration] Running upgrade 71477dadd6ef -> 640888ce445d, Add new scheduling data.
[2020-08-18 22:14:28,935][PID:112][INFO][alembic.runtime.migration] Running upgrade 640888ce445d -> e7f8a917aa8e, Add user details JSON column.
[2020-08-18 22:14:29,650][PID:112][INFO][alembic.runtime.migration] Running upgrade e7f8a917aa8e -> 73beceabb948, bring_back_null_schedule
[2020-08-18 22:15:47,079][PID:112][INFO][alembic.runtime.migration] Running upgrade 73beceabb948 -> 98af61feea92, add_encrypted_options_to_data_sources
[2020-08-18 22:15:47,906][PID:112][INFO][alembic.runtime.migration] Running upgrade 98af61feea92 -> e5c7a4e2df4d, remove_query_tracker_keys