`generate_test_session` jobs failing with `404 Project Not Found` on https://ops.gitlab.net
This is resulting in missing test session reports on slack.
Example failing job: https://ops.gitlab.net/gitlab-org/gitlab-qa/-/jobs/2471904
Stack trace:
$ exe/gitlab-qa-report --generate-test-session "gitlab-qa-run-*/**/rspec-*.json" --project "$QA_TESTCASE_SESSIONS_PROJECT"
/builds/gitlab-org/gitlab-qa/vendor/ruby/2.7.0/gems/gitlab-4.16.1/lib/gitlab/request.rb:61:in `validate': Server responded with code 404, message: 404 Project Not Found. Request URI: https://gitlab.com/api/v4/projects/282/pipelines/362705/jobs (Gitlab::Error::NotFound)
from /builds/gitlab-org/gitlab-qa/vendor/ruby/2.7.0/gems/gitlab-4.16.1/lib/gitlab/request.rb:53:in `block (2 levels) in <class:Request>'
from /builds/gitlab-org/gitlab-qa/vendor/ruby/2.7.0/gems/gitlab-4.16.1/lib/gitlab/client/jobs.rb:36:in `pipeline_jobs'
from /builds/gitlab-org/gitlab-qa/vendor/ruby/2.7.0/gems/gitlab-4.16.1/lib/gitlab.rb:28:in `method_missing'
from /builds/gitlab-org/gitlab-qa/lib/gitlab/qa/report/generate_test_session.rb:64:in `block in generate_failed_jobs_listing'
from /builds/gitlab-org/gitlab-qa/lib/gitlab/qa/report/gitlab_issue_client.rb:93:in `handle_gitlab_client_exceptions'
from /builds/gitlab-org/gitlab-qa/lib/gitlab/qa/report/generate_test_session.rb:63:in `generate_failed_jobs_listing'
from /builds/gitlab-org/gitlab-qa/lib/gitlab/qa/report/generate_test_session.rb:37:in `generate_description'
from /builds/gitlab-org/gitlab-qa/lib/gitlab/qa/report/generate_test_session.rb:21:in `run!'
from /builds/gitlab-org/gitlab-qa/lib/gitlab/qa/report/report_as_issue.rb:20:in `invoke!'
from /builds/gitlab-org/gitlab-qa/lib/gitlab/qa/reporter.rb:95:in `invoke'
from exe/gitlab-qa-report:9:in `<main>'
Generating test results in `gitlab-qa-run-*/**/rspec-*.json` as issues in project `gitlab-org/quality/testcase-sessions` via the API at `https://gitlab.com/api/v4`.
The script is calling the api on project with id 282
on https://gitlab.com with does not exist. This id is for test-session report on ops.gitlab.net
The GITLAB_API_BASE
env variable defaults to https://gitlab.com/api/v4
. We probably need to set GITLAB_API_BASE
on ops.gitlab.net
Edited by Sanad Liaquat