Hello,

I am new to redash and I have to upgrade redash to the latest version and for that as I understood it has to be done step by step.

But the upgrade script is unable to find the v4 version, however it can find v5 or higher.

I have trie different solutions:

change release = response.json()[0] to release = response.json()[between 0 & 4 (can't go higher otherwise)]

Modify your upgrade script, particularly the get_release method, with something like this:

def get_release(channel):
    if channel == 'ci':
        return get_latest_release_from_ci()

    response = requests.get('https://version.redash.io/api/releases?channel={}'.format(channel))
    # release = response.json()[0]

    ### CUSTOM ###
    # hardcode to v4.0.2
    release = [r for r in response.json() if r['version'] == '4.0.2']

    if len(release) == 0:
        exit(1)

    print(release)
    release = release[0]
    ### END CUSTOM ###

    filename = release['download_url'].split('/')[-1]
    release = Release(release['version'], release['download_url'], filename, release['description'])

    return release

still can’t find the v4 version… Maybe it’s not available on the circleci artifact anymore ?
cc @arikfr ?

Technical details:

  • Redash Version: v3.0.0
  • Browser/OS: Ubuntu 20.04 LTS
  • How did you install Redash: Legacy bootstrap script

Any help would be very appreciate.

Best,

Hi,

Here’s the download URLs for the previous versions:

Hi @arikfr Many thanks for your and the links.
So I have changed the script to run 4.01. Unfortunately upgrade script fetch only until 5.0.1

Also by updating release = response.json()[4] (where 4 seems to be the higher value authorized). It fetches the older version found (5.0.1)

Starting Redash upgrade:
Found version: 5.0.1
Current version: 3.0.0+b3134

Any help, to make it fetch easily the version I’d like? I am not a python dev unfortunately.

please check the release output dump:

[{u’description’: u"See CHANGELOG for the full release notes.\n\n—\n\n* Before doing an upgrade, please make sure you have a backup.\n* If you have any issues, please refer to the troubleshooting section in the upgrade guide.\n* If the upgrade guide doesn’t help, you can ask for help on the forum.\n", u’released_at’: u’2019-10-27T00:00:00.000Z’, u’download_url’: u’’, u’version’: u’8.0.0’, u’docker_image’: u’redash/redash:8.0.0.b32245’, u’backward_compatible’: False, u’id’: 39, u’channel’: u’stable’}, {u’description’: u"Please read the following before upgrading:\n\n1. If you’re using the tarball deployment and not Docker, you might need to manually update some of the dependencies. Compare your current Python dependencies with the ones in the requirements*.txt files.\n\n2. This release adds encryption of your data sources configuration. By default it will use the REDASH_COOKIE_SECRET as encryption key. But we recommend setting a new key for it using the REDASH_SECRET_KEY environment variable. Note that you need to set this before running migrations. Otherwise everything will be encrypted with REDSAH_COOKIE_SECRET.\n\n—\n\n* Before doing an upgrade, please make sure you have a backup.\n* If you have any issues, please refer to the troubleshooting section in the upgrade guide:\n https://redash.io/help/open-source/admin-guide/how-to-upgrade\n* If the upgrade guide doesn’t help, you can ask for help on the forum (http://discuss.redash.io).\n\nFull CHANGELOG for this release: redash/CHANGELOG.md at master · getredash/redash · GitHub", u’released_at’: u’2019-03-17T00:00:00.000Z’, u’download_url’: u’https://s3.amazonaws.com/redash-releases/redash.7.0.0.b17535.tar.gz’, u’version’: u’7.0.0’, u’docker_image’: u’redash/redash:7.0.0.b18042’, u’backward_compatible’: False, u’id’: 37, u’channel’: u’stable’}, {u’description’: u"IMPORTANT: make sure to clear out the Celery queue before upgrading.\n\n* Before doing an upgrade, please make sure you have a backup.\n* If you have any issues, please refer to the troubleshooting section in the upgrade guide:\n https://redash.io/help/open-source/admin-guide/how-to-upgrade\n* If the upgrade guide doesn’t help, you can ask for help on the forum (http://discuss.redash.io).\n\nFull CHANGELOG for this release: redash/CHANGELOG.md at master · getredash/redash · GitHub", u’released_at’: u’2018-12-17T00:00:00.000Z’, u’download_url’: u’https://s3.amazonaws.com/redash-releases/redash.6.0.0.b8536.tar.gz’, u’version’: u’6.0.0’, u’docker_image’: u’redash/redash:6.0.0.b8537’, u’backward_compatible’: False, u’id’: 35, u’channel’: u’stable’}, {u’description’: u"* Before doing an upgrade, please make sure you have a backup.\n* If you have any issues, please refer to the troubleshooting section in the upgrade guide:\n https://redash.io/help/open-source/admin-guide/how-to-upgrade\n* If the upgrade guide doesn’t help, you can ask for help on the forum (http://discuss.redash.io).\n\nFull CHANGELOG for this release: redash/CHANGELOG.md at master · getredash/redash · GitHub", u’released_at’: u’2018-10-18T00:00:00.000Z’, u’download_url’: u’https://s3.amazonaws.com/redash-releases/redash.5.0.2.b5485.tar.gz’, u’version’: u’5.0.2’, u’docker_image’: u’redash/redash:5.0.2.b5486’, u’backward_compatible’: False, u’id’: 33, u’channel’: u’stable’}, {u’description’: u"* Before doing an upgrade, please make sure you have a backup.\n* If you have any issues, please refer to the troubleshooting section in the upgrade guide:\n https://redash.io/help/open-source/admin-guide/how-to-upgrade\n* If the upgrade guide doesn’t help, you can ask for help on the forum (http://discuss.redash.io).\n\nFull CHANGELOG for this release: redash/CHANGELOG.md at master · getredash/redash · GitHub", u’released_at’: u’2018-09-27T00:00:00.000Z’, u’download_url’: u’https://s3.amazonaws.com/redash-releases/redash.5.0.1.b4851.tar.gz’, u’version’: u’5.0.1’, u’docker_image’: u’redash/redash:5.0.1.b4850’, u’backward_compatible’: False, u’id’: 32, u’channel’: u’stable’}]

Many thanks.

Why not just override the call with the exact URL that Arik provided?

Since you already have the download url, you can hardcode that Release instance returned at the end.

this should work:

def get_release(channel):
    download_url = 'https://s3.amazonaws.com/redash-releases/redash.4.0.1.b4038.tar.gz'
    version = '4.0.1'
    description = 'Before doing an upgrade, please make sure you have a backup'

    filename = download_url.split('/')[-1]
    release = Release(version, download_url, filename, description)

    return release
1 Like

Many thanks @androsj you’re the best !