summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceMarin Jankovski2019-07-0334-187/+265
|\
| * Show upcoming status for releasesJason Goodman2019-07-031-1/+9
| | | | | | | | | | | | Add released_at field to releases API Add released_at column to releases table Return releases to the API sorted by released_at
| * Add username to deploy tokensKrasimir Angelov2019-07-021-1/+13
| | | | | | | | | | | | | | | | | | This new attribute is optional and used when set instead of the default format `gitlab+deploy-token-#{id}`. Empty usernames will be saved as null in the database. Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/50228.
| * Merge branch '63690-issue-trackers-title' into 'master'Dmitriy Zaporozhets2019-07-028-66/+66
| |\ | | | | | | | | | | | | | | | | | | Use title and description fields for issue trackers Closes #63690 See merge request gitlab-org/gitlab-ce!30096
| | * Use title and description fields for issue trackers63690-issue-trackers-titleJarka Košanová2019-07-028-66/+66
| | | | | | | | | | | | | | | - instead of using properties - backward compatibility has to be kept for now
| * | Includes logic to persist namespace statisticsMayra Cabrera2019-07-024-2/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add two new ActiveRecord models: - RootNamespaceStoragestatistics will persist root namespace statistics - NamespaceAggregationSchedule will save information when a new update to the namespace statistics needs to be scheduled - Inject into UpdateProjectStatistics concern a new callback that will call an async job to insert a new row onto NamespaceAggregationSchedule table - When a new row is inserted a new job is scheduled. This job will update call an specific service to update the statistics and after that it will delete thee aggregated scheduled row - The RefresherServices makes heavy use of arel to build composable queries to update Namespace::RootStorageStatistics attributes. - Add an extra worker to traverse pending rows on NAmespace::AggregationSchedule table and schedule a worker for each one of this rows. - Add an extra worker to traverse pending rows on NAmespace::AggregationSchedule table and schedule a worker for each one of this rows
| * | Enables ingress for uninstallationJoão Cunha2019-07-023-15/+12
| | | | | | | | | | | | - JupyterHub must not be available (installed or updated)
| * | Merge branch 'sh-add-thread-memory-cache' into 'master'Rémy Coutable2019-07-023-5/+24
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Add a memory cache local to the thread to reduce Redis load Closes #63977 See merge request gitlab-org/gitlab-ce!30233
| | * | Use an uncached application setting for usage ping checksStan Hu2019-07-021-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of the in-memory cache for application settings had a side effect of making it harder to invalidate changes when the settings occur. We now bypass the cache because it's possible the admin enabled the usage ping, and we don't want to annoy the user again if they already set the value. To avoid causing significant load on the system, we add an extra check to ensure the user is an admin. and we don't want to annoy the user again if they already set the value. This is a bit of hack, but the alternative would be to put in a more complex cache invalidation step. Since this call only gets called in the uncommon situation where the user is an admin and the only user in the instance, this shouldn't cause too much load on the system.
| | * | Add a memory cache local to the thread to reduce Redis loadStan Hu2019-07-012-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loading `ApplicationSetting` from Redis was responsible for at least 50% of the CPU load of the Redis cluster on GitLab.com. Since these values generally don't change very much, we can load this from the database and cache it in memory, skipping Redis altogther. We use `ActiveSupport::Cache::MemoryStore` as a drop-in replacement for `RedisCacheStore` even though we probably don't need synchronized access within `Thread.current`. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63977
| * | | Memoizing root_ancestor in NamespaceAdam Hegyi2019-07-021-1/+3
| |/ / | | | | | | | | | | | | | | | The root_ancestor method is heavily used in EE for the group_saml feature. Having this memoization implemented in CE would eliminate the need of overriding the root_ancestor method in EE.
| * | Allow JupyterHub to be uninstalledJoão Cunha2019-07-011-6/+0
| |/ | | | | | | | | | | - enabled uninstallation - give it a specific uninstall message - ajust specs
| * Merge branch 'zj-circuit-breaker-removal-part-deux' into 'master'Bob Van Landuyt2019-07-011-5/+0
| |\ | | | | | | | | | | | | Remove ignored circuit_breaker columns See merge request gitlab-org/gitlab-ce!30159
| | * Remove ignored circuit_breaker columnsZeger-Jan van de Weg2019-06-281-5/+0
| | | | | | | | | | | | | | | | | | The circuit breaker itself got removed a while ago, when that happened some parts got left behind. Using grep old stale settings and validations were found and are now removed.
| * | Merge branch 'id-stale-branches' into 'master'Grzegorz Bizon2019-07-011-40/+0
| |\ \ | | | | | | | | | | | | | | | | Add endpoint for fetching diverging commit counts See merge request gitlab-org/gitlab-ce!29802
| | * | Add endpoint for fetching diverging commit countsid-stale-branchesIgor Drozdov2019-06-281-40/+0
| | | | | | | | | | | | | | | | Extract diverging_commit_counts into a service class
| * | | Merge branch 'bvl-remove-old-fork-check' into 'master'Dmitriy Zaporozhets2019-07-011-5/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Remove deprecated `#forked_from?` check See merge request gitlab-org/gitlab-ce!30132
| | * | | Remove deprecated `#forked_from?` checkBob Van Landuyt2019-06-281-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I forgot to clean up this bit in we switched the `forked_from_project` relation to use fork networks in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22226
| * | | | Merge branch 'add-clusters-to-deployment' into 'master'Lin Jen-Shin2019-07-012-1/+18
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | Add clusters association to deployment See merge request gitlab-org/gitlab-ce!29960
| | * | | Use #cluster for prometheus_adapteradd-clusters-to-deploymentThong Kuah2019-06-271-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | We still fallback to environment.deployment_platform until we can backfill
| | * | | Populate cluster_id when creating a deploymentThong Kuah2019-06-271-0/+1
| | | | |
| | * | | Add cluster_id to deployments table as an FKThong Kuah2019-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We nullify when cluster is deleted as we want to keep the deployment record around. Add cluster as an optional association We will have only cluster for deployments where the build deploys to a kubernetes cluster
| * | | | Merge branch 'small-s-in-elasticsearch-in-code' into 'master'Rémy Coutable2019-06-281-1/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in code comments about Elasticsearch See merge request gitlab-org/gitlab-ce!30163
| | * | | | Fix typo in code comments about ElasticsearchTakuya Noguchi2019-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
| * | | | | Replace 'JIRA' with 'Jira'Takuya Noguchi2019-06-281-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://community.atlassian.com/t5/Jira-questions/Is-it-quot-JIRA-quot-or-quot-Jira-quot/qaq-p/681163 Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
| * | | | | Merge branch 'graphql-tree-last-commit' into 'master'Lin Jen-Shin2019-06-281-0/+5
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added commit type to tree GraphQL type See merge request gitlab-org/gitlab-ce!29412
| | * | | | | Added commit type to tree GraphQL typePhil Hughes2019-06-281-0/+5
| | | | | | |
| * | | | | | Do not change updated_at on an issue when reordering on an issue boardEugenia Grieff2019-06-281-2/+2
| | | | | | |
| * | | | | | Merge branch '63212-n-1-queries-in-projects-id-boards-api' into 'master'Thong Kuah2019-06-282-1/+5
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | Remove N+1 queries in boards API See merge request gitlab-org/gitlab-ce!29634
| | * | | | | Move order lambda to list scope63212-n-1-queries-in-projects-id-boards-apicharlieablett2019-06-272-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - apply ordering to both list scopes in `Board`
| | * | | | | Compound lists scopes to preserve orderingcharlieablett2019-06-261-1/+1
| | | | | | |
| | * | | | | Remove N+1 query for project and group boardscharlieablett2019-06-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add test for N+1 queries - Add destroyable lists scope to Board and List - Preload lists for both project and group boards
| * | | | | | Merge branch '62826-graphql-emoji-mutations' into 'master'Jan Provaznik2019-06-281-0/+4
| |\ \ \ \ \ \ | | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | GraphQL mutations for add, remove and toggle emoji See merge request gitlab-org/gitlab-ce!29919
| | * | | | | GraphQL mutations for add, remove and toggle emoji62826-graphql-emoji-mutationsLuke Duncalfe2019-06-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding new `AddAwardEmoji`, `RemoveAwardEmoji` and `ToggleAwardEmoji` GraphQL mutations. Adding new `#authorized_find_with_pre_checks!` and (unused, but for completeness `#authorized_find_with_post_checks!`) authorization methods. These allow us to perform an authorized find, and run our own additional checks before or after the authorization runs. https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
| * | | | | | Merge branch 'remove_group_and_instance_clusters_feature_flag' into 'master'Stan Hu2019-06-274-23/+2
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove group and instance clusters feature flag Closes #63383 See merge request gitlab-org/gitlab-ce!30124
| | * | | | | Remove instance_clusters feature_flagremove_group_and_instance_clusters_feature_flagThong Kuah2019-06-282-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have terminals for instance and group clusters we can remove the FF now. Deploying to instance clusters has been working without complaints too.
| | * | | | | Remove group_clusters feature flagThong Kuah2019-06-283-12/+1
| | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have terminals for instance and group clusters we can remove the FF now. Deploying to group clusters has been working without complaints too.
| * | | | | Merge branch 'sh-handle-nil-replication-lag' into 'master'Andreas Brandl2019-06-271-1/+1
| |\ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix background migrations failing with unused replication slot Closes #63666 See merge request gitlab-org/gitlab-ce!30042
| | * | | | Fix background migrations failing with unused replication slotsh-handle-nil-replication-lagStan Hu2019-06-251-1/+1
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is an unused replication slot, the replication lag function will return a nil value, resulting in "NoMethodError: undefined method `>=' for nil:NilClass" error. We now just ignore these nil values. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63666
* | | | | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqMarin Jankovski2019-07-033-7/+38
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Merge branch 'security-59581-related-merge-requests-count' into 'master'Marin Jankovski2019-07-023-7/+38
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | Expose merge requests count based on user access See merge request gitlab/gitlabhq!3157
| | * | | Expose merge requests count based on user accessAlexandru Croitor2019-06-183-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Count issues related merge requests based on user access level. And issue can have related MRs from projects where user does not have access so the number of related merge requests should be adjusted based on user's ability to access the related MRs. https://gitlab.com/gitlab-org/gitlab-ce/issues/59581
* | | | | Merge branch '53811-issue-boards-to-core-projects-backend-ce' into 'master'Stan Hu2019-06-271-2/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Move Multiple Issue Boards for Projects to Core See merge request gitlab-org/gitlab-ce!29757
| * | | | | Move Multiple Issue Boards for Projects to Core53811-issue-boards-to-core-projects-backend-ceAlexandru Croitor2019-06-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor code to allow multiple issue boards management for projects in CE
* | | | | | Merge branch '61156-instance-level-cluster-pod-terminal-access' into 'master'Thong Kuah2019-06-272-36/+32
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instance-level cluster pod terminal access Closes #55489, #55488, #55487, and #61156 See merge request gitlab-org/gitlab-ce!28613
| * | | | | Move terminal construction logic to Environment61156-instance-level-cluster-pod-terminal-accessTiger2019-06-252-36/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables terminals for group and project level clusters. Previously there was no way to determine which project (and therefore kubernetes namespace) to connect to, moving this logic onto Environment means the assoicated project can be used to look up the correct namespace.
* | | | | | Merge branch 'refactor/remove-sentry-from-app-settings' into 'master'Stan Hu2019-06-262-30/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Sentry settings from application settings See merge request gitlab-org/gitlab-ce!28447
| * | | | | | refactor: remove Sentry from application settingsRoger Meier2019-06-252-30/+4
| | |_|_|_|/ | |/| | | |
* | | | | | Merge branch '62214-migrations-and-models' into 'master'Andreas Brandl2019-06-263-0/+19
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | Step 1 of !28996: Adds models and migrations for Namespaces statistics See merge request gitlab-org/gitlab-ce!29570
| * | | | | Add two new ActiveRecord models62214-migrations-and-modelsMayra Cabrera2019-06-253-0/+19
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Namespace::Storagestatistics will persist root namespace statistics - Namespace::AggregationSchedule will save information when a new update to the namespace statistics needs to be scheduled Both tables use 'namespace_id' as primary key