feat: persist app groups in the database (#17977)

This commit is contained in:
ケイラ
2025-05-27 13:13:08 -06:00
committed by GitHub
parent 513a468a3a
commit 9fc3329575
27 changed files with 398 additions and 322 deletions
+1
View File
@@ -533,6 +533,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
+8
View File
@@ -89,6 +89,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -324,6 +325,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -673,6 +675,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -819,6 +822,7 @@ Status Code **200**
| `»»» command` | string | false | | |
| `»»» display_name` | string | false | | Display name is a friendly name for the app. |
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
| `»»» group` | string | false | | |
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
@@ -1036,6 +1040,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -1344,6 +1349,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -1549,6 +1555,7 @@ Status Code **200**
| `»»»» command` | string | false | | |
| `»»»» display_name` | string | false | | Display name is a friendly name for the app. |
| `»»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
| `»»»» group` | string | false | | |
| `»»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
| `»»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
| `»»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
@@ -1829,6 +1836,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
+7
View File
@@ -8273,6 +8273,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -8484,6 +8485,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -9039,6 +9041,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -9078,6 +9081,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `command` | string | false | | |
| `display_name` | string | false | | Display name is a friendly name for the app. |
| `external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
| `group` | string | false | | |
| `health` | [codersdk.WorkspaceAppHealth](#codersdkworkspaceapphealth) | false | | |
| `healthcheck` | [codersdk.Healthcheck](#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
| `hidden` | boolean | false | | |
@@ -9261,6 +9265,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -9683,6 +9688,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -9987,6 +9993,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {},
"hidden": true,
+4
View File
@@ -2299,6 +2299,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -2445,6 +2446,7 @@ Status Code **200**
| `»»» command` | string | false | | |
| `»»» display_name` | string | false | | Display name is a friendly name for the app. |
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
| `»»» group` | string | false | | |
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
@@ -2827,6 +2829,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -2973,6 +2976,7 @@ Status Code **200**
| `»»» command` | string | false | | |
| `»»» display_name` | string | false | | Display name is a friendly name for the app. |
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
| `»»» group` | string | false | | |
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
+6
View File
@@ -144,6 +144,7 @@ of the template will be used.
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -428,6 +429,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -738,6 +740,7 @@ of the template will be used.
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -1025,6 +1028,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {},
"hidden": true,
@@ -1293,6 +1297,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
@@ -1693,6 +1698,7 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \
"command": "string",
"display_name": "string",
"external": true,
"group": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,