Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-03Use shard name in Git::GitlabProjects instead of shard pathAhmad Sherif
Closes gitaly#1110
2018-03-27Test if remote repository exists before cloningZeger-Jan van de Weg
When a repository does not exist on a remote, Gitaly won't be able to clone it. This is correct behaviour, but from the clients perspective a change in behaviour. This change implements the client side changes that allows Gitaly to execute a `git ls-remote <remote-url> HEAD`. This way the client has no need to shell out to Git. In the situation where multiple Gitalies are available, one is chosen at random. This commit closes https://gitlab.com/gitlab-org/gitlab-ce/issues/43929, while its also a part of https://gitlab.com/gitlab-org/gitaly/issues/1084
2018-02-19[GH Import] Create an empty wiki if wiki import failedValery Sizov
2018-01-25Look for rugged with static analysisJacob Vosmaer
2017-12-20Migrate to Project#empty_repo?Zeger-Jan van de Weg
2017-11-23Rename fetch_refs to refmapDouwe Maan
2017-11-23Clean up repository fetch and mirror methodsDouwe Maan
2017-11-08Support importing GH projects without rate limitsYorick Peterse
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.
2017-11-08Restore Enterprise support in the GH importerYorick Peterse
This was removed by accident as the old GitHub importer handled this deep down the codebase, making it easy to miss.
2017-11-08Rewrite the GitHub importer from scratchYorick Peterse
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 & 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.
2017-10-18Use wiki.disk_pathNick Thomas
2017-08-03Change all `:empty_project` to `:project`Robert Speicher
2017-08-01Ensure all project factories use `:repository` trait or `:empty_project`Robert Speicher
2017-08-01Rename more path_with_namespace -> full_path or disk_pathGabriel Mazetto
2017-07-27Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable
services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-04Backport of multiple_assignees_feature [ci skip]Valery Sizov
2017-04-03Fix GitHub pull request formatter specDouglas Barbosa Alexandre
2017-04-03Fix specsGabriel Mazetto
2017-04-03Improve specs examplesGabriel Mazetto
2017-04-03Fix specsGabriel Mazetto
2017-04-03One more change to the branch names to preserve metadataGabriel Mazetto
2017-04-03Prefixes source branch name with short SHA to avoid collisionDouglas Barbosa Alexandre
2017-04-03Fix GitHub importer for PRs of deleted forked repositoriesGabriel Mazetto
2017-03-29Labels support color names in backendDongqing Hu
2017-03-10Using guard clause and added more specsGabriel Mazetto
2017-03-10Fix GitHub Import for open PRs from a forkGabriel Mazetto
2017-03-08Refactor some codeGabriel Mazetto
2017-03-08Fix name colision when importing GitHub pull requests from forked repositoriesGabriel Mazetto
2017-03-07Fix 'Object not found - no match for id (sha)' when importing GitHub PRsDouglas Barbosa Alexandre
2017-02-20GitHub Importer - Find users based on their email addressDouglas Barbosa Alexandre
The returned email by the GitHub API is the user's publicly visible email address (or null if the user has not specified a public email address in their profile)
2017-02-05Add traits for ProjectFeatures to Project factorySemyon Pupkov
https://gitlab.com/gitlab-org/gitlab-ce/issues/24007
2017-01-25Use `:empty_project` where possible throughout spec/libRobert Speicher
2016-12-19Add Project#gitea_import?Rémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19Modify GithubImport to support GiteaRémy Coutable
The reason is that Gitea plan to be GitHub-compatible so it makes sense to just modify GitHubImport a bit for now, and hopefully we can change it to GitHubishImport once Gitea is 100%-compatible. Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-06Use :maximum instead of :within for length validators with a 0..N rangeRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-01Fix branch validation for GitHub PR where repo/fork was renamed/deletedDouglas Barbosa Alexandre
2016-11-18Refactor github import to reduce number of API callsAndrew Smith
Ref #24073
2016-10-28Modify GitHub importer to be retryableAhmad Sherif
2016-10-27Fix applying labels for GitHub-imported MRsAhmad Sherif
2016-10-19Fix GitHub importer specDouglas Barbosa Alexandre
2016-10-04Skip wiki creation when GitHub project has wiki enabledDouglas Barbosa Alexandre
If the GitHub project repository has wiki, we should not create the default wiki. Otherwise the GitHub importer will fail because the wiki repository already exist. This bug was introduced here https://gitlab.com/gitlab-org/gitlab-ce/commit/892dea67717c0efbd6a28f763 9f34535ec0a8747
2016-09-27Import all GitHub comments after importing issues and PRsAhmad Sherif
2016-09-27Speed up label-applying process for GitHub importingAhmad Sherif
* No need to re-fetch issues from GH to read their labels, the labels are already there from the index request. * No need to look up labels on the database for every application, so we cache them.
2016-09-27Process each page of GitHub resources instead of concating them then processingAhmad Sherif
This should avoid having large memory growth when importing GitHub repos with lots of resources.
2016-09-20modify github import JS and controller so we can now specify a namespace ↵James Lopez
and/or name for a project. - Fixed and added specs. - Added different namespace options depending on user privilages - Updated docs.
2016-09-13Import GitHub release notesAndrew Smith
# Conflicts: # lib/gitlab/github_import/importer.rb
2016-09-12Merge branch '21569-dont-add-created-by-for-matched-users' into 'master' Robert Speicher
Only add original author tag line when importing from GitHub if there isn't a linked GitLab account ## What does this MR do? If there we've found a linked GitLab user for a creator of an issue or comment don't add the 'Created By:' line. ## What are the relevant issue numbers? Closes #21569 See merge request !6081
2016-09-09Avoid conflict with admin labels when importing GitHub labelsDouglas Barbosa Alexandre
2016-09-08Only add the original author if there isn't a linked GitLab accountAndrew Smith
2016-09-01Merge branch 'issue_19734' into 'master' Douwe Maan
Project tools visibility level ## part of #19734 ![project_features_access_level](/uploads/81ec7185d4e61d7578652020209af925/project_features_access_level.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5606