You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Zero-downtime migration mode stores tasks without last_updated #1371
With core_to_model_conversion = core_to_compat_task_model (the zero-downtime mode in docs/migrations/v1_0/database/zero_downtime.md), tasks are saved with last_updated NULL. ListTasks with status_timestamp_after then returns no tasks, and ordering falls back to NULLs.
Why
core_to_compat_task_model (compat/v0_3/model_conversions.py) never sets last_updated. The v1.0 path in DatabaseTaskStore sets it from status.timestamp.
Hi @ConnorMoss02, thank you for the detailed report and pinpointing the root-cause, identifying that core_to_compat_task_model leaves TaskModel.last_updated as NULL.
Thank you for contributing PR #1372 it takes the exact right approach by mirroring the v1.0 conversion timestamp mapping. Assigning the issue to you till your PR gets reviewed.
As an immediate workaround while the PR is being reviewed, you can wrap core_to_compat_task_model in a custom function passed to DatabaseTaskStore(core_to_model_conversion=...) that sets model.last_updated = task.status.timestamp.ToDatetime() whenever task.status.HasField('timestamp') is true.
Activity
rohityan commentedon Oct 23, 2026
Hi @ConnorMoss02, thank you for the detailed report and pinpointing the root-cause, identifying that
core_to_compat_task_modelleavesTaskModel.last_updatedasNULL.Thank you for contributing PR #1372 it takes the exact right approach by mirroring the v1.0 conversion timestamp mapping. Assigning the issue to you till your PR gets reviewed.
As an immediate workaround while the PR is being reviewed, you can wrap
core_to_compat_task_modelin a custom function passed toDatabaseTaskStore(core_to_model_conversion=...)that setsmodel.last_updated = task.status.timestamp.ToDatetime()whenevertask.status.HasField('timestamp')is true.fix(compat): set last_updated when storing a task in v0.3 format (a2a…