summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Rename Todos.with_api_entity_associations to with_entity_associationssh-optimize-todos-controllerStan Hu2019-06-241-1/+1
| | | | | Since this scope is used in both the controller and the API, we rename it to make it clear that it's used for both.
* Merge branch 'fix-labels-in-hooks' into 'master'Ash McKenzie2019-06-241-0/+4
|\ | | | | | | | | | | | | Fix label serialisation in issue and note hooks Closes #63473 See merge request gitlab-org/gitlab-ce!29850
| * Added labels_hook_attrs methodfix-labels-in-hooksJan Provaznik2019-06-241-0/+4
| | | | | | | | | | Based on review comment fetching labels hook_attrs is now wrapped in an issue's model method.
* | Merge branch 'fix-pipeline-schedule-edge-case' into 'master'Lin Jen-Shin2019-06-241-6/+17
|\ \ | | | | | | | | | | | | | | | | | | FIX: Scheduled pipelines scheduled to run at the same time as pipeline_schedule_worker gets pushed to the next run Closes #63469 See merge request gitlab-org/gitlab-ce!29848
| * | Fix pipeline schedule edge casefix-pipeline-schedule-edge-caseShinya Maeda2019-06-241-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | If pipeline schedule is to run at the exact same time with when cron worker runs, the pipeline schedule will not be executed at the ideal timing. We fix this bug by comparing the exact matching of ideal and cron worker's next run at.
* | | Merge branch 'sync-merge-ref-upon-mergeability-check' into 'master'Douwe Maan2019-06-241-21/+15
|\ \ \ | | | | | | | | | | | | | | | | 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-4/+0
| | | |
| * | | Automatically update MR merge-ref along merge statusOswaldo Ferreira2019-06-201-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ↵Thong Kuah2019-06-243-43/+94
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | '17690-Protect-TeamCity-builds-for-triggering-when-a-branch-is-deleted-And-add-MR-option' into 'master' Skip TeamCity trigger on branch delete and support MR triggers Closes #13871 and #17690 See merge request gitlab-org/gitlab-ce!29836
| * | | Extract common validations from ci servicesRaphael Tweitmann2019-06-213-48/+57
| | | | | | | | | | | | | | | | | | | | | | | | DroneCI and TeamCity shared the same validations methods on the data received. These validations were extracted into a concern
| * | | Skip TeamCity on branch delete and add MR triggerNikolay Novikov2019-06-211-24/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a take over from a community contribution: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20990 Skip TeamCity push event when related to branch delete Support merge request events for TeamCity service. Add checkbox for merge request triggers in the TeamCity configuration page.
* | | | Merge branch '60617-enable-project-cluster-jit' into 'master'Thong Kuah2019-06-241-9/+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-9/+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 'sh-promote-remove-migration' into 'master'Thong Kuah2019-06-241-0/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Re-add ignore_column for import columns See merge request gitlab-org/gitlab-ce!29959
| * | | | | Re-add ignore_column for import columnsStan Hu2019-06-231-0/+2
| | |/ / / | |/| | | | | | | | | | | | | | | | | | This `ignore_column` was present for a while but recently removed, but to ensure we don't get error 500s let's keep it for a while.
* | | | | Merge branch 'reduce_prometheus_adapter' into 'master'Ash McKenzie2019-06-242-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Improve #has_metrics? and Environment#has_terminals? See merge request gitlab-org/gitlab-ce!29847
| * | | | Run least expensive method first - has_metrics?reduce_prometheus_adapterThong Kuah2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Success is relatively cheap compared to prometheus_adapter which can invoke deployment_platform which does a lot of work
| * | | | Run least expensive method first - #has_terminals?Thong Kuah2019-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | available? is much cheaper than deployment_platform
| * | | | Run least expensive method firstThong Kuah2019-06-201-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | If environment is not available, then no point running the more expensive `prometheus_adapter`.
* | | | Don't show private keys for letsencrypt certsVladimir Shushlin2019-06-211-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge branch 'bug/63162-duplicate_path_in_links' into 'master'Sean McGivern2019-06-211-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not rewrite relative links for system notes Closes #63162 See merge request gitlab-org/gitlab-ce!29825
| * | | | Do not rewrite relative links for system notesbug/63162-duplicate_path_in_linksMario de la Ossa2019-06-201-1/+1
| |/ / /
* | | | Merge branch 'remove-kubernetes-service-deployment-platform' into 'master'Thong Kuah2019-06-212-45/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove Kubernetes service from deployment platform See merge request gitlab-org/gitlab-ce!29786
| * | | | Update KubernetesService deprecation warningremove-kubernetes-service-deployment-platformTiger2019-06-211-7/+2
| | | | |
| * | | | Remove Kubernetes service from deployment platformTiger2019-06-211-38/+1
| | |_|/ | |/| | | | | | | | | | | | | | This will no longer be used for deployments, as all service templates have been migrated to clusters.
* | | | Remove project-level cluster credential fallbackTiger Watson2019-06-211-13/+0
|/ / / | | | | | | | | | | | | | | | Project-level clusters that made use of this legacy behaviour have been migrated to unmanaged clusters, so we are now free to remove this fallback.
* | | Remove import columns from projects tablesh-remove-import-columns-from-projectsStan Hu2019-06-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21497, we migrated all project import data into a separate table, `project_import_data`. In addition, we also added: ``` ignore_column :import_status, :import_jid, :import_error ``` In https://gitlab.com/gitlab-com/gl-infra/production/issues/908, we observed some of these `import_error` columns consumed megabytes of error backtraces and caused slow loading of projects whenever a `SELECT * from projects` query loaded the row into memory. Since we have long migrated away from these columns, we can now drop these columns entirely.
* | | Knative version bump 0.5 -> 0.6Chris Baumbauer2019-06-191-1/+1
|/ /
* | #57815 Password authentication disabled for UltraAuth usersKartikey Tanna2019-06-181-2/+10
|/ | | | | Disabled password authentication for the users registered using omniauth-ultraauth strategy
* Merge branch ↵Thong Kuah2019-06-181-2/+11
|\ | | | | | | | | | | | | | | | | '60617-allow-switching-from-gitlab-managed-to-unmanaged-clusters' into 'master' Allow switching clusters between managed/unmanaged Closes #60617 See merge request gitlab-org/gitlab-ce!29322
| * Allow switching clusters between managed/unmanagedTiger2019-06-181-2/+11
| | | | | | | | | | | | Any resources created while the cluster was managed will be untouched, allowing users to set/unset this flag as they please.
* | Make KubernetesService readonlyJames Fargher2019-06-183-57/+47
| | | | | | | | | | | | | | | | We are deprecating this service in favor of instance wide clusters. Therefore we removed some code that is not anymore needed for a readonly cluster and also we added some flags to allow for this deprecation. These flags are to be removed in the next release when we finally completelly remove KubernetesService.
* | Merge branch 'migrate_k8s_service_integration' into 'master'Thong Kuah2019-06-171-1/+1
|\ \ | |/ |/| | | | | Migrate Kubernetes service integration templates to clusters See merge request gitlab-org/gitlab-ce!28534
| * Allow a user defined namespace on non-gitlab managed clustersJames Fargher2019-05-301-1/+1
| | | | | | | | | | Since they are not GitLab managed we wont make assumptions about the namespaces used
* | Merge branch '63079-exclude-k8s-namespaces-with-no-service-account-token' ↵Thong Kuah2019-06-171-3/+22
|\ \ | | | | | | | | | | | | | | | | | | into 'master' Don't use Kubernetes namespaces with no token See merge request gitlab-org/gitlab-ce!29643
| * | Don't use Kubernetes namespaces with no token63079-exclude-k8s-namespaces-with-no-service-account-tokenTiger2019-06-171-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever we are selecting a namespace to use for a deployment or to query a cluster we want to exclude Kubernetes namespace records that don't have a token set as they will not have the required permissions. However when configuring clusters, we want to use the original namespace record even if it has no token, as a namespace has to be unique on a cluster.
* | | Merge branch '56737-commits-and-mr-events-on-jira-api' into 'master'Stan Hu2019-06-171-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Expose currently supported events properly on services API Closes #56737 See merge request gitlab-org/gitlab-ce!29736
| * | | 56737 Expose currently supported events properly on services APIZsolt Kovari2019-06-161-2/+2
| | | |
* | | | Merge branch '58886-issue-tracker-fields' into 'master'Sean McGivern2019-06-174-0/+66
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Create models for issue trackers data See merge request gitlab-org/gitlab-ce!28598
| * | | | Create models for issue trackers data58886-issue-tracker-fieldsJarka Košanová2019-06-134-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | - create tables for storing issue trackers properties - add model and basic logic & spec
* | | | | Merge branch '9490-record-repository_type-on-lfs_objects_projects-ce' into ↵Grzegorz Bizon2019-06-173-3/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' CE backport for gitlab-ee!13894 (Save repository_type to LfsObjectsProject) See merge request gitlab-org/gitlab-ce!29179
| * | | | | CE backport for changes in EE MR 138949490-record-repository_type-on-lfs_objects_projects-ceLuke Duncalfe2019-06-173-3/+9
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'sh-fix-issue-63158' into 'master'Rémy Coutable2019-06-171-1/+17
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Fix inability to set visibility_level on project via API Closes #63158 See merge request gitlab-org/gitlab-ce!29578
| * | | | Fix inability to set visibility_level on project via APIsh-fix-issue-63158Stan Hu2019-06-141-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the scenario: 1. The default visibility level is set to internal 2. A user attempts to create a private project within a private group Previously this would always fail because default_value_for would overwrite the private visibility setting, no matter what visibility_level were specified. This was happening because default_value_for was confused by the default value of 0 specified by the database schema. default_value_for attempts to assign the default value in the block by checking whether the attribute has changed. The problem is that since the default value by the database was 0, and the user requested 0, this appeared as though no changes were made. As a result, default_value_for would always overwrite the user's preference. To fix this, we remove the use of default_value_for and only set the visibility level to the default application setting when no preference has been given at creation time. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63158
* | | | | Merge branch 'bvl-comments-graphql' into 'master'Jan Provaznik2019-06-143-10/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose comments on Noteables in GraphQL Closes #62825 See merge request gitlab-org/gitlab-ce!29212
| * | | | | Expose comments on Noteables in GraphQLBob Van Landuyt2019-06-143-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This exposes `Note`s on Issues & MergeRequests using a `Types::Notes::NoteableType` in GraphQL. Exposing notes on a new type can be done by implementing the `NoteableType` interface on the type. The presented object should be a `Noteable`.
* | | | | | Renumber a new UserCallout enum for EE compatibility12173-renumber-user-callout-enumNick Thomas2019-06-141-1/+4
| | | | | |
* | | | | | Added diff suggestion popoverPhil Hughes2019-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56523
* | | | | | Merge branch 'feature/require-2fa-for-all-entities-in-group' into 'master'Thong Kuah2019-06-141-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | inherit require 2fa for all subgroups and projects See merge request gitlab-org/gitlab-ce!24965
| * | | | | refactor: do not apply setting "require 2FA" for ancestor group membersRoger Meier2019-06-131-1/+1
| | | | | |