1. 11 Apr, 2019 2 commits
  2. 04 Mar, 2019 3 commits
    • Nick Thomas's avatar
      sidekiq: terminate child processes at shutdown · f0c52df5
      Nick Thomas authored
      Sidekiq jobs frequently spawn long-lived child processes to do work.
      In some circumstances, these can be reparented to init when sidekiq is
      terminated, leading to duplication of work and strange concurrency
      problems.
      
      This commit changes sidekiq so that, if run as a process group leader,
      it will forward `INT` and `TERM` signals to the whole process group. If
      the memory killer is active, it will also use the process group when
      resorting to `kill -9` to shut down.
      
      These changes mean that a naive `kill <pid-of-sidekiq>` will now do the
      right thing, killing any child processes spawned by sidekiq, as long as
      the process supervisor placed it in its own process group.
      
      If sidekiq isn't a process group leader, this new code is skipped.
      f0c52df5
    • Drew Blessing's avatar
      Allow raw `tls_options` to be passed in LDAP configuration · f6350fac
      Drew Blessing authored
      We've previously exposed ca_file and ssl_version but there are many
      possible options that can be used inside tls_options. Instead of
      exposing individual ones, simply expose the entire hash so it can
      be passed in and we won't have to add things in the future.
      f6350fac
    • Bob Van Landuyt's avatar
      Types::BaseField accepts authorize after reload · 58aaa766
      Bob Van Landuyt authored
      When working on files in `app/graphql` the code correctly gets
      autoloaded.
      
      However, the redefined `Types::BaseField` would never receive the
      `.accepts_definition` call, causing all queries after a reload to
      fail. Calling `.accepts_definition` on its superclass makes sure the
      reloaded version also has the `authorize` definition specified.
      58aaa766
  3. 01 Mar, 2019 3 commits
  4. 28 Feb, 2019 1 commit
  5. 27 Feb, 2019 1 commit
  6. 25 Feb, 2019 2 commits
    • Luke Duncalfe's avatar
      Improve GraphQL Authorization DSL · ccb4edbc
      Luke Duncalfe authored
      Previously GraphQL field authorization happened like this:
      
          class ProjectType
            field :my_field, MyFieldType do
              authorize :permission
            end
          end
      
      This change allowed us to authorize like this instead:
      
          class ProjectType
            field :my_field, MyFieldType, authorize: :permission
          end
      
      A new initializer registers the `authorize` metadata keyword on GraphQL
      Schema Objects and Fields, and we can collect this data within the
      context of Instrumentation like this:
      
          field.metadata[:authorize]
      
      The previous functionality of authorize is still being used for
      mutations, as the #authorize method here is called at during the code
      that executes during the mutation, rather than when a field resolves.
      
      https://gitlab.com/gitlab-org/gitlab-ce/issues/57828
      ccb4edbc
    • Thong Kuah's avatar
      Turn on backtrace for sidekiq in development · f09399fc
      Thong Kuah authored
      This enables easier debugging in GDK
      f09399fc
  7. 12 Feb, 2019 1 commit
    • Stan Hu's avatar
      Log queue duration in production_json.log · 51ca7922
      Stan Hu authored
      `queue_duration` is a useful metric that is currently in api_json.log
      but not in production_json.log. We should add it because it tells us how
      long the request sat in Workhorse before Unicorn processed it. Having
      this field enables the support team to better troubleshoot when delays
      began to happen.
      51ca7922
  8. 10 Feb, 2019 1 commit
    • Peter Leitzen's avatar
      Fix error when reloading code in Sidekiq · 1931c3ef
      Peter Leitzen authored
      This commit fixes the following error in development:
      
          ArgumentError: A copy of Gitlab::Metrics::Transaction has been
          removed from the module tree but is still active!
      1931c3ef
  9. 08 Feb, 2019 2 commits
    • Nick Thomas's avatar
      Remove HipChat integration from GitLab · a5378665
      Nick Thomas authored
      a5378665
    • Andrew Newdigate's avatar
      Provide a performance bar link to the Jaeger UI · 48bcd524
      Andrew Newdigate authored
      Jaeger is a distributed tracing tool. This change adds a "Tracing" link
      to the performance bar to directly link to a current request in Jaeger.
      
      This is useful for two reasons: 1 - it provides affordance to developers
      that the distributed tracing tool is available, so that it can quickly
      be discovered. 2 - it allows developers to quickly find a specific trace
      without having to manually navigate to a second user-interface.
      48bcd524
  10. 06 Feb, 2019 1 commit
  11. 05 Feb, 2019 2 commits
  12. 30 Jan, 2019 1 commit
    • Andrew Newdigate's avatar
      Add OpenTracing instrumentation for Action View Render events · d022ce86
      Andrew Newdigate authored
      This change adds three new instrumentations, driven through rails
      notifications: render_template.action_view,
      render_collection.action_view and render_partial.action_view.
      
      These can help developers understand why renders are taking a long
      time which may in turn help them to improve their performance.
      d022ce86
  13. 25 Jan, 2019 1 commit
    • Thong Kuah's avatar
      Use http_max_redirects opt to replace monkeypatch · f234aef9
      Thong Kuah authored
      http_max_redirects was introduced in 4.2.2, so upgrade kubeclient.
      
      The monkey-patch was global so we will have to check that all instances
      of Kubeclient::Client are handled.
      
      Spec all methods of KubeClient
      
      This should provide better confidence that we are indeed disallowing
      redirection in all cases
      f234aef9
  14. 24 Jan, 2019 2 commits
  15. 22 Jan, 2019 2 commits
    • Rémy Coutable's avatar
      26978cb2
    • Andrew Newdigate's avatar
      Adds inter-service OpenTracing propagation · ca464b60
      Andrew Newdigate authored
      This change allows the GitLab rails and sidekiq components to receive
      tracing spans from upstream services such as Workhorse and pass these
      spans on to downstream services including Gitaly and Sidekiq.
      
      This change will also emit traces for incoming and outgoing requests
      using the propagated trace information. This will allow operators and
      engineers to view traces across the Workhorse, GitLab Rails, Sidekiq and
      Gitaly components.
      
      Additional intra-service instrumentation will be added in future
      changes.
      ca464b60
  16. 17 Jan, 2019 1 commit
    • Andrew Newdigate's avatar
      Conditionally initialize the global opentracing tracer · 57a8859a
      Andrew Newdigate authored
      This change will instantiate an OpenTracing tracer and configure it
      as the global tracer when the GITLAB_TRACING environment variable is
      configured. GITLAB_TRACING takes a "connection string"-like value,
      encapsulating the driver (eg jaeger, etc) and options for the driver.
      
      Since each service, whether it's written in Ruby or Golang, uses the
      same connection-string, it should be very easy to configure all
      services in a cluster, or even a single development machine to be
      setup to use tracing.
      
      Note that this change does not include instrumentation or propagation
      changes as this is a way of breaking a previous larger change into
      components. The instrumentation and propagation changes will follow
      in separate changes.
      57a8859a
  17. 16 Jan, 2019 2 commits
  18. 09 Jan, 2019 1 commit
  19. 04 Jan, 2019 1 commit
    • Kamil Trzciński's avatar
      Add config_options|variables to BuildMetadata · 0103d5be
      Kamil Trzciński authored
      These are data columns that store runtime configuration
      of build needed to execute it on runner and within pipeline.
      
      The definition of this data is that once used, and when no longer
      needed (due to retry capability) they can be freely removed.
      
      They use `jsonb` on PostgreSQL, and `text` on MySQL (due to lacking
      support for json datatype on old enough version).
      0103d5be
  20. 03 Jan, 2019 2 commits
  21. 27 Dec, 2018 2 commits
  22. 24 Dec, 2018 1 commit
  23. 20 Dec, 2018 1 commit
  24. 18 Dec, 2018 1 commit
    • Bob Van Landuyt's avatar
      Load the devise initializer before metrics · 3a39c818
      Bob Van Landuyt authored
      Metrics tries to initialize the `EventsFinder` to instrumnt it. The `EventsFinder` tries to load the `Event` model, which in turn loads the `User` model.
      
      Loading the `User` model requires Devise to be initialized. So to avoid problems around this, we load devise before loading metrics.
      3a39c818
  25. 17 Dec, 2018 2 commits
  26. 14 Dec, 2018 1 commit