question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.10.0 Instance Migration

See original GitHub issue

Summary

First time doing a Dagster instance migration (going from 0.9.15 to 0.10.0). We have Dagster running on ECS and the RDS instance is on private subnets so executing the migration dagster instance migration by running an ECS task on the cluster. Getting this error

2021-01-26T06:53:01.365-06:00 | $DAGSTER_HOME: /opt/dagster/dagster_home/
-- | --
  | 2021-01-26T06:53:03.000-06:00 | Updating run storage...
  | 2021-01-26T06:53:03.059-06:00 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
  | 2021-01-26T06:53:03.059-06:00 | INFO [alembic.runtime.migration] Will assume transactional DDL.
  | 2021-01-26T06:53:03.067-06:00 | INFO [alembic.runtime.migration] Running upgrade 567bc23fd1ac -> 8f8dba68fd3b, cascade run deletion
  | 2021-01-26T06:53:03.072-06:00 | Traceback (most recent call last):
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/bin/dagster", line 8, in <module>
  | 2021-01-26T06:53:03.072-06:00 | sys.exit(main())
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster/cli/__init__.py", line 43, in main
  | 2021-01-26T06:53:03.072-06:00 | cli(auto_envvar_prefix=ENV_PREFIX) # pylint:disable=E1123
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
  | 2021-01-26T06:53:03.072-06:00 | return self.main(*args, **kwargs)
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
  | 2021-01-26T06:53:03.072-06:00 | rv = self.invoke(ctx)
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
  | 2021-01-26T06:53:03.072-06:00 | return _process_result(sub_ctx.command.invoke(sub_ctx))
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
  | 2021-01-26T06:53:03.072-06:00 | return _process_result(sub_ctx.command.invoke(sub_ctx))
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
  | 2021-01-26T06:53:03.072-06:00 | return ctx.invoke(self.callback, **ctx.params)
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
  | 2021-01-26T06:53:03.072-06:00 | return callback(*args, **kwargs)
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster/cli/instance.py", line 47, in migrate_command
  | 2021-01-26T06:53:03.072-06:00 | instance.upgrade(click.echo)
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster/core/instance/__init__.py", line 482, in upgrade
  | 2021-01-26T06:53:03.072-06:00 | self._run_storage.upgrade()
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster_postgres/run_storage/run_storage.py", line 102, in upgrade
  | 2021-01-26T06:53:03.072-06:00 | run_alembic_upgrade(alembic_config, self._engine)
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster/core/storage/sql.py", line 28, in run_alembic_upgrade
  | 2021-01-26T06:53:03.072-06:00 | upgrade(alembic_config, rev)
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/alembic/command.py", line 294, in upgrade
  | 2021-01-26T06:53:03.072-06:00 | script.run_env()
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/alembic/script/base.py", line 481, in run_env
  | 2021-01-26T06:53:03.072-06:00 | util.load_python_file(self.dir, "env.py")
  | 2021-01-26T06:53:03.072-06:00 | File "/usr/local/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 97, in load_python_file
  | 2021-01-26T06:53:03.072-06:00 | module = load_module_py(module_id, path)
  | 2021-01-26T06:53:03.073-06:00 | File "/usr/local/lib/python3.7/site-packages/alembic/util/compat.py", line 182, in load_module_py
  | 2021-01-26T06:53:03.073-06:00 | spec.loader.exec_module(module)
  | 2021-01-26T06:53:03.073-06:00 | File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  | 2021-01-26T06:53:03.073-06:00 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  | 2021-01-26T06:53:03.073-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster_postgres/run_storage/alembic/env.py", line 72, in <module>
  | 2021-01-26T06:53:03.073-06:00 | run_migrations_online()
  | 2021-01-26T06:53:03.073-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster_postgres/run_storage/alembic/env.py", line 66, in run_migrations_online
  | 2021-01-26T06:53:03.073-06:00 | context.run_migrations()
  | 2021-01-26T06:53:03.073-06:00 | File "<string>", line 8, in run_migrations
  | 2021-01-26T06:53:03.073-06:00 | File "/usr/local/lib/python3.7/site-packages/alembic/runtime/environment.py", line 813, in run_migrations
  | 2021-01-26T06:53:03.073-06:00 | self.get_context().run_migrations(**kw)
  | 2021-01-26T06:53:03.073-06:00 | File "/usr/local/lib/python3.7/site-packages/alembic/runtime/migration.py", line 560, in run_migrations
  | 2021-01-26T06:53:03.073-06:00 | step.migration_fn(**kw)
  | 2021-01-26T06:53:03.073-06:00 | File "/usr/local/lib/python3.7/site-packages/dagster_postgres/run_storage/alembic/versions/8f8dba68fd3b_cascade_run_deletion.py", line 27, in upgrade
  | 2021-01-26T06:53:03.073-06:00 | op.drop_constraint("run_tags_run_id_fkey", table_name="run_tags", type="foreignkey")
  | 2021-01-26T06:53:03.073-06:00 | File "<string>", line 8, in drop_constraint
  | 2021-01-26T06:53:03.073-06:00 | TypeError: drop_constraint() got an unexpected keyword argument 'type'

Reproduction

Running 0.9.15 and trying to migrate the instance database

Dagit UI/UX Issue Screenshots

Additional Info about Your Environment

Running dagit service on ECS

Message from the maintainers:

Cannot upgrade to 0.10.0 without manually deleting database

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dehume-drizlycommented, Jan 26, 2021

Sounds good. I changed to alembic to 1.4.3 (while still using 0.10.0) and the migration was successful. Longer term I’ll update to 0.10.1

0reactions
gibsondancommented, Jan 26, 2021

Great! Just let us know if anything else comes up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade 0.9 to 0.10 - OpenMetadata Docs
To migrate the metadata from the 0.9 to the 0.10 version you need to ingest all the connectors in the 0.10 version with...
Read more >
Changelog — os-migrate documentation - GitHub Pages
0.10.0 (2021-09-01) . New . Add a floating IP after creating the server instance. [Carlos Camacho]. This commit disables the auto...
Read more >
Package com.google.cloud.bigquery.migration.v2alpha (0.10.0)
This class can be customized by passing in a custom instance of MigrationServiceSettings to create(). For example: To customize credentials:.
Read more >
migration guide - Dagster Docs
After upgrading to 0.10.0, run the dagster instance migrate command to migrate your instance storage to the latest schema. This will turn off...
Read more >
Migration Guide — Rally 1.0.2 documentation - Read the Docs
Otherwise, you need to replace all instances of logging.handlers. ... In Rally 0.10.0 we have deprecated some parameter names in custom parameter sources....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found