1. 14 Jan, 2020 1 commit
  2. 09 Jan, 2020 1 commit
    • Stan Hu's avatar
      Disable Prometheus metrics if initialization fails · 51c4ba46
      Stan Hu authored
      Previously if the underlying filesystem ran of space, reads and writes
      to mmap() regions would throw an ugly SIGBUS error and crash.
      
      With prometheus-client-mmap v0.10.0,
      `Prometheus::Client.reinitialize_on_pid_change` will now throw an
      IOError if initialization fails for some reason. If this happens, we
      disable internal Prometheus metrics to ensure the system stays up.
      
      Closes https://gitlab.com/gitlab-org/gitlab/issues/24425
      51c4ba46
  3. 08 Jan, 2020 2 commits
  4. 07 Jan, 2020 1 commit
  5. 06 Jan, 2020 3 commits
  6. 03 Jan, 2020 2 commits
    • Joshua Lambert's avatar
      Update rdoc to 6.1.2 · 315d9062
      Joshua Lambert authored
      315d9062
    • Bob Van Landuyt's avatar
      Wrap requests in an ApplicationContext · 3c5be56e
      Bob Van Landuyt authored
      This provides context to all requests made to Rails controllers or
      grape endpoints.
      
      Doing this starts a new `Labkit::Context`, to which we can provide a
      namespace, project and user.
      
      We're currently setting the following values:
      
      - Web requests: In the ApplicationController we wrap the entire
        request in a `with_context`.
        - user: based on the `auth_user` if there is one
        - project: We try to read the @project instance variable of the
          controller.
        - namespace: We try to read the @group instance variable of the
          controller. If there was none, but the project was set, we'll use
          that path to set the namespace
      
      - API requests: The application context is pushed in a before block
        setting the following values:
        - user: to `current_user` if there is one
        - project: to `@project`
        - namespace: to `@group`
      
      - Internal API requests: the application context is pushed in a before
        block:
        - user: When to the user set in `Api::Support::GitAccessActor`
        - project: to @project if it was available
      
      The 3 supported attributes for a context are read lazily when
      required.
      
      This also replaces the existing correlation middlewares with the new
      Labkit::Context middlewares.
      
      The rack middleware wraps each rack request in an overarching context
      that adds the correlation id. The context is cleaned up after the
      request, so we're sure all child contexts are cleaned up as well.
      
      The sidekiq client middleware will write the context into the job that
       goes into redis when a job is scheduled.
      
      The sidekiq server middleware will then re-instantiate this context so
      the job gets executed with the same context that was alive when it was
      scheduled. This means that any new job scheduled from sidekiq would
      also have this context.
      3c5be56e
  7. 23 Dec, 2019 1 commit
  8. 20 Dec, 2019 1 commit
  9. 18 Dec, 2019 2 commits
    • Ryan Cobb's avatar
      Updates gitlab-styles gem to 3.1.0 · 7a7403b7
      Ryan Cobb authored
      This updates gitlab-styles to 3.1.0 and disables any new cops introduced
      in this upgrade. These new cops will be re-enabled in subsequent
      changes. This also disables the existing RSpec/DescribedClass cop as
      this upgrade has caused it to break specs.
      7a7403b7
    • Reuben Pereira's avatar
      Use Liquid template engine in Prometheus proxy API · ff161589
      Reuben Pereira authored
      Use the liquid template engine since it is designed to be securely used
      by users to modify template files themselves.
      
      Add a render_score_limit so that a user cannot take up all server
      resources by writing a template that requires a lot of resources to
      render.
      ff161589
  10. 16 Dec, 2019 2 commits
  11. 15 Dec, 2019 1 commit
  12. 13 Dec, 2019 1 commit
  13. 11 Dec, 2019 1 commit
  14. 10 Dec, 2019 2 commits
  15. 08 Dec, 2019 1 commit
  16. 02 Dec, 2019 1 commit
  17. 29 Nov, 2019 1 commit
  18. 28 Nov, 2019 3 commits
  19. 27 Nov, 2019 1 commit
  20. 25 Nov, 2019 1 commit
  21. 22 Nov, 2019 1 commit
  22. 21 Nov, 2019 2 commits
  23. 20 Nov, 2019 4 commits
  24. 19 Nov, 2019 1 commit
  25. 18 Nov, 2019 3 commits