1. 19 Dec, 2018 1 commit
  2. 12 Dec, 2018 1 commit
  3. 07 Dec, 2018 2 commits
    • Zeger-Jan van de Weg's avatar
      Allow public forks to be deduplicated · 896c0bdb
      Zeger-Jan van de Weg authored
      When a project is forked, the new repository used to be a deep copy of everything
      stored on disk by leveraging `git clone`. This works well, and makes isolation
      between repository easy. However, the clone is at the start 100% the same as the
      origin repository. And in the case of the objects in the object directory, this
      is almost always going to be a lot of duplication.
      
      Object Pools are a way to create a third repository that essentially only exists
      for its 'objects' subdirectory. This third repository's object directory will be
      set as alternate location for objects. This means that in the case an object is
      missing in the local repository, git will look in another location. This other
      location is the object pool repository.
      
      When Git performs garbage collection, it's smart enough to check the
      alternate location. When objects are duplicated, it will allow git to
      throw one copy away. This copy is on the local repository, where to pool
      remains as is.
      
      These pools have an origin location, which for now will always be a
      repository that itself is not a fork. When the root of a fork network is
      forked by a user, the fork still clones the full repository. Async, the
      pool repository will be created.
      
      Either one of these processes can be done earlier than the other. To
      handle this race condition, the Join ObjectPool operation is
      idempotent. Given its idempotent, we can schedule it twice, with the
      same effect.
      
      To accommodate the holding of state two migrations have been added.
      1. Added a state column to the pool_repositories column. This column is
      managed by the state machine, allowing for hooks on transitions.
      2. pool_repositories now has a source_project_id. This column in
      convenient to have for multiple reasons: it has a unique index allowing
      the database to handle race conditions when creating a new record. Also,
      it's nice to know who the host is. As that's a short link to the fork
      networks root.
      
      Object pools are only available for public project, which use hashed
      storage and when forking from the root of the fork network. (That is,
      the project being forked from itself isn't a fork)
      
      In this commit message I use both ObjectPool and Pool repositories,
      which are alike, but different from each other. ObjectPool refers to
      whatever is on the disk stored and managed by Gitaly. PoolRepository is
      the record in the database.
      896c0bdb
    • Steve Azzopardi - OoO back Wednesday November 27th 's avatar
      Add endpoint to download single artifact by ref · 401f65c4
      Add a new endpoint
      `projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path?job=name`
      which is the close the web URL for consistency sake. This endpoint can
      be used to download a single file from artifacts for the specified ref
      and job.
      
      closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54626
      401f65c4
  4. 06 Dec, 2018 1 commit
    • Jan Provaznik's avatar
      Use FastDestroy for deleting uploads · 239fdc78
      Jan Provaznik authored
      It gathers list of file paths to delete before destroying
      the parent object. Then after the parent_object is destroyed
      these paths are scheduled for deletion asynchronously.
      
      Carrierwave needed associated model for deleting upload file.
      To avoid this requirement, simple Fog/File layer is used directly
      for file deletion, this allows us to use just a simple list of paths.
      239fdc78
  5. 05 Dec, 2018 2 commits
  6. 04 Dec, 2018 5 commits
    • Thong Kuah's avatar
      Unify into :group_clusters feature flag · ebf87fd9
      Thong Kuah authored
      With this MR, group clusters is now functional, so default to enabled.
      
      Have a single setting on the root ancestor group to enabled or disable
      group clusters feature as a whole
      ebf87fd9
    • Thong Kuah's avatar
      Various improvements to hierarchy sorting · f85440e6
      Thong Kuah authored
      - Rename ordered_group_clusters_for_project ->
      ancestor_clusters_for_clusterable
      - Improve name of order option. It makes much more sense to have `hierarchy_order: :asc`
      and `hierarchy_order: :desc`
      - Allow ancestor_clusters_for_clusterable for group
      - Re-use code already present in Project
      f85440e6
    • Thong Kuah's avatar
      Create k8s namespace for project in group clusters · d54791e0
      Thong Kuah authored
      AFAIK the only relevant place is Projects::CreateService, this gets
      called when user creates a new project, forks a new project and does
      those things via the api.
      
      Also create k8s namespace for new group hierarchy
      when transferring project between groups
      
      Uses new Refresh service to create k8s namespaces
      
      - Ensure we use Cluster#cluster_project
      
      If a project has multiple clusters (EE), using Project#cluster_project
      is not guaranteed to return the cluster_project for this cluster. So
      switch to using Cluster#cluster_project - at this stage a cluster can
      only have 1 cluster_project.
      
      Also, remove rescue so that sidekiq can retry
      d54791e0
    • Thong Kuah's avatar
      Teach Project about #all_clusters · 9c5977c8
      Thong Kuah authored
      This returns a union of the project level clusters and group level
      clusters associated with this project.
      9c5977c8
    • Thong Kuah's avatar
      Add association project -> kubernetes_namespaces · 703233e1
      Thong Kuah authored
      kubernetes_namespaces is not needed for project import/export as it
      tracks internal state of kubernetes integration
      703233e1
  7. 03 Dec, 2018 3 commits
  8. 29 Nov, 2018 2 commits
  9. 28 Nov, 2018 1 commit
  10. 27 Nov, 2018 1 commit
  11. 26 Nov, 2018 2 commits
  12. 15 Nov, 2018 1 commit
    • Gabriel Mazetto's avatar
      Allow partially migrated repositories to continue migration · f208f4c2
      Gabriel Mazetto authored
      Previously we verified if the projecthave at least migrated their
      repository to hashed storage and prevented the migration command to
      start a new migration.
      
      The new version checks for the latest storage version available
      (fully migrated), otherwise it allows migration to be triggered again.
      f208f4c2
  13. 13 Nov, 2018 1 commit
  14. 06 Nov, 2018 1 commit
    • Shinya Maeda's avatar
      Squashed commit of the following: · b3020aaf
      Shinya Maeda authored
      commit 931d6ab0e025b0268d94e455f736b09a025e0578
      Merge: b34d1653 93846eb1
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Mon Nov 5 09:36:58 2018 +0900
      
          Merge branch 'master-ce' into stateful_deployments
      
      commit b34d1653
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Fri Nov 2 18:07:08 2018 +0900
      
          Fix flaky spec
      
      commit b5e0527c
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Fri Nov 2 15:32:03 2018 +0900
      
          Fix spec
      
      commit f78a5e96
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Fri Nov 2 14:59:29 2018 +0900
      
          Remove unnecessary line in schema.rb
      
      commit 6ce7c483
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Fri Nov 2 14:55:48 2018 +0900
      
          Add partial index for filling deployment at migration
      
      commit aecccfb5
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Fri Nov 2 14:42:24 2018 +0900
      
          Fix fill empty finished at migration
      
      commit 0199e176
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Fri Nov 2 14:19:44 2018 +0900
      
          Fix flaky spec
      
      commit 56ac84cd
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Fri Nov 2 10:06:49 2018 +0900
      
          Fix guard clause to prevent multiple deployments to a job
      
      commit 521561b6
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 20:19:24 2018 +0900
      
          Fix spec
      
      commit 2878da0d
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 19:38:59 2018 +0900
      
          Simplify the factory
      
      commit 22fd7df0
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 19:33:50 2018 +0900
      
          Simplify the Deployable and BuildSuccessWorker
      
      commit 41108959
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 18:34:20 2018 +0900
      
          Fix spec
      
      commit ae75fe74
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 17:19:12 2018 +0900
      
          Fix weird virtual deployment status
      
      commit 380fee74
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 15:59:31 2018 +0900
      
          Fix spec
      
      commit 29889fcb
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 15:07:10 2018 +0900
      
          Fix coding offence
      
      commit 36ac13f3
      Author: Shinya Maeda <shinya@gitlab.com>
      Date:   Thu Nov 1 14:22:17 2018 +0900
      
          Squashed commit of the following:
      
          commit ba9aede9
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Nov 1 14:21:33 2018 +0900
      
              Fix ambiguious factory specification in update deployment service spec
      
          commit 013afb56
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Nov 1 14:10:24 2018 +0900
      
              Fix spec
      
          commit 78793670
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 31 18:26:12 2018 +0900
      
              Fix spec
      
          commit 73d27e87
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 31 16:22:14 2018 +0900
      
              Fix index
      
          commit 8580a226
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 31 15:34:57 2018 +0900
      
              Fix deployment relationships in Ci::Build
      
          commit d6d28b55
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 31 15:27:53 2018 +0900
      
              Fix spec
      
          commit 94eb754e
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 31 14:07:11 2018 +0900
      
              Fix spec
      
          commit 0b30f80b
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 20:15:31 2018 +0900
      
              Fix spec
      
          commit 466bdcdb
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 19:28:51 2018 +0900
      
              Fix spec
      
          commit a7c3caac
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 17:33:47 2018 +0900
      
              Fix factory
      
          commit cea28ae1
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 16:28:18 2018 +0900
      
              Drop leagacy success
      
          commit 3785d685
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 15:37:28 2018 +0900
      
              Remove unnecessary migration file
      
          commit 0d597fa4
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 15:35:53 2018 +0900
      
              Fix schema.rb
      
          commit ec3c2abc
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 15:34:21 2018 +0900
      
              Rename post migration file
      
          commit 0e728188
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 15:31:01 2018 +0900
      
              Remove include EnumWithNil
      
          commit b3846d59
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 15:05:50 2018 +0900
      
              Decouple action
      
          commit c9f9ba4e
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 14:23:29 2018 +0900
      
              Remove status mock
      
          commit d95bfea1
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 14:17:14 2018 +0900
      
              Add action
      
          commit 0cec39e0
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Tue Oct 30 13:44:07 2018 +0900
      
              Remove unnecessary line in schema.rb
      
          commit 7b4c5f8e
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Mon Oct 29 19:59:41 2018 +0900
      
              Revert build success worker
      
          commit 0c52ffa4
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Mon Oct 29 19:11:47 2018 +0900
      
              Use add_column_with_default properly
      
          commit ba9bae35
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Mon Oct 29 18:40:55 2018 +0900
      
              Fix with_status
      
          commit 75dffc97
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Mon Oct 29 16:26:56 2018 +0900
      
              Remove unnecessary line in schema.rb
      
          commit 25188ccc
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Mon Oct 29 16:26:17 2018 +0900
      
              Set default values in regular migration
      
          commit 98ea037f
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Fri Oct 26 17:27:49 2018 +0900
      
              Fix static analysis
      
          commit e7d1765f
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Fri Oct 26 16:37:10 2018 +0900
      
              Remove empty spec
      
          commit 0033f521
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Fri Oct 26 16:34:55 2018 +0900
      
              Simplify spec changes
      
          commit 0be4c6b3
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Fri Oct 26 16:32:45 2018 +0900
      
              Simplify spec changes
      
          commit a93d25d7
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Fri Oct 26 16:02:31 2018 +0900
      
              Fix flaky spec
      
          commit 339ad50c
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Fri Oct 26 15:06:22 2018 +0900
      
              Rename Deployments Success worker
      
          commit bd69c780
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Fri Oct 26 14:43:03 2018 +0900
      
              Fix coding offence
      
          commit 004748b2
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 20:09:10 2018 +0900
      
              Rename to update deployment service
      
          commit b04a85e7
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 18:46:52 2018 +0900
      
              Add spec for Project
      
          commit 548af23a
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 18:43:25 2018 +0900
      
              Fix spec
      
          commit c977e4d3
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 17:58:07 2018 +0900
      
              Add spec for Environment
      
          commit 73feb901
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 17:39:24 2018 +0900
      
              Add spec for Deployment model
      
          commit 9a3cfbf7
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 17:18:02 2018 +0900
      
              Fix statis analysis
      
          commit a30d28db
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 17:17:32 2018 +0900
      
              Ignore nil instance
      
          commit fa6fdd89
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 16:20:40 2018 +0900
      
              Add spec for deployable concern
      
          commit aa911868
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 15:37:23 2018 +0900
      
              Clean up deployable
      
          commit 34d3e187
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 15:13:05 2018 +0900
      
              Fix 17 cycle analytics
      
          commit 8dc9e004
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Thu Oct 25 13:56:51 2018 +0900
      
              Fix static analysys
      
          commit 5c417580
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 24 15:05:05 2018 +0900
      
              Skip unnecessary sidekiq worker
      
          commit 9d8b5d42
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 24 14:53:13 2018 +0900
      
              Add changelog
      
          commit c8cabba4
          Author: Shinya Maeda <shinya@gitlab.com>
          Date:   Wed Oct 24 14:44:45 2018 +0900
      
              Squashed commit of the following:
      
              commit f7643885
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 19:38:45 2018 +0900
      
                  Fix deployment widget specs
      
              commit 03bd04b5
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 17:50:16 2018 +0900
      
                  Fix env status spec
      
              commit 4a49c650
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 17:48:59 2018 +0900
      
                  Fix environment spec
      
              commit 40448228
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 17:47:17 2018 +0900
      
                  Fix environment spec
      
              commit 9939d44b
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 15:45:43 2018 +0900
      
                  Add a new spec for deployment success worker
      
              commit f61c4d36
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 15:38:11 2018 +0900
      
                  Fix cycle analytics helper
      
              commit b6242615
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 14:41:54 2018 +0900
      
                  Fix cycle analysis helper
      
              commit 9a001cb4
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 14:37:08 2018 +0900
      
                  Ignore coding offence in build success worker's spec
      
              commit 1fb88583
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 23 14:33:11 2018 +0900
      
                  Added more spec for deployments
      
              commit 1a6ba97a
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 19:36:50 2018 +0900
      
                  Move after create hookd into success worker
      
              commit 09de5fed
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 19:30:06 2018 +0900
      
                  Fix build spec
      
              commit 73a55cbc
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 19:08:43 2018 +0900
      
                  Fix update_deployment_metrics_service_spec.rb
      
              commit ee05136a
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 17:32:05 2018 +0900
      
                  Remove unnecessary degelate
      
              commit e246ddee
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 16:07:39 2018 +0900
      
                  Remove unnecessary optimistic locking
      
              commit dcc225c8
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 16:00:22 2018 +0900
      
                  Simplify status replication
      
              commit 13a5fd7a
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 15:29:24 2018 +0900
      
                  Fix sidekiq queue names
      
              commit dcc796f4
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 15:23:55 2018 +0900
      
                  Revert success check in update_merge_request_metrics
      
              commit 129ef083
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 15:18:31 2018 +0900
      
                  Fix queue name of deployment success worker
      
              commit 10fe5a64
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 15:09:42 2018 +0900
      
                  Introduce deployable module
      
              commit d91260bb
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 14:05:31 2018 +0900
      
                  Add database index for successful deployments
      
              commit 74274147
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Mon Oct 22 13:51:59 2018 +0900
      
                  Fix invalid state transition
      
              commit ff18463c
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Fri Oct 19 20:05:15 2018 +0900
      
                  Fix coding style offence
      
              commit 0202c0f5
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Fri Oct 19 18:34:07 2018 +0900
      
                  Target only successful deployments from other relations
      
              commit 1f2758cb
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Fri Oct 19 18:21:28 2018 +0900
      
                  Add namespace explicitly
      
              commit 3d9227b6
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Fri Oct 19 17:42:30 2018 +0900
      
                  Fix spec in DeleteInconsistentInternalIdRecords
      
              commit 3e0cc99f
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Fri Oct 19 16:10:16 2018 +0900
      
                  Fixed spec
      
              commit 8de09b8b
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Fri Oct 19 14:22:35 2018 +0900
      
                  Fix create deployment service
      
              commit 31957570
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Thu Oct 18 20:21:26 2018 +0900
      
                  Move CreateDeploymentService. Fix Cycle analytics spec and fixture.
      
              commit d2eb433a
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Thu Oct 18 20:11:22 2018 +0900
      
                  Fix build success worker
      
              commit 25e6cd87
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Thu Oct 18 19:49:13 2018 +0900
      
                  Fix create deployment service spec
      
              commit d268bf41
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Thu Oct 18 19:01:23 2018 +0900
      
                  Fix cycle analysys spec's deployment
      
              commit 525ade8a
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Thu Oct 18 18:24:04 2018 +0900
      
                  Fix factory to set legacy status by default
      
              commit c6a99082
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Thu Oct 18 17:25:40 2018 +0900
      
                  Remove unnecessary lib from deployment
      
              commit a6107e0e
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Wed Oct 17 17:38:58 2018 +0900
      
                  Fix recursive call
      
              commit 15c5f3b6
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Wed Oct 17 17:30:44 2018 +0900
      
                  Add finished_at
      
              commit c8d3d703
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Wed Oct 17 15:55:31 2018 +0900
      
                  Fix last_deployment methods as it used to return successful deployment always
      
              commit 96bbe867
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Wed Oct 17 15:49:57 2018 +0900
      
                  Redefine statuses
      
              commit c86a9d0b
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Wed Oct 17 14:50:27 2018 +0900
      
                  Fix schema.rb
      
              commit 9ff5f0ea
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Wed Oct 17 14:18:04 2018 +0900
      
                  Default status nil to success
      
              commit 5928bd9b
              Author: Shinya Maeda <shinya@gitlab.com>
              Date:   Tue Oct 16 15:13:48 2018 +0900
      
                  Add status to Deployment
      b3020aaf
  15. 05 Nov, 2018 2 commits
    • Yorick Peterse's avatar
      Rewrite SnippetsFinder to improve performance · d171ff60
      Yorick Peterse authored
      This completely rewrites the SnippetsFinder class from the ground up in
      order to improve its performance. The old code was beyond salvaging. It
      was complex, included various Rails 5 workarounds, comments that
      shouldn't be necessary, and most important of all: it produced a really
      poorly performing database query.
      
      As a result, I opted for rewriting the finder from scratch, instead of
      trying to patch the existing code. Instead of trying to reuse as many
      existing methods as possible, I opted for defining new methods
      specifically meant for the SnippetsFinder. This requires some extra code
      here and there, but allows us to have much more control over the
      resulting SQL queries. It is these changes that then allow us to produce
      a _much_ more efficient query.
      
      To illustrate how bad the old query was, we will use my own snippets as
      an example. Currently I have 52 snippets, most of which are global ones.
      To retrieve these, you would run the following Ruby code:
      
          user = User.find_by(username: 'yorickpeterse')
      
          SnippetsFinder.new(user, author: user).execute
      
      On GitLab.com the resulting query will take between 10 and 15 seconds to
      run, producing the query plan found at
      https://explain.depesz.com/s/Y5IX. Apart from the long execution time,
      the total number of buffers (the sum of all shared hits) is around 185
      GB, though the real number is probably (hopefully) much lower as I doubt
      simply summing these numbers produces the true total number of buffers
      used.
      
      The new query's plan can be found at https://explain.depesz.com/s/wHdN,
      and this query takes between 10 and 100-ish milliseconds to run. The
      total number of buffers used is only about 30 MB.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/52639
      d171ff60
    • Nick Thomas's avatar
      Start tracking shards in the database · f760c1cd
      Nick Thomas authored
      f760c1cd
  16. 02 Nov, 2018 1 commit
  17. 01 Nov, 2018 1 commit
  18. 31 Oct, 2018 1 commit
  19. 30 Oct, 2018 2 commits
  20. 22 Oct, 2018 1 commit
    • Yorick Peterse's avatar
      Move Project#rename_repo to a service class · 4b9c17f1
      Yorick Peterse authored
      This moves the logic of Project#rename_repo and all methods _only_ used
      by this method into a new service class: Projects::AfterRenameService.
      By moving this code into a separate service class we can more easily
      refactor it, and we also get rid of some RuboCop "disable" statements
      automatically.
      
      During the refactoring of this code, I removed most of the explicit
      logging using Gitlab::AppLogger. The data that was logged would not be
      useful when debugging renaming issues, as it does not add any value on
      top of data provided by users.
      
      I also removed a variety of comments that either mentioned something the
      code does in literal form, or contained various grammatical errors.
      Instead we now resort to more clearly named methods, removing the need
      for code comments.
      
      This method was chosen based on analysis in
      https://gitlab.com/gitlab-org/release/framework/issues/28. In this issue
      we determined this method has seen a total of 293 lines being changed in
      it. We also noticed that RuboCop determined the ABC size
      (https://www.softwarerenovation.com/ABCMetric.pdf) was too great.
      4b9c17f1
  21. 19 Oct, 2018 1 commit
    • Bob Van Landuyt's avatar
      Remove the `ForkedProjectLink` model · f3fba178
      Bob Van Landuyt authored
      This removes the `ForkedProjectLink` model that has been replaced by
      the `ForkNetworkMember` and `ForkNetwork` combination. All existing
      relations have been adjusted to use these new models.
      
      The `forked_project_link` table has been dropped.
      
      The "Forks" count on the admin dashboard has been updated to count all
      `ForkNetworkMember` rows and deduct the number of `ForkNetwork`
      rows. This is because now the "root-project" of a fork network also
      has a `ForkNetworkMember` row. This count could become inaccurate when
      the root of a fork network is deleted.
      f3fba178
  22. 17 Oct, 2018 1 commit
    • Nick Thomas's avatar
      Use cached readme blobs where appropriate · 0669127a
      Nick Thomas authored
      GitLab keeps a cache of the rendered HTML for a repository's README as
      stored in the HEAD branch. However, it was not used in all
      circumstances. In particular, the new blob viewer framework bypassed
      this cache entirely.
      
      This MR ensures a ::ReadmeBlob is returned instead of a ::Blob when
      asking a repository for an individual blob, if the commit and path
      match the readme for HEAD. This makes the cached HTML available to
      consumers, including the blob viewer.
      
      The ReadmeBlob is a simple delegator to the Blob, so should be
      compatible in all cases. Adding the rendered_markdown method is the
      only additional behaviour it contains.
      0669127a
  23. 15 Oct, 2018 1 commit
  24. 08 Oct, 2018 1 commit
    • Yorick Peterse's avatar
      Clean up ActiveRecord code in TodosFinder · 4c1dc310
      Yorick Peterse authored
      This refactors the TodosFinder finder according to the new code reuse
      rules, as enforced by the CodeReuse cops. I also changed some of the
      methods to use regular if statements, instead of assignments and/or
      early returns. This results in a more natural flow when reading the
      code, and it makes it harder to accidentally return the wrong result.
      4c1dc310
  25. 06 Oct, 2018 1 commit
  26. 04 Oct, 2018 1 commit
  27. 02 Oct, 2018 1 commit
    • Alejandro Rodríguez's avatar
      Remove Gitlab::Git::Repository#rugged and Gollum code · a99bf447
      Alejandro Rodríguez authored
      Cleanup code, and refactor tests that still use Rugged. After this, there should
      be no Rugged code that access the instance's repositories on non-test
      environments. There is still some rugged code for other tasks like the
      repository import task, but since it doesn't access any repository storage path
      it can stay.
      a99bf447
  28. 01 Oct, 2018 1 commit