Skip to content
Snippets Groups Projects
  1. Sep 13, 2019
  2. Sep 03, 2019
    • Andreas Brandl's avatar
      Preload routes information · 53801b12
      Andreas Brandl authored
      This fixes a high frequency N+1 issue:
      
      `RoutableActions#find_routable!` is used across many controllers to
      retrieve e.g. the Project or Namespace by path. The `#find_routable!`
      method calls `#ensure_canonical_path` which in turn retrieves
      `#full_path` from the given Routable.
      
      This in turn triggers a lookup on `routes`, leading to a high frequency
      of these queries:
      
      ```sql
      SELECT  "routes".* FROM "routes" WHERE "routes"."source_id" = $1 AND
      "routes"."source_type" = $2 LIMIT $3
      ```
      
      This is unnecessary as we already join `routes` in
      `Routable#find_by_full_path` anyways.
      Unverified
      53801b12
  3. Jul 19, 2019
  4. Jul 05, 2019
  5. Jul 02, 2019
  6. Jul 01, 2019
  7. Jun 27, 2019
  8. Apr 05, 2019
    • mksionek's avatar
      Add part of needed code · 64858317
      mksionek authored
      Add columns to store project creation settings
      
      Add project creation level column in groups
       and default project creation column in application settings
      
      Remove obsolete line from schema
      
      Update migration with project_creation_level column existence check
      
      Rename migrations to avoid conflicts
      
      Update migration methods
      
      Update migration method
      64858317
  9. Mar 21, 2019
  10. Sep 19, 2018
    • gfyoung's avatar
      Enable frozen string in app/controllers/**/*.rb · 73322a0e
      gfyoung authored
      Enables frozen string for the following:
      
      * app/controllers/*.rb
      * app/controllers/admin/**/*.rb
      * app/controllers/boards/**/*.rb
      * app/controllers/ci/**/*.rb
      * app/controllers/concerns/**/*.rb
      
      Partially addresses #47424.
      73322a0e
  11. Sep 11, 2018
  12. Jul 09, 2018
  13. Jun 25, 2018
  14. Apr 04, 2018
  15. Feb 27, 2018
  16. Dec 12, 2017
  17. Jun 06, 2017
  18. Apr 25, 2017
  19. Apr 20, 2017
  20. Apr 06, 2017
  21. Feb 08, 2017
  22. Jan 11, 2017
  23. Dec 28, 2016
  24. Dec 21, 2016
    • Markus Koller's avatar
      Add more storage statistics · 3ef4f74b
      Markus Koller authored
      This adds counters for build artifacts and LFS objects, and moves
      the preexisting repository_size and commit_count from the projects
      table into a new project_statistics table.
      
      The counters are displayed in the administration area for projects
      and groups, and also available through the API for admins (on */all)
      and normal users (on */owned)
      
      The statistics are updated through ProjectCacheWorker, which can now
      do more granular updates with the new :statistics argument.
      Verified
      3ef4f74b
  25. Dec 08, 2016
  26. Sep 28, 2016
  27. Sep 15, 2016
  28. Aug 18, 2016
  29. Aug 11, 2016
    • Stan Hu's avatar
      Fix bug where destroying a namespace would not always destroy projects · cb8a425b
      Stan Hu authored
      There is a race condition in DestroyGroupService now that projects are deleted asynchronously:
      
      1. User attempts to delete group
      2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project
      3. DestroyGroupService destroys the Group, leaving all its projects without a namespace
      4. Projects::DestroyService runs later but the can?(current_user,
         :remove_project) is `false` because the user no longer has permission to
         destroy projects with no namespace.
      5. This leaves the project in pending_delete state with no namespace/group.
      
      Projects without a namespace or group also adds another problem: it's not possible to destroy the container
      registry tags, since container_registry_path_with_namespace is the wrong value.
      
      The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService.
      
      Closes #17893
      cb8a425b
  30. Jul 20, 2016
  31. Jul 01, 2016
  32. Mar 21, 2016
  33. Mar 19, 2016
  34. Mar 08, 2016
  35. Jun 03, 2015
  36. Apr 20, 2015
  37. Apr 14, 2015
Loading