Skip to content

Redis backend: GetWorkflowInstances returns no results with go-redis >= v9.19.0 #479

Description

@DerkSchooltink

Bug

GetWorkflowInstances in backend/redis/diagnostics.go returns 0 results when used with go-redis v9.19.0+, breaking the workflow dashboard.

Root cause

go-redis v9.19.0 (#3751) removed the automatic Start/Stop swap for ZRANGE ... BYSCORE REV. Redis requires the range high → low when REV is set (Start = upper bound, Stop = lower bound). The previous argument order worked silently due to the library reordering them; it no longer does.

// diagnostics.go — wrong order
rb.rdb.ZRangeArgs(ctx, redis.ZRangeArgs{
    Stop:    stop,    // "+inf" / cursor — actually the upper bound
    Start:   "-inf",
    ByScore: true,
    Rev:     true,
})

Redis receives ZRANGE key -inf +inf BYSCORE REV which always returns an empty set.

Fix

Swap Start and Stop — PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions