Skip to content

Generator: check if root group path is already taken

Nailia Iskhakova (OOO) requested to merge check-root-group-path into master

This MR adds a check for root group if the group path was already taken by username.

@nwestbury hit this issue on the test environment:

[2020-08-11 15:33:29] INFO: Creating group gpt
[2020-08-11 15:33:29] ERROR: 
GPT data generation failed:
POST request failed!
Code: 400
Response: {"message":"Failed to save group {:path=\u003e[\"has already been taken\"]}"}
 Traceback:["/performance/lib/gpt_common.rb:37:in `make_http_request'", "/performance/lib/gpt_test_data.rb:152:in `create_group'", "/performance/lib/gpt_test_data.rb:30:in `initialize'", "./bin/generate-gpt-data:102:in `new'", "./bin/generate-gpt-data:102:in `<main>'"]

Investigation showed that there is a gpt user on this environment and thus we can't create a gpt group as it was taken by this user.

The MR adds this guidance:

GPT data generation failed:
Root Group path 'gpt' is already taken by user [{"id"=>2, "name"=>"gpt", "username"=>"gpt", "state"=>"active", "avatar_url"=>"https://www.gravatar.com/avatar/5ec6e0603a3a1aa55b99c6d5b54ee70d?s=80&d=identicon", "web_url"=>"http://104.196.38.24/gpt"}].
Please change their username or use a different group name by changing a `root_group` option in Environment Config File.
Edited by Nailia Iskhakova (OOO)

Merge request reports

Loading