Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@kraftp kraftp released this 25 Sep 15:21
9aabef8

DBOS Python 2.0 dramatically reduces package size, reducing DBOS from 18 to 6 direct dependencies and from 73 to 10 total dependencies. It also makes the system database more configurable, adding options to use a custom SQLAlchemy engine or custom database schema.

Fewer Dependencies

Breaking Changes

  • OpenTelemetry is now optional and opt-in. To use DBOS OpenTelemetry features (such as built-in tracing and export) you must install the optional DBOS-OpenTelemetry dependencies (pip install dbos[otel]) and set the enable_otlp flag to True in your configuration:
config: DBOSConfig = {
  "name": "my-app",
  "system_database_url": os.environ.get("DBOS_SYSTEM_DATABASE_URL"),
  "enable_otlp": True,
}
DBOS(config=config)
  • In order to fix silent errors and improve maintainability, we’ve changed the serialization format from jsonpickle to pickle. Because of this change, workflows started on pre-2.0 cannot be forked or recovered in 2.0. This can also affect apps that use custom Workflow IDs to return the results of previously run workflows.

  • In order to upgrade from version 1.12.0 or below, first upgrade to 1.14.0, then upgrade to 2.0. This is because the Alembic-based system database migrations deprecated in DBOS Python 1.13.0 have been removed. System database migrations are now totally managed by DBOS.

  • The following deprecated parameters or methods were removed: the sys_db_name configuration parameter, the workflow restart method and command (replaced with fork), and the parent_workflow_id method.

  • Support for Python 3.9 is dropped as it is reaching end of life.

New Features

  • The current application version can now be accessed through DBOS.application_version
  • The system database schema can now be configured through the dbos_system_schema parameter.
  • A custom system database engine can now be configured through the system_database_engine. If provided, DBOS will not create an engine but use this instead.
  • A new DBOS.get_all_events method lets you retrieve all events published by a workflow.

All Changes

Full Changelog: 1.14.0...2.0.0