Skip to content

fix: brev recreate failure due to missing workspace fields and duplicate name errors#338

Open
hakhandelwal11 wants to merge 1 commit intomainfrom
BREV-3137/fix/brev-cli-recreate
Open

fix: brev recreate failure due to missing workspace fields and duplicate name errors#338
hakhandelwal11 wants to merge 1 commit intomainfrom
BREV-3137/fix/brev-cli-recreate

Conversation

@hakhandelwal11
Copy link

Problem-

  • The recreate command deletes the workspace and then creates a new one. The backend continued to treat the workspace name as in use while the previous workspace remained in the deleting state. This resulted in the create step failing with a duplicate name error.
  • The create step also returned 500 errors because the CLI did not send the required workspaceGroupID and instanceType fields in the create request, which are required by the backend.

Solution-

  • The change copies WorkspaceGroupID and InstanceType from the deleted workspace and includes them in the create request so the new workspace is created in the same group and with the same instance type.
  • A retry mechanism is added for the create step for up to 5 minutes, with a 10-second delay between retries, to handle temporary failures such as duplicate name errors or unexpected EOF.

@hakhandelwal11 hakhandelwal11 self-assigned this Mar 16, 2026
@hakhandelwal11 hakhandelwal11 marked this pull request as ready for review March 17, 2026 11:56
@hakhandelwal11 hakhandelwal11 requested a review from a team as a code owner March 17, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant