<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/spec/lib, branch github-rake-task-rate-limiting</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Support importing GH projects without rate limits</title>
<updated>2017-11-08T20:37:01+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-11-08T20:37:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f37fe2edc80b83513cb9d30b6c97e85c9ccca29c'/>
<id>f37fe2edc80b83513cb9d30b6c97e85c9ccca29c</id>
<content type='text'>
GitHub Enterprise disables rate limiting for the API, resulting in HTTP
404 errors when requesting rate limiting details. This changes
Gitlab::GithubImport::Client so it can deal with rate limiting being
disabled.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GitHub Enterprise disables rate limiting for the API, resulting in HTTP
404 errors when requesting rate limiting details. This changes
Gitlab::GithubImport::Client so it can deal with rate limiting being
disabled.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fix-issues-api-list-performance' into 'master'</title>
<updated>2017-11-08T19:37:21+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2017-11-08T19:37:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=0c3877a48827b587b407174410196993bec79f73'/>
<id>0c3877a48827b587b407174410196993bec79f73</id>
<content type='text'>
Fail when issuable_meta_data is called on an unlimited collection

Closes #39845

See merge request gitlab-org/gitlab-ce!15249</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fail when issuable_meta_data is called on an unlimited collection

Closes #39845

See merge request gitlab-org/gitlab-ce!15249</pre>
</div>
</content>
</entry>
<entry>
<title>Restore Enterprise support in the GH importer</title>
<updated>2017-11-08T17:06:03+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-11-08T17:06:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=2b886a7815fc6e717e6aabc92380679e1dcaf0ee'/>
<id>2b886a7815fc6e717e6aabc92380679e1dcaf0ee</id>
<content type='text'>
This was removed by accident as the old GitHub importer handled this
deep down the codebase, making it easy to miss.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was removed by accident as the old GitHub importer handled this
deep down the codebase, making it easy to miss.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Error 500 when pushing LFS objects with a write deploy key</title>
<updated>2017-11-08T16:21:39+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2017-11-08T16:21:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=0232450c8aee08a656275caf7b990e0bcbbb1cf4'/>
<id>0232450c8aee08a656275caf7b990e0bcbbb1cf4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'github-importer-refactor' into 'master'</title>
<updated>2017-11-08T11:52:39+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2017-11-08T11:52:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=92249f1ac883c2a861235ec49526cbafca73b362'/>
<id>92249f1ac883c2a861235ec49526cbafca73b362</id>
<content type='text'>
Rewrite the GitHub importer to perform work in parallel and greatly improve performance

Closes #33135, #38621, and #39361

See merge request gitlab-org/gitlab-ce!14731</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rewrite the GitHub importer to perform work in parallel and greatly improve performance

Closes #33135, #38621, and #39361

See merge request gitlab-org/gitlab-ce!14731</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'feature-change-signout-route' into 'master'</title>
<updated>2017-11-08T09:28:50+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2017-11-08T09:28:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b579cc7620dad1d406e974cce2d9ad5a4ce58a57'/>
<id>b579cc7620dad1d406e974cce2d9ad5a4ce58a57</id>
<content type='text'>
Change Sign Out route from a DELETE to a GET

Closes #39708

See merge request gitlab-org/gitlab-ce!15231</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change Sign Out route from a DELETE to a GET

Closes #39708

See merge request gitlab-org/gitlab-ce!15231</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bvl-free-paths' into 'master'</title>
<updated>2017-11-08T08:41:56+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2017-11-08T08:41:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=de614b0e1af598d924753497f398f0379a0c1877'/>
<id>de614b0e1af598d924753497f398f0379a0c1877</id>
<content type='text'>
Free some reserved group routes

See merge request gitlab-org/gitlab-ce!15052</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Free some reserved group routes

See merge request gitlab-org/gitlab-ce!15052</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'pawel/fix_backend_transaction_protected_labels_method' into 'master'</title>
<updated>2017-11-08T08:14:20+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2017-11-08T08:14:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=cb606c5a79039706016c7537c8e72645b3668592'/>
<id>cb606c5a79039706016c7537c8e72645b3668592</id>
<content type='text'>
Make BackgroundTransaction#labels public

See merge request gitlab-org/gitlab-ce!15257</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make BackgroundTransaction#labels public

See merge request gitlab-org/gitlab-ce!15257</pre>
</div>
</content>
</entry>
<entry>
<title>Replace old GH importer with the parallel importer</title>
<updated>2017-11-07T22:25:03+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-10-18T19:46:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=6e242e82237ad2cf362098f3f42f4a9dd1a4ad27'/>
<id>6e242e82237ad2cf362098f3f42f4a9dd1a4ad27</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite the GitHub importer from scratch</title>
<updated>2017-11-07T22:24:59+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-10-13T16:50:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4dfe26cd8b6863b7e6c81f5c280cdafe9b6e17b6'/>
<id>4dfe26cd8b6863b7e6c81f5c280cdafe9b6e17b6</id>
<content type='text'>
Prior to this MR there were two GitHub related importers:

* Github::Import: the main importer used for GitHub projects
* Gitlab::GithubImport: importer that's somewhat confusingly used for
  importing Gitea projects (apparently they have a compatible API)

This MR renames the Gitea importer to Gitlab::LegacyGithubImport and
introduces a new GitHub importer in the Gitlab::GithubImport namespace.
This new GitHub importer uses Sidekiq for importing multiple resources
in parallel, though it also has the ability to import data sequentially
should this be necessary.

The new code is spread across the following directories:

* lib/gitlab/github_import: this directory contains most of the importer
  code such as the classes used for importing resources.
* app/workers/gitlab/github_import: this directory contains the Sidekiq
  workers, most of which simply use the code from the directory above.
* app/workers/concerns/gitlab/github_import: this directory provides a
  few modules that are included in every GitHub importer worker.

== Stages

The import work is divided into separate stages, with each stage
importing a specific set of data. Stages will schedule the work that
needs to be performed, followed by scheduling a job for the
"AdvanceStageWorker" worker. This worker will periodically check if all
work is completed and schedule the next stage if this is the case. If
work is not yet completed this worker will reschedule itself.

Using this approach we don't have to block threads by calling `sleep()`,
as doing so for large projects could block the thread from doing any
work for many hours.

== Retrying Work

Workers will reschedule themselves whenever necessary. For example,
hitting the GitHub API's rate limit will result in jobs rescheduling
themselves. These jobs are not processed until the rate limit has been
reset.

== User Lookups

Part of the importing process involves looking up user details in the
GitHub API so we can map them to GitLab users. The old importer used
an in-memory cache, but this obviously doesn't work when the work is
spread across different threads.

The new importer uses a Redis cache and makes sure we only perform
API/database calls if absolutely necessary.  Frequently used keys are
refreshed, and lookup misses are also cached; removing the need for
performing API/database calls if we know we don't have the data we're
looking for.

== Performance &amp; Models

The new importer in various places uses raw INSERT statements (as
generated by `Gitlab::Database.bulk_insert`) instead of using Rails
models. This allows us to bypass any validations and callbacks,
drastically reducing the number of SQL queries and Gitaly RPC calls
necessary to import projects.

To ensure the code produces valid data the corresponding tests check if
the produced rows are valid according to the model validation rules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this MR there were two GitHub related importers:

* Github::Import: the main importer used for GitHub projects
* Gitlab::GithubImport: importer that's somewhat confusingly used for
  importing Gitea projects (apparently they have a compatible API)

This MR renames the Gitea importer to Gitlab::LegacyGithubImport and
introduces a new GitHub importer in the Gitlab::GithubImport namespace.
This new GitHub importer uses Sidekiq for importing multiple resources
in parallel, though it also has the ability to import data sequentially
should this be necessary.

The new code is spread across the following directories:

* lib/gitlab/github_import: this directory contains most of the importer
  code such as the classes used for importing resources.
* app/workers/gitlab/github_import: this directory contains the Sidekiq
  workers, most of which simply use the code from the directory above.
* app/workers/concerns/gitlab/github_import: this directory provides a
  few modules that are included in every GitHub importer worker.

== Stages

The import work is divided into separate stages, with each stage
importing a specific set of data. Stages will schedule the work that
needs to be performed, followed by scheduling a job for the
"AdvanceStageWorker" worker. This worker will periodically check if all
work is completed and schedule the next stage if this is the case. If
work is not yet completed this worker will reschedule itself.

Using this approach we don't have to block threads by calling `sleep()`,
as doing so for large projects could block the thread from doing any
work for many hours.

== Retrying Work

Workers will reschedule themselves whenever necessary. For example,
hitting the GitHub API's rate limit will result in jobs rescheduling
themselves. These jobs are not processed until the rate limit has been
reset.

== User Lookups

Part of the importing process involves looking up user details in the
GitHub API so we can map them to GitLab users. The old importer used
an in-memory cache, but this obviously doesn't work when the work is
spread across different threads.

The new importer uses a Redis cache and makes sure we only perform
API/database calls if absolutely necessary.  Frequently used keys are
refreshed, and lookup misses are also cached; removing the need for
performing API/database calls if we know we don't have the data we're
looking for.

== Performance &amp; Models

The new importer in various places uses raw INSERT statements (as
generated by `Gitlab::Database.bulk_insert`) instead of using Rails
models. This allows us to bypass any validations and callbacks,
drastically reducing the number of SQL queries and Gitaly RPC calls
necessary to import projects.

To ensure the code produces valid data the corresponding tests check if
the produced rows are valid according to the model validation rules.
</pre>
</div>
</content>
</entry>
</feed>
