Skip to content

5.5 Upgrade Guide

In this document we describe changes to be aware of when upgrading from orchestrator-core v5.4 to v5.5.

About 5.5

This release introduces: - TESTING defaults to False - Deprecations: code/functionality that still works but will be removed in v6

TESTING defaults to False

With TESTING=True, the API waits for every workflow it starts or resumes to finish before it responds, and with EXECUTOR=celery it also returns a 500 when the Celery task result is not available. That suits tests, not deployments, so the default is now False.

If your tests rely on the API waiting, set TESTING=true in their environment, e.g. in a root conftest.py before the settings are imported:

import os

os.environ.setdefault("TESTING", "true")

Deprecations

The following are deprecated and will be removed in a future major version. They may raise a DeprecationWarning when used which you can choose to suppress.

  • orchestrator.core.services.processes: StateMerger is deprecated in favor of the pure merge_state() function. You can inspect #1918 how to use the new function, or to copy the old definition. (removal tracked in #1963)
  • The legacy SQLAlchemy 1.x Query API is deprecated in favor of SQLAlchemy 2.x select() statements. See Legacy Query API below. (removal tracked in #1981)

Legacy Query API

orchestrator-core itself no longer uses the legacy Query API. Accessing the class-level query property on a model (SubscriptionTable.query) now raises a DeprecationWarning. In 6.0 the property is removed, together with SearchQuery, BaseModel.set_query() and the query_cls session argument.

# before
SubscriptionTable.query.filter(SubscriptionTable.status == "active").all()
db.session.query(ProductTable).count()
SubscriptionTable.query.get(subscription_id)

# after
db.session.scalars(select(SubscriptionTable).where(SubscriptionTable.status == "active")).all()
db.session.scalar(select(func.count()).select_from(ProductTable))
db.session.get(SubscriptionTable, subscription_id)

These helpers return a Query and are deprecated. Their replacements return a Select: execute it with db.session.scalars(...), and drop any .statement you called on the old result.

Deprecated Replacement
services.subscriptions.query_in_use_by_subscriptions services.subscriptions.select_in_use_by_subscriptions
services.subscriptions.query_depends_on_subscriptions services.subscriptions.select_depends_on_subscriptions
SubscriptionTable.find_by_product_tag SubscriptionTable.select_by_product_tag

db.range.apply_range_to_query takes a SearchQuery and is removed with it in 6.0; use apply_range_to_statement on a Select instead.