MerNat opened a new issue, #24494:
URL: https://github.com/apache/superset/issues/24494
A clear and concise description of what the bug is.
#### How to reproduce the bug
My initial deployed superset service is 2.0.1.
I've simply followed the doc and replaced it with the image 2.1.0 and done
the migration steps with:
`superset db upgrade`
### Expected results
I believe I shouldn't get any errors while upgrading.
### Actual results
What happens is I'm getting an error that says:
```
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts',
'superset')())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in
__call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 567, in
main
return super().main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in
main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in
invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in
invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in
invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in
invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line
26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 407, in
decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in
invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask_migrate/cli.py", line
149, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/usr/local/lib/python3.8/site-packages/flask_migrate/__init__.py",
line 98, in wrapped
f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask_migrate/__init__.py",
line 185, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/usr/local/lib/python3.8/site-packages/alembic/command.py", line
294, in upgrade
script.run_env()
File "/usr/local/lib/python3.8/site-packages/alembic/script/base.py", line
490, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python3.8/site-packages/alembic/util/pyfiles.py",
line 97, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python3.8/site-packages/alembic/util/compat.py", line
184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
File "/app/superset/extensions/../migrations/env.py", line 126, in <module>
run_migrations_online()
File "/app/superset/extensions/../migrations/env.py", line 118, in
run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File
"/usr/local/lib/python3.8/site-packages/alembic/runtime/environment.py", line
813, in run_migrations
self.get_context().run_migrations(**kw)
File
"/usr/local/lib/python3.8/site-packages/alembic/runtime/migration.py", line
561, in run_migrations
step.migration_fn(**kw)
File
"/app/superset/migrations/versions/2022-06-14_15-28_e09b4ae78457_resize_key_value_blob.py",
line 35, in upgrade
batch_op.alter_column(
File "/usr/local/lib/python3.8/contextlib.py", line 120, in __exit__
next(self.gen)
File "/usr/local/lib/python3.8/site-packages/alembic/operations/base.py",
line 336, in batch_alter_table
impl.flush()
File "/usr/local/lib/python3.8/site-packages/alembic/operations/batch.py",
line 86, in flush
fn(*arg, **kw)
File "/usr/local/lib/python3.8/site-packages/alembic/ddl/postgresql.py",
line 128, in alter_column
self._exec(
File "/usr/local/lib/python3.8/site-packages/alembic/ddl/impl.py", line
146, in _exec
return conn.execute(construct, multiparams)
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py",
line 1306, in execute
return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py", line
80, in _execute_on_connection
return connection._execute_ddl(
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py",
line 1398, in _execute_ddl
ret = self._execute_context(
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py",
line 1862, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py",
line 2043, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py",
line 207, in raise_
raise exception
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py",
line 1819, in _execute_context
self.dialect.do_execute(
File
"/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line
732, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege)
must be owner of table key_value
[SQL: ALTER TABLE key_value ALTER COLUMN value TYPE BYTEA ]
(Background on this error at: https://sqlalche.me/e/14/f405)
```
#### Screenshots
The `superset` user accessing the database has also all the
privileges/access to do anything on the table.

### Environment
(please complete the following information):
- Current superset version that I have is 2.0.1
Do I need to change the ownership of the table or missing some steps to do
the migration or upgrade of the superset?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]