Skip to content

Add Browser level test Sentry and Kibana logs when 500 error is found

Will Meek requested to merge browser_log_urls into master

What does this MR do and why?

Logs Sentry and Kibana URLs on Browser tests if we find a 500 error.

This builds upon @sgregory2 's work on logging API errors with Sentry links ( !81927 (closed) )

As per team task https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/1130

Describe in detail what your merge request does and why.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Download the contrived end to end test example from fabbb08b
  2. Run against local - no log URLs shown
  3. Run against Staging - log URLs shown of the form
1) Secure TEst failures Failure fails due to 500
     Failure/Error: expect(push_rules).not_to have_element(:create_tag_button)

     RuntimeError:
       Error Code 500

       There were 3 SEVERE level errors:

       ["https://staging.gitlab.com/admin/subscription - Clear-Site-Data header on 'https://staging.gitlab.com/users/sign_out': Unrecognized type: \"*\".", "https://staging.gitlab.com/admin/subscription - Clear-Site-Data header on 'https://staging.gitlab.com/users/sign_out': No recognized types specified.", "https://staging.gitlab.com/gitlab-qa-sandbox-group/qa-test-2022-03-07-13-17-22-1611b7ac7cb63ae2/project-with-secure-c119625ccbb22a6b/-/push_rules/6619119 - Failed to load resource: the server responded with a status of 500 ()"]

       Path: /gitlab-qa-sandbox-group/qa-test-2022-03-07-13-17-22-1611b7ac7cb63ae2/project-with-secure-c119625ccbb22a6b/-/push_rules/6619119

       Correlation Id: 01FXJ8ECEN9XQ8RPKWV548JR2B
       Sentry Url: https://sentry.gitlab.net/gitlab/staginggitlabcom/?environment=gstg&query=correlation_id%3A%2201FXJ8ECEN9XQ8RPKWV548JR2B%22
       Kibana Url: https://nonprod-log.gitlab.net/app/discover#/?_a=(query:(language:kuery,query:'json.correlation_id%20:%2001FXJ8ECEN9XQ8RPKWV548JR2B'))

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Will Meek

Merge request reports

Loading