Commit graph

13 commits

Author SHA1 Message Date
GitLab Bot
85e494935a Add latest changes from gitlab-org/gitlab@master 2020-01-14 15:07:55 +00:00
Nick Thomas
4aa76dddec
Remove dead MySQL code
None of this code can be reached any more, so it can all be removed
2019-07-23 16:53:03 +01:00
Bob Van Landuyt
589b2db06c Setup Phabricator import
This sets up all the basics for importing Phabricator tasks into
GitLab issues.

To import all tasks from a Phabricator instance into GitLab, we'll
import all of them into a new project that will have its repository
disabled.

The import is hooked into a regular ProjectImport setup, but similar
to the GitHub parallel importer takes care of all the imports itself.

In this iteration, we're importing each page of tasks in a separate
sidekiq job.

The first thing we do when requesting a new page of tasks is schedule
the next page to be imported. But to avoid deadlocks, we only allow a
single job per worker type to run at the same time.

For now we're only importing basic Issue information, this should be
extended to richer information.
2019-05-31 09:40:54 +02:00
Kamil Trzciński
f3ad51f8a5 Improve performance of PR import
This removes unneeded `.reload` call which
makes AR to load ALL objects, and create its
in-memory representation.
2019-04-08 15:45:06 +02:00
Kamil Trzciński
7fbfb1998a Force to recreate all diffs on import
If for whatever reason we fail to import MR data,
subsequent run will fail as we try to insert duplicate data.
Instead of trying to recover, lets delete all and retry again.
2019-03-26 12:25:25 +00:00
Andreas Brandl
4ac06d344b
Revert " Trigger iid logic from GitHub importer for merge requests."
This reverts commit fb98496f49.
2019-01-29 15:38:40 +01:00
Takuya Noguchi
e902f462c2 Eliminate duplicated words
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-11-22 01:01:23 +09:00
gfyoung
7ec8af5017 Enable even more frozen string for lib/gitlab
Enables frozen string for the following:

* lib/gitlab/hook_data/**/*.rb
* lib/gitlab/i18n/**/*.rb
* lib/gitlab/import/**/*.rb
* lib/gitlab/import_export/**/*.rb
* lib/gitlab/kubernetes/**/*.rb
* lib/gitlab/legacy_github_import/**/*.rb
* lib/gitlab/manifest_import/**/*.rb
* lib/gitlab/metrics/**/*.rb
* lib/gitlab/middleware/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-16 17:41:14 -08:00
Stan Hu
d4ef4ad752 Reduce SQL queries needed to load open merge requests
The SQL queries and memory allocation in MergeRequests::RefreshService
is dominated by queries for Project and Route loads. On staging, the
absence of an inverse relationship caused Rails to make over 1100
extraneous SQL queries for the www-gitlab-com repository.

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/49703
2018-10-30 22:29:57 -07:00
Yorick Peterse
2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Stan Hu
e850d4ea6c Add JSON logging for Bitbucket Server importer
Adds an importer.log so that it's easier to track what's happening with the import.
2018-08-30 10:58:31 -07:00
Stan Hu
09cdd7dca0 Bitbucket Server importer: Eliminate most idle-in-transaction issues
Just like with the GitHub importer, the Bitbucket Server importer can hit the
default 60 s idle-in-transaction timeouts if it takes too long to create the
merge request. We solve this by using the same approach as the GitHub importer:

1. Bypass all validation and hooks in creating a merge request
2. Insert the Git data in a separate transaction

Part of #50021
2018-08-26 07:13:36 -07:00
Stan Hu
0377c015cf Refactor GitHub Importer database helpers into helper methods
This in preparation for addressing idle-in-transaction timeouts for other importers.

Part of #50021
2018-08-24 05:34:38 -07:00