DRY up wsbuilder orphan deletion logic
- Dominant language
- No language data
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
In https://github.com/coder/coder/pull/18465 we duplicated a code path from provisionerdserver into wsbuilder.
Original logic: https://github.com/coder/coder/blob/f44969b6898bd32cd29193bea910693800bbda87/coderd/provisionerdserver/provisionerdserver.go#L2007-L2077
Duplicated logic:
* mark workspace as deleted in case of orphan: https://github.com/coder/coder/blob/f44969b6898bd32cd29193bea910693800bbda87/coderd/wsbuilder/wsbuilder.go#L462-L504
* create audit log in case of orphan: https://github.com/coder/coder/blob/f44969b6898bd32cd29193bea910693800bbda87/coderd/workspacebuilds.go#L423-L458
This could be extracted out into some kind of helper function to reduce duplication.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.