1. 11 1月, 2018 1 次提交
    • J
      Denormalize commits count for merge request diffs · e6a1db6d
      Jan Provaznik 提交于
      For each MR diff an extra 'SELECT COUNT()' is executed
      to get number of commits for the diff. Overall time to get counts for
      all MR diffs may be quite expensive. To speed up loading of MR info,
      information about number of commits is stored in a MR diff's extra column.
      
      Closes #38068
      e6a1db6d
  2. 09 1月, 2018 3 次提交
    • M
      Backport authorized_keys_enabled defaults to true' · 797fe0a6
      Michael Kozono 提交于
      Originally from branch 'fix-authorized-keys-enabled-default-2738' via merge request https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2240
      
      Removed background migrations which were intended to fix state after using Gitlab
      without a default having been set
      
      Squashed commits:
      Locally, if Spring was not restarted, `current_application_settings` was still cached, which prevented the migration from editing the file. This will also ensure that any app server somehow hitting old cache data will properly default this setting regardless.
      Retroactively fix migration
        This allows us to identify customers who ran the broken migration. Their `authorized_keys_enabled` column does not have a default at this point.
        We will fix the column after we fix the `authorized_keys` file.
      Fix authorized_keys file if needed
      Add default to authorized_keys_enabled setting
        Reminder: The original migration was fixed retroactively a few commits ago, so people who did not ever run GitLab 9.3.0 already have a column that defaults to true and disallows nulls. I have tested on PostgreSQL and MySQL that it is safe to run this migration regardless.
        Affected customers who did run 9.3.0 are the ones who need this migration to fix the authorized_keys_enabled column.
        The reason for the retroactive fix plus this migration is that it allows us to run a migration in between to fix the authorized_keys file only for those who ran 9.3.0.
      Tweaks to address feedback
      Extract work into background migration
      Move batch-add-logic to background migration
        Do the work synchronously to avoid multiple workers attempting to add batches of keys at the same time.
        Also, make the delete portion wait until after adding is done.
      Do read and delete work in background migration
      Fix Rubocop offenses
      Add changelog entry
      Inform the user of actions taken or not taken
      Prevent unnecessary `select`s and `remove_key`s
      Add logs for action taken
      Fix optimization
      Reuse `Gitlab::ShellAdapter`
      Guarantee the earliest key
      Fix migration spec for MySQL
      797fe0a6
    • M
      Backport option to disable writing to `authorized_keys` file · 255a0f85
      Michael Kozono 提交于
      Originally branch 'mk-toggle-writing-to-auth-keys-1631'
      
      See merge request !2004
      
      Squashed commits:
      Add authorized_keys_enabled to Application Settings
      Ensure default settings are exposed in UI
      Without this change, `authorized_keys_enabled` is unchecked when it is nil, even if it should be checked by default.
      Add “Speed up SSH operations” documentation
      Clarify the reasons for disabling writes
      Add "How to go back" section
      Tweak copy
      Update Application Setting screenshot
      255a0f85
    • Y
      Remove soft removals related code · d0b8f536
      Yorick Peterse 提交于
      This removes all usage of soft removals except for the "pending delete"
      system implemented for projects. This in turn simplifies all the query
      plans of the models that used soft removals. Since we don't really use
      soft removals for anything useful there's no point in keeping it around.
      
      This _does_ mean that hard removals of issues (which only admins can do
      if I'm not mistaken) can influence the "iid" values, but that code is
      broken to begin with. More on this (and how to fix it) can be found in
      https://gitlab.com/gitlab-org/gitlab-ce/issues/31114.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
      d0b8f536
  3. 05 1月, 2018 2 次提交
    • J
      Backport 'Rebase' feature from EE to CE · 27a75ea1
      Jan Provaznik 提交于
      When a project uses fast-forward merging strategy user has
      to rebase MRs to target branch before it can be merged.
      Now user can do rebase in UI by clicking 'Rebase' button
      instead of doing rebase locally.
      
      This feature was already present in EE, this is only backport
      of the feature to CE. Couple of changes:
      * removed rebase license check
      * renamed migration (changed timestamp)
      
      Closes #40301
      27a75ea1
    • M
      Rename Project#cache_index to jobs_cache_index · 8cc14dd5
      Matija Čupić 提交于
      8cc14dd5
  4. 03 1月, 2018 2 次提交
  5. 02 1月, 2018 1 次提交
  6. 31 12月, 2017 1 次提交
    • M
      User#projects_limit remove DB default and added NOT NULL constraint · 75cf5f5b
      Mario de la Ossa 提交于
      This change is required because otherwise if a user is created with a
      value for `projects_limit` that matches the DB default, it gets
      overwritten by `current_application_settings.default_projects_limit`. By
      removing the default we once again can allow a user to be created with a
      limit of 10 projects without the risk that it'll change to 10000
      75cf5f5b
  7. 23 12月, 2017 3 次提交
  8. 22 12月, 2017 1 次提交
  9. 21 12月, 2017 1 次提交
  10. 13 12月, 2017 1 次提交
  11. 11 12月, 2017 1 次提交
  12. 09 12月, 2017 1 次提交
  13. 08 12月, 2017 1 次提交
    • B
      Move the circuitbreaker check out in a separate process · f1ae1e39
      Bob Van Landuyt 提交于
      Moving the check out of the general requests, makes sure we don't have
      any slowdown in the regular requests.
      
      To keep the process performing this checks small, the check is still
      performed inside a unicorn. But that is called from a process running
      on the same server.
      
      Because the checks are now done outside normal request, we can have a
      simpler failure strategy:
      
      The check is now performed in the background every
      `circuitbreaker_check_interval`. Failures are logged in redis. The
      failures are reset when the check succeeds. Per check we will try
      `circuitbreaker_access_retries` times within
      `circuitbreaker_storage_timeout` seconds.
      
      When the number of failures exceeds
      `circuitbreaker_failure_count_threshold`, we will block access to the
      storage.
      
      After `failure_reset_time` of no checks, we will clear the stored
      failures. This could happen when the process that performs the checks
      is not running.
      f1ae1e39
  14. 07 12月, 2017 2 次提交
  15. 05 12月, 2017 4 次提交
  16. 03 12月, 2017 6 次提交
  17. 02 12月, 2017 4 次提交
  18. 29 11月, 2017 4 次提交
    • B
      Reschedule the migration to populate fork networks · e03d4a20
      Bob Van Landuyt 提交于
      Rescheduling will make sure the fork networks with a deleted source
      project are created.
      e03d4a20
    • A
      Add timeouts for Gitaly calls · 64e5f996
      Andrew Newdigate 提交于
      64e5f996
    • S
      Improve indexes on merge_request_diffs · 484ae2ee
      Sean McGivern 提交于
      For getting the SHAs from an MR to find pipelines, we get the last 100 MR diffs
      for the MR, and find commits from those. This was un-indexed before, because the
      index was not a composite index on merge_request_diff_id, id. Changing that
      means that this scope can exclusively use indexes.
      484ae2ee
    • S
      Remove serialised diff and commit columns · 4ebbfe5d
      Sean McGivern 提交于
      The st_commits and st_diffs columns on merge_request_diffs historically held the
      YAML-serialised data for a merge request diff, in a variety of formats.
      
      Since 9.5, these have been migrated in the background to two new tables:
      merge_request_diff_commits and merge_request_diff_files. That has the advantage
      that we can actually query the data (for instance, to find out how many commits
      we've stored), and that it can't be in a variety of formats, but must match the
      new schema.
      
      This is the final step of that journey, where we drop those columns and remove
      all references to them. This is a breaking change to the importer, because we
      can no longer import diffs created in the old format, and we cannot guarantee
      the export will be in the new format unless it was generated after this commit.
      4ebbfe5d
  19. 24 11月, 2017 1 次提交