- Notifications
You must be signed in to change notification settings - Fork1k
feat!: add ability to cancel pending workspace build#18713
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
22 commits Select commitHold shift + click to select a range
ba41ae8
add support for canceling workspace builds with expect_state param (l…
kacpersawc4ee5b6
Use single transaction for canceling workspace build
kacpersawc49c33e
Fix lint problem in ut
kacpersawba1dbf3
add cancel confirmation dialog for workspace builds and add expect_st…
kacpersawacffda6
Fix lint
kacpersawb672d76
Merge branch 'main' into kacpersaw/cancel-pending-provisioner-jobs
kacpersaw86a34df
Apply review suggestions
kacpersaw42170ab
Fix unit test
kacpersaw5db9d71
Apply review suggestions
kacpersaw1ede20c
Fix typo
kacpersaw2597615
Regenerate api types
kacpersaw6c2d0cf
Fix typo
kacpersawc800494
Merge branch 'main' into kacpersaw/cancel-pending-provisioner-jobs
kacpersawc5cb203
Apply a new authorization check for GetProvisionerJobByIDForUpdate
kacpersaw1de84cc
Apply a new authorization check for GetProvisionerJobByIDForUpdate
kacpersaw17fb6a3
Apply FE review suggestions
kacpersaw1b7b614
Apply review suggestions
kacpersaw634f556
Refactor cancelWorkspaceBuild parameter handling
kacpersaw4deace0
Fix lint
kacpersaw43430fa
Update coderd/workspacebuilds.go
kacpersaw6272d93
Extract cancel confirm dialog to a separate component
kacpersaw4d4a01d
Merge branch 'main' into kacpersaw/cancel-pending-provisioner-jobs
kacpersawFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Fix lint problem in ut
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitc49c33ea8d098286c1d3be48367e6d855e0bb06c
There are no files selected for viewing
5 changes: 4 additions & 1 deletioncoderd/workspacebuilds_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -738,7 +738,10 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) { | ||
}) | ||
// Then: the request should fail with 412. | ||
require.Error(t, err) | ||
var apiErr *codersdk.Error | ||
require.ErrorAs(t, err, &apiErr) | ||
require.Equal(t, http.StatusPreconditionFailed, apiErr.StatusCode()) | ||
}) | ||
deansheather marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
t.Run("Cancel with expect_state - invalid status", func(t *testing.T) { | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.