Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04a481d

Browse files
committed
refactor: remove lifecycle API endpoint changes
1 parent85d24ab commit04a481d

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

‎coderd/workspaces.go‎

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,17 +1090,6 @@ func (api *API) putWorkspaceAutostart(rw http.ResponseWriter, r *http.Request) {
10901090
return
10911091
}
10921092

1093-
// Autostart configuration is not supported for prebuilt workspaces.
1094-
// Prebuild lifecycle is managed by the reconciliation loop, with scheduling behavior
1095-
// defined per preset at the template level, not per workspace.
1096-
ifworkspace.IsPrebuild() {
1097-
httpapi.Write(ctx,rw,http.StatusUnprocessableEntity, codersdk.Response{
1098-
Message:"Autostart is not supported for prebuilt workspaces",
1099-
Detail:"Prebuilt workspace scheduling is configured per preset at the template level. Workspace-level overrides are not supported.",
1100-
})
1101-
return
1102-
}
1103-
11041093
dbSched,err:=validWorkspaceSchedule(req.Schedule)
11051094
iferr!=nil {
11061095
httpapi.Write(ctx,rw,http.StatusBadRequest, codersdk.Response{
@@ -1185,17 +1174,6 @@ func (api *API) putWorkspaceTTL(rw http.ResponseWriter, r *http.Request) {
11851174
return
11861175
}
11871176

1188-
// TTL updates are not supported for prebuilt workspaces.
1189-
// Prebuild lifecycle is managed by the reconciliation loop, with TTL behavior
1190-
// defined per preset at the template level, not per workspace.
1191-
ifworkspace.IsPrebuild() {
1192-
httpapi.Write(ctx,rw,http.StatusUnprocessableEntity, codersdk.Response{
1193-
Message:"TTL updates are not supported for prebuilt workspaces",
1194-
Detail:"Prebuilt workspace TTL is configured per preset at the template level. Workspace-level overrides are not supported.",
1195-
})
1196-
return
1197-
}
1198-
11991177
vardbTTL sql.NullInt64
12001178

12011179
err:=api.Database.InTx(func(s database.Store)error {
@@ -1312,16 +1290,6 @@ func (api *API) putWorkspaceDormant(rw http.ResponseWriter, r *http.Request) {
13121290
return
13131291
}
13141292

1315-
// Dormancy configuration is not supported for prebuilt workspaces.
1316-
// Prebuilds are managed by the reconciliation loop and are not subject to dormancy.
1317-
ifoldWorkspace.IsPrebuild() {
1318-
httpapi.Write(ctx,rw,http.StatusUnprocessableEntity, codersdk.Response{
1319-
Message:"Dormancy configuration is not supported for prebuilt workspaces",
1320-
Detail:"Prebuilt workspaces are not subject to dormancy. Dormancy behavior is only applicable to regular workspaces",
1321-
})
1322-
return
1323-
}
1324-
13251293
// If the workspace is already in the desired state do nothing!
13261294
ifoldWorkspace.DormantAt.Valid==req.Dormant {
13271295
rw.WriteHeader(http.StatusNotModified)
@@ -1466,17 +1434,6 @@ func (api *API) putExtendWorkspace(rw http.ResponseWriter, r *http.Request) {
14661434
return
14671435
}
14681436

1469-
// Deadline extensions are not supported for prebuilt workspaces.
1470-
// Prebuilds are managed by the reconciliation loop and must always have
1471-
// Deadline and MaxDeadline unset.
1472-
ifworkspace.IsPrebuild() {
1473-
httpapi.Write(ctx,rw,http.StatusUnprocessableEntity, codersdk.Response{
1474-
Message:"Deadline extension is not supported for prebuilt workspaces",
1475-
Detail:"Prebuilt workspaces do not support user deadline modifications. Deadline extension is only applicable to regular workspaces",
1476-
})
1477-
return
1478-
}
1479-
14801437
code:=http.StatusOK
14811438
resp:= codersdk.Response{}
14821439

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp