Skip to content

Zero-downtime migration mode stores tasks without last_updated #1371

Description

@ConnorMoss02

What happens

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.

Version

main @ d316d0e

Activity

  1. added
    component: serverIssues related to frameworks for agent execution, HTTP/event handling, database persistence logic.
    on Oct 23, 2026
  2. added theissue type on Oct 23, 2026
  3. rohityan commented on Oct 23, 2026

    @rohityan

    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.

  4. added a commit that references this issue on Oct 23, 2026
    30b6d50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component: serverIssues related to frameworks for agent execution, HTTP/event handling, database persistence logic.status:awaiting response

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions