@@ -1090,17 +1090,6 @@ func (api *API) putWorkspaceAutostart(rw http.ResponseWriter, r *http.Request) {
1090
1090
return
1091
1091
}
1092
1092
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
- if workspace .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
-
1104
1093
dbSched , err := validWorkspaceSchedule (req .Schedule )
1105
1094
if err != nil {
1106
1095
httpapi .Write (ctx , rw , http .StatusBadRequest , codersdk.Response {
@@ -1185,17 +1174,6 @@ func (api *API) putWorkspaceTTL(rw http.ResponseWriter, r *http.Request) {
1185
1174
return
1186
1175
}
1187
1176
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
- if workspace .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
-
1199
1177
var dbTTL sql.NullInt64
1200
1178
1201
1179
err := api .Database .InTx (func (s database.Store ) error {
@@ -1312,16 +1290,6 @@ func (api *API) putWorkspaceDormant(rw http.ResponseWriter, r *http.Request) {
1312
1290
return
1313
1291
}
1314
1292
1315
- // Dormancy configuration is not supported for prebuilt workspaces.
1316
- // Prebuilds are managed by the reconciliation loop and are not subject to dormancy.
1317
- if oldWorkspace .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
-
1325
1293
// If the workspace is already in the desired state do nothing!
1326
1294
if oldWorkspace .DormantAt .Valid == req .Dormant {
1327
1295
rw .WriteHeader (http .StatusNotModified )
@@ -1466,17 +1434,6 @@ func (api *API) putExtendWorkspace(rw http.ResponseWriter, r *http.Request) {
1466
1434
return
1467
1435
}
1468
1436
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
- if workspace .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
-
1480
1437
code := http .StatusOK
1481
1438
resp := codersdk.Response {}
1482
1439
0 commit comments