401 Unauthorized
After upgrading our Gitlab QA environment to version 15.5.4, I'm unable to run the GPT tool to generate data in that environment.
To be sure, I created a new user for GPT and access token to use with GPT.
Usually, I get this error when I run docker run --platform linux/amd64 -it -e ACCESS_TOKEN=$QA_ACCESS_TOKEN -v $(pwd)/k6/config:/config -v $(pwd)/results:/results gitlab/gpt-data-generator --environment 2k.json
:
GPT data generation failed: Request has failed: 401 Unauthorized - {"message"=>"401 Unauthorized"} Please ensure admin ACCESS_TOKEN is used. Traceback:["/performance/lib/gpt_common.rb:82:in change_env_settings'", "/performance/lib/gpt_test_data.rb:151:in configure_repo_storage_settings'", "/performance/lib/gpt_test_data.rb:471:in create_horizontal_test_data'", "./bin/generate-gpt-data:142:in <main>'"]
But strangely, if I try the command repeatedly, sometimes it will start generating data but ultimately fails
Click to expand
GPT Data Generator v1.0.26 - opinionated test data for the GitLab Performance Tool The GPT Data Generator will inject the data into the specified group `gpt` with Public visibility on https://scm.platform.us-west-2.qa.avalara.io. Note that this may take some time. Do you want to proceed? [Y/N] y Checking that GitLab environment 'https://scm.platform.us-west-2.qa.avalara.io' is available, supported and that provided Access Token works... Environment and Access Token check complete - URL: https://scm.platform.us-west-2.qa.avalara.io, Version: 15.5.4-ee d3dda7548e0 {"enabled"=>true, "externalUrl"=>"wss://scm.platform.us-west-2.qa.avalara.io/-/kubernetes-agent/", "version"=>"15.5.1"}For the creation of horizontal
data with large projects, the GPT Data Generator will need to change the Repository Storages setting on the target GitLab environment. This is to facilitate the creation of numerous Groups and Projects evenly across each Storage node. As such, it will change this setting to point to all nodes as set in the storage_nodes
option and then create the data.
While the Generator is doing this any other projects created or imported during this time will be stored on one of these nodes randomly. The original setting will be restored after the the tool is finished. Do you want to proceed? [Y/N] y Creating group gpt Creating group gpt/many_groups_and_projects
GPT data generation failed: POST request failed! Code: 401 Response: {"message":"401 Unauthorized"} Correlation ID: 01GKQNS8C2MZSKHACES8M6HTC4
Traceback:["/performance/lib/gpt_common.rb:43:in make_http_request'", "/performance/lib/gpt_test_data.rb:219:in
create_group'", "./bin/generate-gpt-data:141:in `'"]