summaryrefslogtreecommitdiff
path: root/app/services
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'sync-merge-ref-upon-mergeability-check' into 'master'Douwe Maan2019-06-243-18/+137
|\ | | | | | | | | Automatically update MR merge-ref along merge status See merge request gitlab-org/gitlab-ce!29569
| * Avoid touching the MR status if MR is not openedOswaldo Ferreira2019-06-211-1/+10
| |
| * Only force recheck when merge-ref is outdatedOswaldo Ferreira2019-06-201-2/+17
| | | | | | | | | | | | When recheck flag is true, we make sure the merge-ref is indeed outdated. If it is, we update it along the merge status.
| * Automatically update MR merge-ref along merge statusOswaldo Ferreira2019-06-203-18/+113
| | | | | | | | | | | | | | | | | | | | | | | | This couples the code that transitions the `MergeRequest#merge_status` and refs/merge-requests/:iid/merge ref update. In general, instead of directly telling `MergeToRefService` to update the merge ref, we should rely on `MergeabilityCheckService` to keep both the merge status and merge ref synced. Now, if the merge_status is `can_be_merged` it means the merge-ref is also updated to the latest. We've also updated the logic to be more systematic and less user-based.
* | Merge branch '60617-enable-project-cluster-jit' into 'master'Thong Kuah2019-06-241-3/+0
|\ \ | | | | | | | | | | | | Enable JIT Kubernetes resource creation for project level clusters See merge request gitlab-org/gitlab-ce!29515
| * | Enable project-level JIT resource creation60617-enable-project-cluster-jitTiger2019-06-181-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this behaviour was only available to group and instance-level clusters, as some project clusters relied on Kubernetes credentials being passed through to the runner instead of having their resources managed by GitLab (which is not available when using JIT). These clusters have been migrated to unmanaged, so resources can be created on demand for the remaining managed clusters.
* | | Merge branch 'bw-issue-reorder' into 'master'Kamil Trzciński2019-06-213-2/+53
|\ \ \ | | | | | | | | | | | | | | | | Add ability to reorder issues See merge request gitlab-org/gitlab-ce!29012
| * | | Add reorder action to Project IssuesControllerbw-issue-reorderBrett Walker2019-06-213-2/+53
| | | | | | | | | | | | | | | | to support manual sorting on the frontend
* | | | Don't show private keys for letsencrypt certsVladimir Shushlin2019-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds enum certificate_source to pages_domains table with default manually_uploaded Mark certificates as 'gitlab_provided' if the were obtained through Let's Encrypt Mark certificates as 'user_provided' if they were uploaded through controller or api Only show private key in domain edit form if it is 'user_provided' Only show LetsEncrypt option if is enabled by application settings (and feature flag) Refactor and fix some specs to match new logic Don't show Let's Encrypt certificates as well
* | | | Retry fetching Kubernetes Secret tokenDylan Griffith2019-06-211-3/+16
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Since Kubernetes is creating the Secret and token asynchronously it is necessary that we implement some delay or retrying logic to avoid a race condition where we fetch a Secret before the token is even set. There does not appear to be any way for us to force it to be set with any synchronous API call so retrying seems to be the only option.
* | | Updating CE repo to include new EE users API changesMichael Leopard2019-06-192-7/+20
| | | | | | | | | | | | | | | Updated users API documentation Moved API level changes to the service level
* | | CE backport for changes in EE MR 14017Luke Duncalfe2019-06-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports to CE changes to allow the EE model DesignManagement::Repository to override the #attributes_at method to provide its own git attributes. The #attributes_at method was freely available, as it's never called by anything in the app. It looks like the code that called it got refactored out of existence in ca66a04f. It was still being called in a spec https://gitlab.com/gitlab-org/gitlab-ce/blob/85b29c1c2fa3b94d7371cf454c485457a0756cb1/spec/services/files/create_service_spec.rb#L40 which I've left because with the change in Lfs::FileTransformer in fact is now again the perfect test! See EE MR https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14017 And these comment threads https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178002089 https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178049984
* | | Backport of 12014-incremental-es-wiki-updatesce-12014-incremental-es-wiki-updatesMario de la Ossa2019-06-181-0/+9
|/ / | | | | | | Bringing in the DB migration and some light changes for CE classes
* | Merge branch 'revert-concurrent-pipeline-schedule-creation' into 'master'Kamil Trzciński2019-06-181-1/+12
|\ \ | | | | | | | | | | | | Revert concurrent pipeline creation for pipeline schedules See merge request gitlab-org/gitlab-ce!29794
| * | Revert concurrent pipeline schedule creationrevert-concurrent-pipeline-schedule-creationShinya Maeda2019-06-181-1/+12
| |/ | | | | | | | | | | This commit reverts the previously introduced concurrent pipeline schedule creation which was a viable solution for mitigating inconsistent pipeline schedule by Sidekiq Memory Killer.
* | Look for new branches more carefullyNick Thomas2019-06-181-1/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | In certain cases, GitLab can miss a PostReceive invocation the first time a branch is pushed. When this happens, the "branch created" hooks are not run, which means various features don't work until the branch is deleted and pushed again. This MR changes the `Git::BranchPushService` so it checks the cache of existing branches in addition to the `oldrev` reported for the branch. If the branch name isn't in the cache, chances are we haven't run the service yet (it's what refreshes the cache), so we can go ahead and run it, even through `oldrev` is set. If the cache has been cleared by some other means in the meantime, then we'll still fail to run the hooks when we should. Fixing that in the general case is a larger problem, and we'd need to devote significant engineering effort to it. There's a chance that we'll run the relevant hooks *multiple times* with this change, if there's a race between the branch being created, and the `PostReceive` worker being run multiple times, but this can already happen, since Sidekiq is "at-least-once" execution of jobs. So, this should be safe.
* CE backport for changes in EE MR 138949490-record-repository_type-on-lfs_objects_projects-ceLuke Duncalfe2019-06-173-8/+12
| | | | | | | | | | | | | | | | | | | | This backports to CE changes that allow the recording of the repository_type in the table lfs_objects_projects. This is in order to allow future pruning of unreferenced LFS objects, as we will need to know which repository to look in for the LFS pointer file. The EE MR that contains the original code and a full explanation of the changes is https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894 EE Issue https://gitlab.com/gitlab-org/gitlab-ee/issues/9490 Note that there was a lot of CE code changed in the EE MR because we want to allow the wiki repository to also use LFS. See https://gitlab.com/gitlab-org/gitlab-ce/issues/43721. As the wiki is an unlicensed feature, a full backport is required to enable this.
* Merge branch 'ce-12091-remove-elasticsearch-lite-project' into 'master'Sean McGivern2019-06-131-4/+0
|\ | | | | | | | | Backport changes from 'Partially revert d9cb907c: "Avoid loading objects from DB in ES results"' See merge request gitlab-org/gitlab-ce!29597
| * Revert "Avoid loading objects from DB in ES results"Nick Thomas2019-06-131-4/+0
| | | | | | | | This reverts commit d9cb907c3e987363065136bafb2156e86bc5de26.
* | Modify the branch hooks spec to expect processing of commit messagesFabio Papa2019-06-131-5/+1
|/ | | | | | | | | Commit messages are not processed for references to issues when creating the default branch on push. This was expected behavior (probably to avoid performance problems when first pushing a repository with thousands of commits). However, this is not an issue because we always limit the number of commits to process to 100 regardless of whether we are creating the default branch or not.
* Merge branch 'expose-project-git-depth-via-api' into 'master'Kamil Trzciński2019-06-121-3/+3
|\ | | | | | | | | | | | | Expose default_git_depth via project API Closes #62908 See merge request gitlab-org/gitlab-ce!29353
| * Expose ci_default_git_depth via project APIexpose-project-git-depth-via-apiFabio Pitino2019-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | Enable Get and Update of ci_default_git_depth for Project API. Renaming Project#default_git_depth to :ci_default_git_depth to give more context through the API usage. Add API documentation
* | Update merge options for auto merge strategiesShinya Maeda2019-06-122-0/+14
| | | | | | | | | | Currently, merge options is updated on #execute method, however, we should have #update interface to make it explicit.
* | Revert "Automatically update MR merge-ref along merge status"Oswaldo Ferreira2019-06-113-93/+24
| |
* | Merge branch 'fix-pipeline-schedule-owner-is-nil' into 'master'Stan Hu2019-06-111-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Fix pipeline schedule when owner is nil Closes gitlab-com/gl-infra/production#805 and #63086 See merge request gitlab-org/gitlab-ce!29477
| * | Fix pipeline schedule when owner is nilfix-pipeline-schedule-owner-is-nilShinya Maeda2019-06-111-1/+1
| |/ | | | | | | Fixing the bug
* | Merge branch 'process-when-auto-merge-is-enabled' into 'master'Kamil Trzciński2019-06-111-0/+3
|\ \ | |/ |/| | | | | Notify events when auto merge is enabled or merge param is updated See merge request gitlab-org/gitlab-ce!29415
| * Notify when auto merge is enabledprocess-when-auto-merge-is-enabledShinya Maeda2019-06-101-0/+3
| | | | | | | | | | There are bunch of auto merge related notifications, and when auto merge is enabled, it should be evaluated immediately.
* | Cancel Auto Merge when target branch is changedcancel-auto-merge-when-branch-is-changedShinya Maeda2019-06-104-7/+9
|/ | | | When target branch is updated, Auto Merge should be canceled.
* Merge branch '58297-remove-extraneous-gitaly-calls-from-md-rendering' into ↵Dmitriy Zaporozhets2019-06-071-1/+3
|\ | | | | | | | | | | | | 'master' Remove extraneous DiffNote#supports_suggestion? calls See merge request gitlab-org/gitlab-ce!29027
| * Extend #parse to accept a suggestions_filter_enabled paramKerri Miller2019-06-051-1/+3
| | | | | | | | This will allow the front end to specify the behavior as needed.
* | Merge branch '62418-project-default-git-depth' into 'master'Kamil Trzciński2019-06-071-8/+12
|\ \ | | | | | | | | | | | | | | | | | | Add project level git depth setting Closes #59688 See merge request gitlab-org/gitlab-ce!28919
| * | Comment why forks get default_git_depth of 0 instead nil62418-project-default-git-depthKrasimir Angelov2019-06-071-0/+3
| | | | | | | | | | | | and simplify ProjectCiCdSetting#set_default_git_depth
| * | Forks get default_git_depth 0 if the origin is nilKrasimir Angelov2019-06-061-5/+2
| | | | | | | | | | | | | | | If the origin project has no default_git_depth set (i.e. nil) set the fork's default_git_depth to 0
| * | Add project level git depth settingKrasimir Angelov2019-06-061-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce default_git_depth in project's CI/CD settings and set it to 50. Use it if there is no GIT_DEPTH variable specified. Apply this default only to newly created projects and keep it nil for old ones in order to not break pipelines that rely on non-shallow clones. default_git_depth can be updated from CI/CD Settings in the UI, must be either nil or integer between 0 and 1000 (incl). Inherit default_git_depth from the origin project when forking projects. MR pipelines are run on a MR ref (refs/merge-requests/:iid/merge) and it contains unique commit (i.e. merge commit) which doesn't exist in the other branch/tags refs. We need to add it cause otherwise it may break pipelines for old projects that have already enabled Pipelines for merge results and have git depth 0. Document new default_git_depth project CI/CD setting
* | | Add pages domains acme ordersVladimir Shushlin2019-06-062-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract acme double to helper Create ACME challanges for pages domains * Create order & challange through API * save them to database * request challenge validation We're saving order and challenge as one entity, that wouldn't be correct if we would order certificates for several domains simultaneously, but we always order certificate per domain Add controller for processing acme challenges redirected from pages Don't save acme challenge url - we don't use it Validate acme challenge attributes Encrypt private_key in acme orders
* | | Merge branch 'create-base-class-for-auto-merge-architecture' into 'master'Robert Speicher2019-06-062-29/+57
|\ \ \ | |/ / |/| | | | | | | | Create BaseService for Auto Merge architecture See merge request gitlab-org/gitlab-ce!29120
| * | Create BaseService for Auto Merge architecturecreate-base-class-for-auto-merge-architectureShinya Maeda2019-06-062-29/+57
| | | | | | | | | | | | It abstracts some codes for common methods in AutoMerge::*Services.
* | | Merge branch 'ce-10854-elasticsearch_avoid_db' into 'master'Sean McGivern2019-06-061-0/+4
|\ \ \ | | | | | | | | | | | | | | | | Backport of 10854-elasticsearch_avoid_db See merge request gitlab-org/gitlab-ce!28579
| * | | Backport of 10854-elasticsearch_avoid_dbce-10854-elasticsearch_avoid_dbMario de la Ossa2019-06-051-0/+4
| |/ /
* | | Introduce service for merge request pipeline creationcreate-merge-request-create-pipeline-serviceShinya Maeda2019-06-062-25/+38
|/ / | | | | | | | | | | We don't have a way to create MR pipeline today, this is one of the headaches for users. This change is a preliminary work for the capability.
* | Setup Git client for JupyterAmit Rathi2019-06-051-1/+1
|/
* Delete unauthorized Todos when project is privateissue_49897Felipe Artur2019-06-053-9/+29
| | | | | Delete Todos for guest users when project visibility level is updated to private.
* Merge branch 'cancel-auto-merge-when-merge-request-is-closed' into 'master'Grzegorz Bizon2019-06-041-0/+5
|\ | | | | | | | | Cancel auto merge when merge request is closed See merge request gitlab-org/gitlab-ce!28782
| * Cancel auto merge when merge request is closedcancel-auto-merge-when-merge-request-is-closedShinya Maeda2019-06-041-0/+5
| | | | | | | | We should cancel auto merge when merge request is closed.
* | Change s_() calls to _() callsMichał Zając2019-06-041-1/+1
| | | | | | | | There are no namespaces in the strings so we don't need those
* | Merge branch ↵Kamil Trzciński2019-06-041-0/+13
|\ \ | |/ |/| | | | | | | | | | | | | 'set-real-next-run-at-for-preventing-duplciate-pipeline-creations' into 'master' Make pipeline schedule worker resilient Closes gitlab-com/gl-infra/production#805 and #61955 See merge request gitlab-org/gitlab-ce!28407
| * Make pipeline schedule worker resilientset-real-next-run-at-for-preventing-duplciate-pipeline-creationsShinya Maeda2019-06-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, pipeline schedule worker is unstable because it's sometimes killed by excessive memory consumption. In order to improve the performance, we add the following fixes: 1. next_run_at is always real_next_run, which means the value always takes into account of worker's cron schedule 1. Remove exlusive lock. This is already covered by real_next_run change. 1. Use RunPipelineScheduleWorker for avoiding memory killer. Memory consumption is spread to the multiple sidekiq worker.
* | Merge branch 'osw-sync-merge-ref-upon-mergeability-check' into 'master'Douwe Maan2019-06-033-24/+93
|\ \ | | | | | | | | | | | | | | | | | | Automatically update MR merge-ref along merge status Closes #58495 See merge request gitlab-org/gitlab-ce!28513
| * | Add payload to the service responseOswaldo Ferreira2019-05-312-10/+39
| | | | | | | | | | | | | | | This introduces payload to the ServiceResponse with the merge ref HEAD commit data