Skip to content

feat: implement reconciliation loop #17255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 64 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
148dae1
fix: add fallback icons for notifications (#17013)
defelmnq Mar 28, 2025
c679991
docs: edit workspace lifecycle description (#17146)
EdwardAngert Mar 28, 2025
a9574fb
chore(cli): increase timeout for TestSSH_Container subtests (#17148)
johnstcn Mar 28, 2025
ac74c65
test(cli): fix data race in `TestCreateWithRichParameters` (#17128)
mafredri Mar 28, 2025
562a6c9
chore: add .cursorrules config (#17160)
sreya Mar 28, 2025
d3050a7
chore: bump github.com/prometheus/common from 0.62.0 to 0.63.0 (#16959)
dependabot[bot] Mar 28, 2025
9bc727e
chore: add support for one-way websockets to backend (#16853)
Parkreiner Mar 28, 2025
489641d
feat: set icons for each type of notification (#17115)
BrunoQuaresma Mar 31, 2025
8ea956f
feat: add app status tracking to the backend (#17163)
kylecarbs Mar 31, 2025
057cbd4
feat(cli): add `coder exp mcp` command (#17066)
johnstcn Mar 31, 2025
40de51b
chore: bump vite from 5.4.15 to 5.4.16 in /site (#17176)
dependabot[bot] Mar 31, 2025
7b14b4f
chore: update msw to 2.4.8 (#17167)
sreya Mar 31, 2025
8340567
chore: pin goimports to 0.31.0 (#17177)
sreya Apr 1, 2025
989c3ec
chore: pin various dependencies in CI files (#17180)
sreya Apr 1, 2025
cc733ab
ci: check go versions are consistent (#17149)
johnstcn Apr 1, 2025
e4cf189
chore(mcp): fix test flakes (#17183)
johnstcn Apr 1, 2025
7d08bf0
chore: improve error logging in TestServer/EphemeralDeployment (#17184)
hugodutka Apr 1, 2025
3a243c1
fix: remove shared mutable state between oidc tests (#17179)
ethanndickson Apr 1, 2025
1e11e82
fix(mcp): report task status correctly (#17187)
johnstcn Apr 1, 2025
fcac4ab
fix(site): standardize headers for Admin Settings page (#16911)
Parkreiner Apr 1, 2025
037dbc8
docs: add new cursor and windsurf docs (#17092)
EdwardAngert Apr 1, 2025
27d2343
fix(cli): exp mcp: remove unnecessary cli flag (#17190)
johnstcn Apr 1, 2025
583a0c6
feat: add frontend for app statuses (#17178)
kylecarbs Apr 1, 2025
900e125
docs: update SMTP configuration in notifications docs (#17161)
EdwardAngert Apr 1, 2025
f3e5bb9
fix: convert workspace id in db2sdk.WorkspaceAppStatus (#17201)
kylecarbs Apr 1, 2025
88bae05
feat(cli): implement exp mcp configure claude-code command (#17195)
johnstcn Apr 1, 2025
00e1ea4
feat: add the ability to hide preset parameters (#17168)
SasSwart Apr 1, 2025
fd24116
docs: clarify that CODER_EXTERNAL_AUTH_0_ID is used in callback URLs …
bpmct Apr 1, 2025
184c1f0
chore: add db queries for dynamic parameters (#17137)
aslilac Apr 1, 2025
a3248f9
chore(docs): move feature stage docs to install directory (#17199)
stirby Apr 1, 2025
4604f19
refactor: increase workspace and template avatar size (#17200)
BrunoQuaresma Apr 2, 2025
a61c3e7
docs: add tutorials for using early access AI agent features (#17186)
bpmct Apr 2, 2025
c6e8662
fix: watch workspace agent logs (#17209)
code-asher Apr 2, 2025
51ce047
fix: replace aliased import with unaliased import (#17207)
bcpeinhardt Apr 2, 2025
2efb808
docs: remove beta badge from notifications doc (#17096)
EdwardAngert Apr 2, 2025
0125ff4
docs: add new workspace notifications dashboard and config (#16548)
EdwardAngert Apr 2, 2025
0ec87ab
docs: add new section on managing provisioners from the dashboard (#1…
EdwardAngert Apr 2, 2025
d575e7f
chore: force babel dependency to 7.26.10 (#17193)
sreya Apr 2, 2025
6fdad02
fix: avoid sharing `echo.Responses` across tests (#17211)
ethanndickson Apr 2, 2025
b1f5d45
chore: disable e2e-premium tests (#17213)
sreya Apr 2, 2025
d6c034d
chore: pin dogfood npm dependencies (#17216)
sreya Apr 2, 2025
8cecc4f
chore(coderd/coderdtest/oidctest): protect mutable fields with rwmute…
johnstcn Apr 2, 2025
13997ca
docs: clarify details around MCP (#17220)
bpmct Apr 2, 2025
0163dda
ci: linkspector: fix 403 to external site (#17222)
johnstcn Apr 2, 2025
c418e86
chore: slightly soften disclaimers for AI features (#17223)
bpmct Apr 2, 2025
ac0cf35
fix: silence One-Way WebSocket error messages in React Strict Mode (#…
Parkreiner Apr 2, 2025
83d7147
chore: deprecate ResourceSystem (#17217)
spikecurtis Apr 2, 2025
e8b7ce8
ci: re-enable revive and gosec linters (#17225)
johnstcn Apr 2, 2025
0fe7346
docs: remove enterprise from docs (#17226)
EdwardAngert Apr 2, 2025
c938bfe
fix: prevent invalid render output for build logs (#17233)
Parkreiner Apr 2, 2025
c062942
chore: bump next from 14.2.25 to 14.2.26 in /offlinedocs (#17234)
dependabot[bot] Apr 2, 2025
ac7ea08
chore: add files cache for reading template tar archives from db (#17…
aslilac Apr 2, 2025
5979c32
chore: skip flakey e2e tests (#17235)
aslilac Apr 2, 2025
998724d
chore: sort agent `/list-directory` output (#17218)
ethanndickson Apr 3, 2025
4aa45a5
fix(cli): modify `exp mcp configure` to also read claude API key from…
johnstcn Apr 3, 2025
99c6f23
feat: add migrations and queries to support prebuilds (#16891)
SasSwart Apr 3, 2025
aa3d71d
feat(cli): support opening devcontainers in vscode (#17189)
DanielleMaywood Apr 3, 2025
ab8c437
feat(site): open dev container in vscode (#17182)
DanielleMaywood Apr 3, 2025
b60934b
chore: hide workspace creation UI for users without permission (#16871)
jaaydenh Apr 3, 2025
b61f0ab
fix(agent): ensure SSH server shutdown with process groups (#17227)
mafredri Apr 3, 2025
ccfe1bd
fix: fix permissions for workspace creation (#17241)
jaaydenh Apr 3, 2025
ae44ecf
chore: update prismjs to 1.30.0 (#17215)
sreya Apr 3, 2025
4d3aab6
Merge remote-tracking branch 'origin/main' into yevhenii/510-reconcil…
evgeniy-scherbina Apr 4, 2025
97b3886
fix dbmem tests
SasSwart Apr 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add app status tracking to the backend (#17163)
This does ~95% of the backend work required to integrate the AI work.

Most left to integrate from the tasks branch is just frontend, which
will be a lot smaller I believe.

The real difference between this branch and that one is the abstraction
-- this now attaches statuses to apps, and returns the latest status
reported as part of a workspace.

This change enables us to have a similar UX to in the tasks branch, but
for agents other than Claude Code as well. Any app can report status
now.
  • Loading branch information
kylecarbs authored Mar 31, 2025
commit 8ea956fc115c221f198dd2c54538c93fc03c91cf
1 change: 1 addition & 0 deletions cli/testdata/coder_list_--output_json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"most_recently_seen": null
}
},
"latest_app_status": null,
"outdated": false,
"name": "test-workspace",
"autostart_schedule": "CRON_TZ=US/Central 30 9 * * 1-5",
Expand Down
127 changes: 127 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 117 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,7 @@ func New(options *Options) *API {
}))
r.Get("/rpc", api.workspaceAgentRPC)
r.Patch("/logs", api.patchWorkspaceAgentLogs)
r.Patch("/app-status", api.patchWorkspaceAgentAppStatus)
// Deprecated: Required to support legacy agents
r.Get("/gitauth", api.workspaceAgentsGitAuth)
r.Get("/external-auth", api.workspaceAgentsExternalAuth)
Expand Down
33 changes: 29 additions & 4 deletions coderd/database/db2sdk/db2sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func AppSubdomain(dbApp database.WorkspaceApp, agentName, workspaceName, ownerNa
}.String()
}

func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerName string, workspace database.Workspace) []codersdk.WorkspaceApp {
func Apps(dbApps []database.WorkspaceApp, statuses []database.WorkspaceAppStatus, agent database.WorkspaceAgent, ownerName string, workspace database.Workspace) []codersdk.WorkspaceApp {
sort.Slice(dbApps, func(i, j int) bool {
if dbApps[i].DisplayOrder != dbApps[j].DisplayOrder {
return dbApps[i].DisplayOrder < dbApps[j].DisplayOrder
Expand All @@ -498,8 +498,14 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
return dbApps[i].Slug < dbApps[j].Slug
})

statusesByAppID := map[uuid.UUID][]database.WorkspaceAppStatus{}
for _, status := range statuses {
statusesByAppID[status.AppID] = append(statusesByAppID[status.AppID], status)
}

apps := make([]codersdk.WorkspaceApp, 0)
for _, dbApp := range dbApps {
statuses := statusesByAppID[dbApp.ID]
apps = append(apps, codersdk.WorkspaceApp{
ID: dbApp.ID,
URL: dbApp.Url.String,
Expand All @@ -516,14 +522,33 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
Interval: dbApp.HealthcheckInterval,
Threshold: dbApp.HealthcheckThreshold,
},
Health: codersdk.WorkspaceAppHealth(dbApp.Health),
Hidden: dbApp.Hidden,
OpenIn: codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
Health: codersdk.WorkspaceAppHealth(dbApp.Health),
Hidden: dbApp.Hidden,
OpenIn: codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
Statuses: WorkspaceAppStatuses(statuses),
})
}
return apps
}

func WorkspaceAppStatuses(statuses []database.WorkspaceAppStatus) []codersdk.WorkspaceAppStatus {
return List(statuses, WorkspaceAppStatus)
}

func WorkspaceAppStatus(status database.WorkspaceAppStatus) codersdk.WorkspaceAppStatus {
return codersdk.WorkspaceAppStatus{
ID: status.ID,
CreatedAt: status.CreatedAt,
AgentID: status.AgentID,
AppID: status.AppID,
NeedsUserAttention: status.NeedsUserAttention,
URI: status.Uri.String,
Icon: status.Icon.String,
Message: status.Message,
State: codersdk.WorkspaceAppStatusState(status.State),
}
}

func ProvisionerDaemon(dbDaemon database.ProvisionerDaemon) codersdk.ProvisionerDaemon {
result := codersdk.ProvisionerDaemon{
ID: dbDaemon.ID,
Expand Down
Loading
Loading