Implements validation and error handling for environment creation with prevent_self_review enabled in lib/plugins/environments.js.
Updates the environment creation and update logic to ensure that at least one reviewer is present when prevent_self_review is set to true. This prevents the creation of environments without reviewers, addressing the issue where environments were partially created on the first attempt and required a restart to complete.
Adds error logging to clearly indicate when the creation process is halted due to the absence of reviewers, improving the visibility of the issue and aiding in troubleshooting.
Ensures that environments with the correct configuration of reviewers and prevent_self_review are created successfully in a single pass, eliminating the need for partial provisioning or errors that lead to pod restarts.
Related to #628
Implements validation and error handling for environment creation with
prevent_self_review
enabled inlib/plugins/environments.js
.prevent_self_review
is set totrue
. This prevents the creation of environments without reviewers, addressing the issue where environments were partially created on the first attempt and required a restart to complete.prevent_self_review
are created successfully in a single pass, eliminating the need for partial provisioning or errors that lead to pod restarts.