1. 18 6月, 2019 1 次提交
  2. 14 6月, 2019 1 次提交
    • S
      Fix inability to set visibility_level on project via API · dcba5279
      Stan Hu 提交于
      Consider the scenario:
      
      1. The default visibility level is set to internal
      2. A user attempts to create a private project within a private group
      
      Previously this would always fail because default_value_for would
      overwrite the private visibility setting, no matter what
      visibility_level were specified. This was happening because
      default_value_for was confused by the default value of 0 specified by
      the database schema.
      
      default_value_for attempts to assign the default value in the block by
      checking whether the attribute has changed. The problem is that since
      the default value by the database was 0, and the user requested 0, this
      appeared as though no changes were made. As a result, default_value_for
      would always overwrite the user's preference.
      
      To fix this, we remove the use of default_value_for and only set the
      visibility level to the default application setting when no preference
      has been given at creation time.
      
      Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63158
      dcba5279
  3. 12 6月, 2019 1 次提交
    • F
      Expose ci_default_git_depth via project API · 3ac527b4
      Fabio Pitino 提交于
      Enable Get and Update of ci_default_git_depth for
      Project API.
      
      Renaming Project#default_git_depth to :ci_default_git_depth
      to give more context through the API usage.
      
      Add API documentation
      3ac527b4
  4. 06 6月, 2019 2 次提交
    • K
      Forks get default_git_depth 0 if the origin is nil · 52673a91
      Krasimir Angelov 提交于
      If the origin project has no default_git_depth set (i.e. nil) set the
      fork's default_git_depth to 0
      52673a91
    • K
      Add project level git depth setting · ad9ae16d
      Krasimir Angelov 提交于
      Introduce default_git_depth in project's CI/CD settings and set it to
      50. Use it if there is no GIT_DEPTH variable specified. Apply this
      default only to newly created projects and keep it nil for old ones
      in order to not break pipelines that rely on non-shallow clones.
      
      default_git_depth can be updated from CI/CD Settings in the UI, must be
      either nil or integer between 0 and 1000 (incl).
      
      Inherit default_git_depth from the origin project when forking projects.
      
      MR pipelines are run on a MR ref (refs/merge-requests/:iid/merge) and it
      contains unique commit (i.e. merge commit) which doesn't exist in the
      other branch/tags refs. We need to add it cause otherwise it may break
      pipelines for old projects that have already enabled Pipelines for merge
      results and have git depth 0.
      
      Document new default_git_depth project CI/CD setting
      ad9ae16d
  5. 05 6月, 2019 1 次提交
  6. 31 5月, 2019 1 次提交
    • S
      Remove legacy artifact related code · 387a4f4b
      Shinya Maeda 提交于
      We've already migrated all the legacy artifacts to the new realm,
      which is ci_job_artifacts table.
      It's time to remove the old code base that is no longer used.
      387a4f4b
  7. 30 5月, 2019 1 次提交
    • D
      Protect Gitlab::HTTP against DNS rebinding attack · a9bcddee
      Douwe Maan 提交于
      Gitlab::HTTP now resolves the hostname only once, verifies the IP is not
      blocked, and then uses the same IP to perform the actual request, while
      passing the original hostname in the `Host` header and SSL SNI field.
      a9bcddee
  8. 29 5月, 2019 1 次提交
  9. 22 5月, 2019 1 次提交
  10. 17 5月, 2019 1 次提交
  11. 10 5月, 2019 2 次提交
  12. 09 5月, 2019 1 次提交
  13. 06 5月, 2019 1 次提交
  14. 03 5月, 2019 1 次提交
    • J
      Use git_garbage_collect_worker to run pack_refs · d25239ee
      Jan Provaznik 提交于
      PackRefs is not an expensive gitaly call - we want to
      call it more often (than as part of full `gc`) because
      it helps to keep number of refs files small - too many
      refs file may be a problem for deployments with
      slow storage.
      d25239ee
  15. 30 4月, 2019 1 次提交
  16. 27 4月, 2019 1 次提交
  17. 23 4月, 2019 1 次提交
  18. 12 4月, 2019 1 次提交
  19. 09 4月, 2019 1 次提交
  20. 05 4月, 2019 4 次提交
  21. 02 4月, 2019 1 次提交
    • S
      Force a full GC after importing a project · d4c6a3af
      Stan Hu 提交于
      During a project import, it's possible that new branches are created by
      the importer to handle pull requests that have been created from forked
      projects, which would increment the `pushes_since_gc` value via
      `HousekeepingService.increment!` before a full garbage collection gets
      to run. This causes HousekeepingService to skip the full `git gc` and
      move to the incremental repack mode. To ensure that a garbage collection
      is run to pack refs and objects, explicitly execute the task.
      
      Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59477
      d4c6a3af
  22. 25 3月, 2019 1 次提交
    • S
      Remove N+1 queries from users autocomplete · c5f9b2be
      Sean McGivern 提交于
      Both of these were related to groups:
      
      1. We need to preload routes (using the `with_route` scope) if we're
         going to get the group's path.
      2. We were counting each group's members separately.
      
      They're in the same commit because the spec for N+1 detection wouldn't
      pass with only one of these fixes.
      c5f9b2be
  23. 21 3月, 2019 1 次提交
  24. 20 3月, 2019 1 次提交
  25. 13 3月, 2019 1 次提交
  26. 05 3月, 2019 1 次提交
    • G
      Skip project validation when switching storage layouts · b4f20502
      Gabriel Mazetto 提交于
      This is a fix for the Hashed Storage migration and Rollback procedure
      to ignore any project-level validation error that can happen in a
      long-running instance.
      
      There are many situations where defaults and acceptable values changed
      but, because we didn't provide a migration to "valid" attributes, it
      can happen that project will not be `valid? => true`.
      
      Because the changes we are making are limited to setting a project as
      read_only or changing the storage_level, it's safe to bypass validation.
      b4f20502
  27. 01 3月, 2019 6 次提交
  28. 27 2月, 2019 1 次提交
    • J
      Add project http fetch statistics API · 5ae9a44a
      Jacopo 提交于
      The API get projects/:id/traffic/fetches allows user with write
      access to the repository to get the number of clones for the
      last 30 days.
      5ae9a44a
  29. 20 2月, 2019 1 次提交
  30. 06 2月, 2019 1 次提交