Skip to content

Log error for CustomersDot unsuccessful requests

Mark Chao requested to merge 365263-error into master

What does this MR do and why?

It is discovered many requests to CustomersDot fails (10000/day). However it is not visible at the log in CustomersDot. This MR is to aid the investigation on failure.

How to set up and validate locally

  1. Stub your gitlab, change lib/gitlab/http_connection_adapter.rb to allow local request:
           def allow_local_requests?
      -      options.fetch(:allow_local_requests, allow_settings_local_requests?)
      +      true
           end
  2. Start CDot
  3. Start gitlab rails console
  4. tail -f log/exceptions_json.log on gitlab repo
  5. In rails console:
    Gitlab::SubscriptionPortal::Client.update_namespace_name('a','b')
    This should give {success: true} in the log
  6. Open CDot's config/routes.rb, edit graphql line to post "/graphql", to: proc { [500, {}, ['body']] }, you can observe the error being logged
  7. Open CDot's config/routes.rb, edit graphql line to post "/graphql", to: proc { [400, {}, ['body']] }, you can observe the error being logged

MR acceptance checklist

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

Related to #365263

Edited by Mark Chao

Merge request reports