Skip to content

bug: GetLatestWorkspaceAppStatusesByAppID returns an unbounded number of rows #20862

@spikecurtis

Description

@spikecurtis

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

GetLatestWorkspaceAppStatusesByAppID returns all app statuses ever written for the given app. This could be quite large for a long running AI task.

Only the first (most recent) status is ever used at present, to determine whether the WorkspaceAppStatusState is changing while inserting a new status update.

Relevant Log Output

Expected Behavior

No response

Steps to Reproduce

Run an AI task that updates status more than once.

Environment

  • Host OS:
  • Coder version:

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions