Add validation preventing desired_state change if it is TERMINATED
MR: Remote Dev: Prevent update of terminated worksp... (!132088 - merged)
Description
As a user, I want the UI and GraphQL API to prevent an invalid Desired State change to TERMINATED so that I am not allowed to put the workspace in an invalid state.
Acceptance Criteria
-
Add validation preventing desired_state change if it is TERMINATED; you can't restart a terminated workspace
Technical Requirements
-
Add validation to ee/app/models/remote_development/workspace.rb
-
Update specs -
Make any needed changes in Vue component UI (None necessary, it is not normally possible to update a terminated workspace from the UI) -
Remove related TODO in ee/app/models/remote_development/workspace.rb
Design Requirements
There should be no impact to the Vue UI design.
Impact Assessment
Prevents users from putting workspace in an invalid state via the graphql UI.
Availability & Testing
- No E2E test needed, testing at Unit / Integration will cover
Edited by Nivetha Prabakaran