summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Expose update project service JSON endpointPeter Leitzen2019-09-091-0/+7
| | | | | Utilize `json_fields` to expose fields via `Service#as_json(only: json_fields)`.
* Use delete_all for deleting eventsevents-delete-allJan Provaznik2019-09-075-5/+5
| | | | | | Because we don't have any destroy callbacks (or other logic triggered on event destroy), there is no reason for deleting events inefficiently one by one, instead we can use :delete_all.
* Allow to load ECDSA certificates for pages domainsVladimir Shushlin2019-09-071-2/+2
| | | | Just replace RSA.new with PKey.read
* Merge branch 'instance-group-level-knative' into 'master'Grzegorz Bizon2019-09-061-2/+2
|\ | | | | | | | | | | | | Enable Knative installation on group and instance level clusters Closes #62667 and #62666 See merge request gitlab-org/gitlab-ce!32128
| * Enable Knative installation on group and instance level clustersAlishan Ladhani2019-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | - Show Knative install button on group/instance cluster pages - Allow Knative to be installed on group/instance clusters - Add feature specs for installing applications on group/instance clusters - Add changelog entry - Update docs to reflect that Knative can now be installed on group-level and instance-level clusters
* | Merge branch 'ce-detect-github-pull-requests' into 'master'Kamil Trzciński2019-09-064-1/+110
|\ \ | |/ |/| | | | | Port CreateGithubPullRequestEvents migration from EE See merge request gitlab-org/gitlab-ce!31802
| * CE port for pipelines for external pull requestsce-detect-github-pull-requestsFabio Pitino2019-09-054-1/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect if pipeline runs for a GitHub pull request When using a mirror for CI/CD only we register a pull_request webhook. When a pull_request webhook is received, if the source branch SHA matches the actual head of the branch in the repository we create immediately a new pipeline for the external pull request. Otherwise we store the pull request info for when the push webhook is received. When using "only/except: external_pull_requests" we can detect if the pipeline has a open pull request on GitHub and create or not the job based on that.
* | Merge branch 'group_level_jupyterhub' into 'master'Robert Speicher2019-09-052-7/+4
|\ \ | | | | | | | | | | | | Group level JupyterHub See merge request gitlab-org/gitlab-ce!32512
| * | Allow group install of JupyterHubgroup_level_jupyterhubJames Fargher2019-09-052-7/+4
| | | | | | | | | | | | Removes limitations on cluster types that can install JupyterHub
* | | Extend License Compliance entity for Pipelines and MR viewCan Eldem2019-09-051-2/+2
| | |
* | | New interruptible attribute supported in YAML parsing.Cédric Tabin2019-09-054-0/+19
| | | | | | | | | | | | | | | | | | | | | Since it is not possible to dynamically detect if a job is automatically cancellable or not, a this new attribute is necessary. Moreover, it let the maintainer of the repo to adjust the behaviour of the auto cancellation feature to match exactly what he needs.
* | | Add structure to support EE feature of COARKerri Miller2019-09-052-0/+9
| |/ |/| | | | | | | | | | | These are the structural changes for supporting the EE feature of moving "code_owner_approval_required" state from existing on a project to being on the protected branches individually, allowing for CODEOWNER validation on push events.
* | Merge branch 'bjk/routable_counter' into 'master'Andreas Brandl2019-09-051-8/+4
|\ \ | |/ |/| | | | | Adjust routable metric See merge request gitlab-org/gitlab-ce!32591
| * Adjust routable metricbjk/routable_counterBen Kochie2019-09-051-8/+4
| | | | | | | | | | | | * Define the counter once. * Make metric name follow Prometheus naming conventions. * Add label for call method.
* | Add service to transfer group milestonesEugenia Grieff2019-09-041-0/+1
|/ | | | | | | | | | | - Add new service that transfers milestones from a group to a project - Include new service in Projects transfer service - Include FromUnion module in Milestone model to use in transfer service - Add specs for new milestones service - Add specs for transferring milestones in project transfer service
* Backport EE changes for productivity analyticsPavel Shutsin2019-09-041-1/+5
| | | | Improve diff lines count efficiency
* Create an event on epic actionsJan Provaznik2019-09-036-0/+9
| | | | | Creates new event when an epic is created, closed, reopened or commented.
* Preload routes informationab-routable-nplus1Andreas Brandl2019-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | This fixes a high frequency N+1 issue: `RoutableActions#find_routable!` is used across many controllers to retrieve e.g. the Project or Namespace by path. The `#find_routable!` method calls `#ensure_canonical_path` which in turn retrieves `#full_path` from the given Routable. This in turn triggers a lookup on `routes`, leading to a high frequency of these queries: ```sql SELECT "routes".* FROM "routes" WHERE "routes"."source_id" = $1 AND "routes"."source_type" = $2 LIMIT $3 ``` This is unnecessary as we already join `routes` in `Routable#find_by_full_path` anyways.
* Added relationships between Release and MilestoneEtienne Baqué2019-09-033-0/+31
| | | | | | Modified schema via migrations. Added one-to-one relationship between the two models. Added changelog file
* Merge branch 'add-pipeline-type-key-in-pipeline-entity' into 'master'Kamil Trzciński2019-09-032-0/+27
|\ | | | | | | | | Expose `name` and `merge_request_event_type` in serialized json and predefined variables See merge request gitlab-org/gitlab-ce!32323
| * Add pipeline.type key to PipelineEntityadd-pipeline-type-key-in-pipeline-entityShinya Maeda2019-09-032-0/+27
| | | | | | | | | | This commit adds pipeline.type key to PipelineEntity. This key will be used in MR widget in the next iteration.
* | Merge branch 'change-role-system-hook' into 'master'Rémy Coutable2019-09-031-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Add system hooks for project/group membership updates Closes gitlab-ee#12252 See merge request gitlab-org/gitlab-ce!32371
| * | Add system hooks for project/group membership updatesBrandon Williams2019-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | When updating group and project members, new system hooks `user_update_for_group` and `user_update_for_team` will be executed. Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/12252
* | | Merge branch 'ce-12996-cancel-redundant-pipelines' into 'master'Lin Jen-Shin2019-09-031-4/+4
|\ \ \ | |_|/ |/| | | | | | | | Backport retries options for cancel_running See merge request gitlab-org/gitlab-ce!32525
| * | Backport EE issue 12996ce-12996-cancel-redundant-pipelinesSean Carroll2019-09-021-4/+4
| | |
* | | Stub DetectRepositoryLanguagesWorker for all testsIgor2019-09-031-0/+4
| | | | | | | | | | | | | | | It performs an expensive operation, but isn't required in most of tests
* | | Provide filename and line number for `class_eval`Peter Leitzen2019-09-021-4/+4
| | | | | | | | | | | | This commit removes one RuboCop offense from its todo file.
* | | Reduce amount of property definitions in ChatNotificationServicePeter Leitzen2019-09-021-6/+13
|/ / | | | | | | | | | | | | Before this commit we redefined properties for supported events on each new instance of ChatNotificationService during "runtime". This commit defines the properties only once during "compile time".
* | Fixing #65389Massimeddu Cireddu2019-09-023-2/+10
| | | | | | | | Wrong format on MS Teams integration push events with multi line commit messages
* | Merge branch 'remove-unnecessary-freeze-in-app-models' into 'master'Stan Hu2019-09-0130-45/+45
|\ \ | | | | | | | | | | | | Avoid calling freeze on already frozen strings in app/models See merge request gitlab-org/gitlab-ce!32499
| * | Avoid calling freeze on already frozen strings in app/modelsdineshpanda2019-09-0130-45/+45
| | |
* | | Merge branch 'improve-chatops-help' into 'master'Nick Thomas2019-09-011-1/+3
|\ \ \ | |/ / |/| | | | | | | | Improve chatops help output See merge request gitlab-org/gitlab-ce!32208
| * | Improve chatops help outputimprove-chatops-helpYorick Peterse2019-08-291-1/+3
| | | | | | | | | | | | | | | | | | | | | This improves the output produced when running an unknown command, running the "help" command, and when trying to run a command you are not allowed to run. The new help output includes links to the project of the chatops integration, and a link to the chatops documentation.
* | | Merge branch 'remove-ignorable-column-concern' into 'master'Michael Kozono2019-08-3010-59/+25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Remove dependency on IgnorableColumn concern Closes #66746 See merge request gitlab-org/gitlab-ce!32427
| * | | Use self.ignored_columns += instead of =Stan Hu2019-08-306-25/+24
| | | | | | | | | | | | | | | | This is to accomodate prepended modules.
| * | | Remove dependency on IgnorableColumn concerndineshpanda2019-08-3010-58/+25
| | | |
* | | | Limit access request email to 10 most recently active owners/maintainersManoj MJ2019-08-302-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | This change limits the number of emails for new access requests notifications to 10 most recently active owners/maintainers
* | | | Install cert-manager v0.9.1James Fargher2019-08-301-4/+29
| | | | | | | | | | | | | | | | This does not support upgrading from earlier versions
* | | | Merge branch 'ab-routable-two-step-search' into 'master'Jan Provaznik2019-08-301-2/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Perform two-step Routable lookup by path See merge request gitlab-org/gitlab-ce!32272
| * | | | Add another counter to calculate method call ratioab-routable-two-step-searchAndreas Brandl2019-08-301-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should see the ratio drop down when enabling the Feature. Recommendation by @andrewn
| * | | | Add method call count instrumentationAndreas Brandl2019-08-301-0/+11
| | | | |
| * | | | Perform two-step Routable lookup by pathAndreas Brandl2019-08-301-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to lookup a Project or Namespace by path, we prefer an exact match (case-sensitive) but in absence of that, we'd also take a case-insensitive match. The case-insensitive matching with preference for the exact match is a bit more involved in SQL as the exact lookup. Yet, the majority of cases will be an exact match. The thinking here is that we can optimize the lookup by performing an exact match first and only if there is no result, we perform the case-insensitive lookup. Data for GitLab.com: * We have about 15M records in routes table * About 2,500 routes exist where there's more than one record with the same `lower(path)` It is possible for a user to craft requests that would always trigger the 2-step search (e.g. we have a route for `/foo/bar`, the request is always for `/FOO/bar`). In this case, the change at hand is not beneficial as it would run an additional query. However, based on the data, it is highly likely that the vast majority of requests can be satisfied with an exact match only. The context for this change is https://gitlab.com/gitlab-org/gitlab-ce/issues/64590#note_208156463.
* | | | | Resolve "Use "moved" instead of "closed" in issue references"Juliette de Rancourt2019-08-301-1/+1
|/ / / /
* | | | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher2019-08-2910-14/+73
|\ \ \ \
| * \ \ \ Merge branch 'security-enable-image-proxy' into 'master'GitLab Release Tools Bot2019-08-292-8/+37
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use image proxy to mitigate stealing ip addresses Closes #2812 See merge request gitlab/gitlabhq!2926
| | * | | | Add support for using a Camo proxy serverBrett Walker2019-08-232-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User images and videos will get proxied through the Camo server in order to keep malicious sites from collecting the IP address of users.
| * | | | | Merge branch 'security-epic-notes-api-reveals-historical-info-ce-master' ↵GitLab Release Tools Bot2019-08-292-0/+6
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Filter out old system notes for epics in notes api endpoint response See merge request gitlab/gitlabhq!3224
| | * | | | | Return NO_ACCESS if user is nilPatrick Derichs2019-08-281-0/+2
| | | | | | |
| | * | | | | Filter out old system notes for epicsPatrick Derichs2019-08-281-0/+4
| | |/ / / /
| * | | | | Merge branch 'security-fix-html-injection-for-label-description-ce-master' ↵GitLab Release Tools Bot2019-08-291-2/+6
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Fix HTML injection for label description See merge request gitlab/gitlabhq!3250