Transient failure in qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb | Manage Instance audit logs Add and delete email behaves like instance audit event logs logs audit events for UI operations

Summary

https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/447127007

Passed on retry: https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/447176186

Stack trace

   1) Manage Instance audit logs Add and delete email behaves like instance audit event logs logs audit events for UI operations
      Failure/Error: expect(audit_log_page).to have_audit_log_row(expected_event)
      
      QA::Support::Repeater::WaitExceededError:
        Wait condition not met after 60 seconds
      Shared Example Group: "instance audit event logs" called from ./qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb:69
      # ./qa/support/repeater.rb:43:in `repeat_until'
      # ./qa/support/waiter.rb:23:in `wait_until'
      # ./qa/page/base.rb:30:in `wait_until'
      # ./qa/ee/page/admin/monitoring/audit_log.rb:18:in `has_audit_log_row?'
      # ./qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb:14:in `block (5 levels) in <module:QA>'
      # ./qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb:13:in `each'
      # ./qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb:13:in `block (4 levels) in <module:QA>'
      # ./qa/scenario/actable.rb:16:in `perform'
      # ./qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb:12:in `block (3 levels) in <module:QA>'

Screenshot / HTML page / logs

The screenshot from the first attempt showed error 500 at an earlier point in the test:

 D, [2020-02-23T20:22:23.626227 #24] DEBUG -- : clicking :profile_emails_link with args {}
 D, [2020-02-23T20:22:23.626344 #24] DEBUG -- : finding :profile_emails_link with args {:text=>nil, :wait=>10}
 D, [2020-02-23T20:22:23.660612 #24] DEBUG -- : found :profile_emails_link
 D, [2020-02-23T20:22:24.171187 #24] DEBUG -- : finding :email_address_field with args {}
 D, [2020-02-23T20:22:24.246171 #24] DEBUG -- : found :email_address_field
 D, [2020-02-23T20:22:24.476158 #24] DEBUG -- : clicking :add_email_address_button with args {}
 D, [2020-02-23T20:22:24.476344 #24] DEBUG -- : finding :add_email_address_button with args {:text=>nil, :wait=>10}
 D, [2020-02-23T20:22:24.525274 #24] DEBUG -- : found :add_email_address_button
 D, [2020-02-23T20:22:25.071111 #24] DEBUG -- : within element :email_row_content
 1st Try error in ./qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb:7:
 Unable to find css "[data-qa-selector=\"email_row_content\"],.qa-email-row-content"

artifacts including gitlab logs

The 2nd attempt showed:

instance_audit_logs_spec.rb_2020-02-23-20-23-50.204

It looks like there was an audit log for removing an email, but not for adding one (should appear as Added email).

I wonder if the error 500 in the first attempt is related to the missing audit log in the 2nd attempt?

Possible fixes

/cc @sliaquat FYI re. devopsmanage

Edited by Mark Lapierre