Repository navigation
Conversation
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
nickvigilante
left a comment
There was a problem hiding this comment.
Docs look sufficient for this change.
The workspace-scheduling.md edit matches the activity-bump removal, the admin schedule page already lists only session-based activity, and the API reference is regenerated with no remaining references to app statuses, latest_app_status, or the app-status endpoint.
One optional suggestion, not blocking: docs/ai-coder/agents/tasks-to-chats-migration.md (open) covers the Tasks API but not the workspace-level surfaces this PR removes.
That file isn't in this diff, so here's the text instead of a suggestion block.
It would go at the end of 5. Update status handling, before 6. Replace delete with archive:
Coder also removed workspace app statuses, which agents running inside Coder Tasks workspaces used to report progress.
If your integration reports or reads these statuses, update it as follows:
- Stop calling `PATCH /api/v2/workspaceagents/me/app-status`.
Requests to it fail.
- Stop reading `latest_app_status` from workspace responses and `statuses` from workspace app objects.
These fields are no longer returned.
- Read the chat `status` instead, from `GET /api/v2/chats/{chat}` or from `status` events on `GET /api/v2/chats/{chat}/stream`.
A `working` status report no longer extends the workspace deadline.
For what does keep a workspace active, see [activity detection](../../user-guides/workspace-scheduling.md#activity-detection).If agent modules reported statuses outside of Tasks too, the first sentence should be broader.
The release notes in the PR body already cover the removal, so skipping this is fine.
Generated by Coder Agents on behalf of @nickvigilante.
aslilac
left a comment
There was a problem hiding this comment.
I'd love a second look from @spikecurtis or someone with more knowledge/thoughts about the protobuf stuff (especially wrt versioning) but overall I love removing code :)
| // The socket server accepts requests from processes running inside the workspace and forwards | ||
| // some of the requests to Coderd over the DRPC connection. | ||
| if a.socketServer != nil { | ||
| a.socketServer.SetAgentAPI(aAPI) | ||
| defer a.socketServer.ClearAgentAPI() | ||
| } |
There was a problem hiding this comment.
what? this seems entirely unrelated. why is this being removed?
There was a problem hiding this comment.
This is related: SetAgentAPI / ClearAgentAPI only existed to hand the agent API client to the socket server so it could forward UpdateAppStatus to coderd. On main the only reader of agentAPI is DRPCAgentSocketService.UpdateAppStatus. With that RPC removed, nothing reads it, so I dropped the setter and the call here instead of leaving dead plumbing.
9479d26 to
35dbeea
Compare
|
@spikecurtis quick versioning question. Agent API v2.13 through v2.15 are all unreleased (v2.38.0 ships v2.12). This PR adds v2.16 to record the |
Coder Tasks have been removed, and workspace app statuses only existed to drive the Tasks UI. Remove the feature end to end: - Drop the workspace_app_statuses table and workspace_app_status_state enum, and their queries, dbauthz, dbmetrics, and dbmock code. - Remove the deprecated PATCH /api/v2/workspaceagents/me/app-status endpoint and agentsdk.PatchAppStatus / ProtoFromPatchAppStatus. - Remove codersdk.WorkspaceAppStatus and WorkspaceAppStatusState, the WorkspaceApp.statuses and Workspace.latest_app_status fields, and the latest_build.resources.agents.apps.statuses include_related path. - Turn the UpdateAppStatus RPC on the Agent API and the agent socket into deprecated no-ops so older agents and CLIs keep working, and drop the agent socket plumbing that forwarded it to coderd. - Remove the app status UI from the workspace and workspaces pages. BREAKING CHANGE: removes the PATCH /api/v2/workspaceagents/me/app-status endpoint, the workspace app status SDK types and response fields, and the workspace_app_statuses table. UpdateAppStatus requests are accepted and discarded.
Only the in-workspace CLI called the agent socket UpdateAppStatus RPC, and that caller is gone, so remove the RPC and its messages from the agent socket outright. The Agent API UpdateAppStatus RPC stays as a deprecated no-op because Agent API RPCs are only removed in a major version.
Reporting a working app status no longer extends the workspace deadline, so drop it from the list of activity that keeps a workspace running. Also remove the activity bump reason only that path used.
f0051ae to
cdb7244
Compare
Workspace app statuses only existed to drive the Coder Tasks UI. Tasks are gone, so this removes app statuses end to end. Follows #30742.
Breaking changes
PATCH /api/v2/workspaceagents/me/app-statusandagentsdk.PatchAppStatus/ProtoFromPatchAppStatus.codersdk.WorkspaceAppStatus,WorkspaceAppStatusState,WorkspaceApp.Statuses(statuses) andWorkspace.LatestAppStatus(latest_app_status), and thelatest_build.resources.agents.apps.statusesinclude_relatedpath.UpdateAppStatusRPC is deprecated and now a no-op. coderd accepts and discards the request, so older agents keep working.UpdateAppStatusRPC is removed. Older in-workspace CLIs that call it get anunknown rpcerror.workingstatus no longer extends the workspace deadline.000628dropsworkspace_app_statusesand theworkspace_app_status_stateenum. Existing rows are deleted.Release notes: Removed workspace app statuses, which only the removed Coder Tasks feature used. This drops the deprecated
PATCH /api/v2/workspaceagents/me/app-statusendpoint, thestatusesandlatest_app_statusresponse fields, and stored status history. Older agents that still report statuses keep working and their reports are ignored. Older in-workspace CLIs that report through the agent socket now get an error.Notes
DRPCAgentClient28includes it. It can go in the next major Agent API version. The Agent API goes to v2.16 to record the deprecation. The wire protocol is unchanged.