Can't locate revision identified by - upgrade from 1.0.1+b2833 to 1.0.3


#1

Hi Guys,

While trying to upgrade from 1.0.1+b2833 to 1.0.3 I got the below error:

root@0e5f707dda4e:/opt/redash/current# bin/upgrade
Starting Redash upgrade:
Found version: 1.0.3
Current version: 1.0.1+b2833
Before upgrading to this version, please make sure to do the following changes to your /opt/redash/.env file:

  1. If you have local PostreSQL database, you will need to update the URL from postgresql://redash to postgresql:///redash.
  2. Remove the REDASH_STATIC_ASSETS_PATH definition.

Make sure to complete these changes before doing the actual upgrade.

Full CHANGELOG for this release: https://github.com/getredash/redash/blob/master/CHANGELOG.md#v103---2017-04-18
Continue with upgrade? (y/n): y
Downloading release tarball…
Unpacking to: redash.1.0.3.b2850…
Changing ownership to redash…
Linking .env file…
Installing new Python packages (if needed)…
Running migrations (if needed)…
Failed running: sudo -u redash bin/run ./manage.py db upgrade
Exit status: 1
Output:
[2017-07-31 12:09:33,191][PID:6787][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2017-07-31 12:09:33,191][PID:6787][INFO][alembic.runtime.migration] Will assume transactional DDL.
Traceback (most recent call last):
File “/opt/redash/redash.1.0.3.b2850/manage.py”, line 9, in
manager()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/flask/cli.py”, line 345, in main
return AppGroup.main(self, *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/flask/cli.py”, line 229, in decorator
return __ctx.invoke(f, *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/flask_migrate/cli.py”, line 132, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File “/usr/local/lib/python2.7/dist-packages/flask_migrate/init.py”, line 239, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File “/usr/local/lib/python2.7/dist-packages/alembic/command.py”, line 254, in upgrade
script.run_env()
File “/usr/local/lib/python2.7/dist-packages/alembic/script/base.py”, line 425, in run_env
util.load_python_file(self.dir, ‘env.py’)
File “/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py”, line 93, in load_python_file
module = load_module_py(module_id, path)
File “/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py”, line 75, in load_module_py
mod = imp.load_source(module_id, path, fp)
File “migrations/env.py”, line 87, in
run_migrations_online()
File “migrations/env.py”, line 80, in run_migrations_online
context.run_migrations()
File “”, line 8, in run_migrations
File “/usr/local/lib/python2.7/dist-packages/alembic/runtime/environment.py”, line 836, in run_migrations
self.get_context().run_migrations(**kw)
File “/usr/local/lib/python2.7/dist-packages/alembic/runtime/migration.py”, line 321, in run_migrations
for step in self._migrations_fn(heads, self):
File “/usr/local/lib/python2.7/dist-packages/alembic/command.py”, line 243, in upgrade
return script._upgrade_revs(revision, rev)
File “/usr/local/lib/python2.7/dist-packages/alembic/script/base.py”, line 338, in _upgrade_revs
for script in reversed(list(revs))
File “/usr/lib/python2.7/contextlib.py”, line 35, in exit
self.gen.throw(type, value, traceback)
File “/usr/local/lib/python2.7/dist-packages/alembic/script/base.py”, line 174, in _catch_revision_errors
compat.raise_from_cause(util.CommandError(resolution))
File “/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py”, line 128, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File “/usr/local/lib/python2.7/dist-packages/alembic/script/base.py”, line 143, in _catch_revision_errors
yield
File “/usr/local/lib/python2.7/dist-packages/alembic/script/base.py”, line 334, in _upgrade_revs
revs = list(revs)
File “/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py”, line 641, in iterate_revisions
requested_lowers = self.get_revisions(lower)
File “/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py”, line 298, in get_revisions
return sum([self.get_revisions(id_elem) for id_elem in id
], ())
File “/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py”, line 303, in get_revisions
for rev_id in resolved_id)
File “/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py”, line 303, in
for rev_id in resolved_id)
File “/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py”, line 358, in _revision_for_ident
resolved_id)
alembic.util.exc.CommandError: Can’t locate revision identified by ‘69dd2c6f7446’

Any help would be much appreciated.