Skip to content

Conversation

@mafredri
Copy link
Member

@mafredri mafredri commented Nov 7, 2025

This change restructures the tasks_with_status view query to:

  • Improve debuggability by adding a status_debug column to better understand the outcome
  • Reduce clutter from bool_or, bool_and which are aggregate functions that did not actually have serve a purpose (each join is 0-1 rows)
  • Improve agent lifecycle state coverage, start_timeout and start_error were omitted
    • These states are easy to trigger even in a perfectly functioning workspace/task so we now rely on app health to report whether or not there was an issue
  • Agent stop states were implicitly unknown, now there are explicit (I initially considered error, could go either way)

@mafredri mafredri force-pushed the mafredri/fix-coderd-database-task-status-view branch 2 times, most recently from b7a6a36 to ba00051 Compare November 13, 2025 13:29
@mafredri mafredri force-pushed the mafredri/fix-coderd-database-task-status-view branch from ba00051 to 136839b Compare November 13, 2025 13:47
@mafredri mafredri marked this pull request as ready for review November 13, 2025 13:48
Copy link
Contributor

@ssncferreira ssncferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🧊
Just a comment about adding workspace_agent.lifecycle_state and workspace_app.health to the final SELECT, if you think that would make sense 🙂

@mafredri mafredri force-pushed the mafredri/fix-coderd-database-task-status-view branch from 7c5698c to ea8080a Compare November 13, 2025 17:29
Copy link
Contributor

@ssncferreira ssncferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@mafredri mafredri merged commit 1483fd1 into main Nov 14, 2025
30 checks passed
@mafredri mafredri deleted the mafredri/fix-coderd-database-task-status-view branch November 14, 2025 17:52
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants