Skip to content

Create a note in session report only if QA issue is defined

George Koltsov requested to merge qa-report-issue-relate into master

MR attempts to fix the error we see in Slack:

An unexpected error occurred while reporting test results in issues.
The error occurred in job: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/2890500
Gitlab::Error::BadRequest Server responded with code 400, message: 400 Bad request - Note {:note=>["can't be blank"]}. Request URI: https://gitlab.com/api/v4/projects/gitlab-org%2Fquality%2Ftestcase-sessions/issues/5220/notes

Assumption is that this error appears because test report is trying to add a relate quick action note "/relate #{Runtime::Env.qa_issue_url}" and GITLAB_QA_ISSUE_URL isn't defined. In the example above there is no QA issue as pipeline is being triggered on schedule and not by release bot.

Edited by George Koltsov

Merge request reports