mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore(codersdk): deprecate WorkspaceAppStatus.{NeedsUserAttention,Icon} (#17358)
https://github.com/coder/coder/pull/17163 introduced the `workspace_app_statuses` table. Two of these fields (`needs_user_attention`, `icon`) turned out to be surplus to requirements. - Removes columns `needs_user_attention` and `icon` from `workspace_app_statuses` - Marks the corresponding fields of `codersdk.WorkspaceAppStatus` as deprecated.
This commit is contained in:
@ -366,8 +366,10 @@ func TestWorkspaceAgentAppStatus(t *testing.T) {
|
||||
AppSlug: "vscode",
|
||||
Message: "testing",
|
||||
URI: "https://example.com",
|
||||
Icon: "https://example.com/icon.png",
|
||||
State: codersdk.WorkspaceAppStatusStateComplete,
|
||||
// Ensure deprecated fields are ignored.
|
||||
Icon: "https://example.com/icon.png",
|
||||
NeedsUserAttention: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -376,6 +378,9 @@ func TestWorkspaceAgentAppStatus(t *testing.T) {
|
||||
agent, err := client.WorkspaceAgent(ctx, workspace.LatestBuild.Resources[0].Agents[0].ID)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, agent.Apps[0].Statuses, 1)
|
||||
// Deprecated fields should be ignored.
|
||||
require.Empty(t, agent.Apps[0].Statuses[0].Icon)
|
||||
require.False(t, agent.Apps[0].Statuses[0].NeedsUserAttention)
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user