You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: allow setting workspace deadline as early as now plus 30 minutes (coder#2328)
This PR makes the following changes:
- coderd: /api/v2/workspaces/:workspace/extend now accepts any time at least 30 minutes in the future.
- coder bump command also allows the above. Some small copy changes to command.
- coder bump now actually enforces template-level maxima.
require.ErrorContains(t, err, "deadline: Validation failed for tag \"required\" with value: \"0001-01-01 00:00:00 +0000 UTC\"", "setting an empty deadline on a workspace should fail")
1011
1012
1012
-
// Updating with an earlier time should also fail
1013
+
// Updating with a deadline 29 minutes in the future should fail
require.ErrorContains(t, err, "new deadline must be at least 30 minutes in the future", "setting a deadline less than 30 minutes in the future should fail")
1019
+
1020
+
// And with a deadline greater than the template max_ttl should also fail
require.ErrorContains(t, err, "new deadline is greater than template allows", "setting a deadline greater than that allowed by the template should fail")
1026
+
1027
+
// Updating with a deadline 30 minutes in the future should succeed
0 commit comments