Skip to content

[Refactor/Chore] Consolidate workflow persistence async writes into default repositories #36456

@laipz8200

Description

@laipz8200

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for refactors or chores; if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template and fill in all the required fields.

Description

Workflow persistence currently has separate repository implementations for synchronous SQLAlchemy writes and Celery-backed async writes. This makes the repository choice encode runtime behavior that should instead depend on the invocation source.

Refactor workflow persistence so the default SQLAlchemy workflow execution repositories support both synchronous and asynchronous write modes:

  • Debugger executions should keep synchronous DB writes for immediate read-after-write behavior.
  • WebApp, Service API, trigger, and other non-debug executions should enqueue Celery tasks for DB persistence.
  • The repository factory should continue to only load repository classes from configured paths.
  • The legacy Celery workflow execution repositories should be removed once the mixed-mode SQLAlchemy repositories become the default.

Motivation

This simplifies the workflow persistence architecture by keeping storage behavior in the default repositories and letting the persistence layer select the write mode from InvokeFrom. It removes duplicated repository implementations and avoids using configuration paths to switch behavior that is runtime-specific.

Additional Context

Celery tasks remain as the async write mechanism. The removed pieces are the old Celery repository classes, their exports, tests, and obsolete workflow node execution storage config.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions