summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Save board lists collapsed settingFelipe Artur2019-08-282-2/+62
| | | | Persists if a board list is collapsed for each user.
* Merge branch 'update-gitlab-runner-helm-chart-to-0-8-0' into 'master'Kamil Trzciński2019-08-281-1/+1
|\ | | | | | | | | Update GitLab Runner Helm Chart to 0.8.0/12.2.0 See merge request gitlab-org/gitlab-ce!32289
| * Update GitLab Runner Helm Chart to 0.8.0update-gitlab-runner-helm-chart-to-0-8-0Tomasz Maczukin2019-08-271-1/+1
| |
* | Update CE files for GSD projects filterVictor Zagorodny2019-08-282-0/+3
| | | | | | | | | | | | | | | | | | A new param with_security_reports was added to GET /groups/:id/projects API and the code to support this logic in GroupProjectsFinder and Project model. Also, a DB index was added to ci_job_artifacts table to speed up the search of security reports artifacts for projects
* | Merge branch 'sh-lfs-object-batches' into 'master'Rémy Coutable2019-08-281-0/+1
|\ \ | | | | | | | | | | | | | | | | | | Makes LFS object link process OIDs in batches Closes #66274 See merge request gitlab-org/gitlab-ce!32268
| * | Makes LFS object linker process OIDs in batchessh-lfs-object-batchesStan Hu2019-08-271-0/+1
| |/ | | | | | | | | | | | | | | | | | | During a project import, `LfsLinkService` attempts to link `LfsObjects` that have not already been associated with a project. It's possible for a large repo to have thousands of OIDs, which can cause long database query and parsing times. By processing a batch of 1000 at a time, we can reduce that time at the expense of a few more SQL queries. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66274
* | Merge branch 'id-change-total-notes-calculation' into 'master'Ash McKenzie2019-08-281-0/+4
|\ \ | | | | | | | | | | | | Change the way totalNotes is calculated See merge request gitlab-org/gitlab-ce!32191
| * | Change the way totalNotes is calculatedid-change-total-notes-calculationIgor Drozdov2019-08-281-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | totalNotes is only used to prerender a number of skeleton containers until real notes are loaded issuable.discussions makes multiple requests, so too expensive for this This commit uses mere notes for this and sends actual totalNotes number if it's less than 10; otherwise it sends 10 - it allows us to avoid bunch of skeleton prerenderings, which are not necessary since they doesn't fit into the whole screen and disappear quite fast
* | Merge branch 'sh-fix-issue-move-api' into 'master'Grzegorz Bizon2019-08-281-1/+6
|\ \ | | | | | | | | | | | | | | | | | | Fix moving issues API failing when text includes commit URLs Closes #66666 See merge request gitlab-org/gitlab-ce!32317
| * | Fix moving issues API failing when text includes commit URLssh-fix-issue-move-apiStan Hu2019-08-281-1/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a issue is moved from one project to another, all associated Markdown text is rewritten in the context of the new project. If the note contained a link to a commit URL, `CommitRewriter#rewrite` would fail because `Commit#link_reference_pattern` would match `nil` `commit` values in the HTML generated from the Markdown. These `nil` values were passed along to `Project#commits_by` because `Commit#reference_valid?` was always returning `true`. To prevent this issue from happening, we tighten up the check for `Commit#reference_valid?` to look for valid SHA values. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66666
* | Merge branch 'todos/include-issue-mr-titles' into 'master'Stan Hu2019-08-281-2/+2
|\ \ | |/ |/| | | | | | | | | Add Issue and Merge Request titles to Todo items Closes #63488 See merge request gitlab-org/gitlab-ce!30435
| * Add Issue and Merge Request titles to Todo itemsArun Kumar Mohan2019-08-271-2/+2
| | | | | | | | | | | | Only displays the todo body if the todo has a note. This is to avoid redundant Issue or Merge Request titles displayed both in the Todo title and body.
* | Add encrypted optional option to DeployToken authentication fieldEtienne Baqué2019-08-261-1/+1
| |
* | Using before_save method instead of setterAishwarya Subramanian2019-08-261-1/+11
| | | | | | | | Removed unused method for name setter method
* | Remove the object pools feature flagZeger-Jan van de Weg2019-08-261-2/+1
| | | | | | | | | | | | The flag defaulted to true, so there's no change unless users turned it off. Given there's a lack of issues regarding object pools, this should be OK.
* | Merge branch '66037-deployment-user' into 'master'Tim Zallmann2019-08-231-0/+8
|\ \ | | | | | | | | | | | | Return correct user for manual deployments See merge request gitlab-org/gitlab-ce!32004
| * | Extract logic who created deployment into Deployment#deployed_by66037-deployment-userKrasimir Angelov2019-08-221-0/+8
| | | | | | | | | | | | | | | | | | Prefer the deployable user over the deployment user. Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/66037.
* | | Implement validation logic to ProjectStageAdam Hegyi2019-08-232-0/+73
| | | | | | | | | | | | | | | | | | - Introducting StageEvents to define the available events - Define the event pairing rules, since some events are not compatible - Express default Cycle Analytics stages with the event structure
* | | Merge branch '57402-upate-issues-list-sort-options-ce' into 'master'Jan Provaznik2019-08-233-16/+18
|\ \ \ | | | | | | | | | | | | | | | | CE: Update sort options for issues list See merge request gitlab-org/gitlab-ce!31849
| * | | Update sort options for issues list57402-upate-issues-list-sort-options-ceAlexandru Croitor2019-08-233-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increase sort options for issues list from updated_at and create_at, to include more options close to what is required in actual issue list UI. This helps us to use REST API for issues list with sorting capabilities https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
* | | | Merge branch 'optimise-build-queue-service' into 'master'Grzegorz Bizon2019-08-231-8/+20
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Optimise UpdateBuildQueueService Closes #66438 See merge request gitlab-org/gitlab-ce!32095
| * | | Optimise build queue serviceoptimise-build-queue-serviceKamil Trzciński2019-08-221-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes BuildQueueService to force refresh runners that are considered to have recent queue. Such runners are the ones that connected within online interval + time to expire runner cache.
* | | | Expose namespace storage statistics with GraphQLAlessio Caiazza2019-08-221-0/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Root namespaces have storage statistics. This commit allows namespace owners to get those stats via GraphQL queries like the following one { namespace(fullPath: "a_namespace_path") { rootStorageStatistics { storageSize repositorySize lfsObjectsSize buildArtifactsSize packagesSize wikiSize } } }
* | | Merge branch 'avoid-race-condition-of-archive-trace-cron-worker' into 'master'Kamil Trzciński2019-08-221-0/+2
|\ \ \ | | | | | | | | | | | | | | | | Avoid conflicts between ArchiveTracesCronWorker and ArchiveTraceWorker See merge request gitlab-org/gitlab-ce!31376
| * | | Avoid conflicts between ArchiveTraceWorkersavoid-race-condition-of-archive-trace-cron-workerShinya Maeda2019-08-221-0/+2
| | |/ | |/| | | | | | | | | | | | | This commits avoiding conflicts between ArchiveTraceWorker and ArchiveTracesCronWorker by changing the target of the latter worker.
* | | Add SortingPreference concernGeorge Koltsov2019-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | Sorting preference functionality has been extracted from `IssuableCollections` to a new `SortingPreference` concern in order to reuse this functionality in projects (and groups in the future).
* | | Merge branch '63372-award-emoji-services' into 'master'Grzegorz Bizon2019-08-212-27/+5
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Add service classes for mutating AwardEmoji Closes #63372 See merge request gitlab-org/gitlab-ce!29782
| * | Add service classes for mutating AwardEmojiLuke Duncalfe2019-08-212-27/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding, destroying and toggling emoji previously lacked services and instead were performed through methods called on Awardable models. This led to inconsistencies where relevant todos would be marked as done only when emoji were awarded through our controllers, but not through the API. Todos could also be marked as done when an emoji was being removed. Behaviour changes - Awarding emoji through the API will now mark a relevant Todo as done - Toggling an emoji off (destroying it) through our controllers will no longer mark a relevant Todo as done Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
* | New wiki page redirects user to random slug46299-wiki-page-creationLuke Duncalfe2019-08-211-0/+4
|/ | | | | | | | | | Previously we asked a user to enter a new slug before taking them to the Create Page page. As a UX improvement, we now take them to a randomly generated URI so they can begin creating their new page. https://gitlab.com/gitlab-org/gitlab-ce/issues/46299
* Merge branch 'da-fix-n-plus-1-query-on-starrers-list' into 'master'Stan Hu2019-08-191-0/+1
|\ | | | | | | | | Fix N+1s queries while loading users on the project starrers list See merge request gitlab-org/gitlab-ce!31984
| * Fix N+1s queries while loading usersDouglas Barbosa Alexandre2019-08-191-0/+1
| |
* | Merge branch '64251-branch-name-set-cache' into 'master'Robert Speicher2019-08-191-4/+8
|\ \ | |/ |/| | | | | Cache branch and tag names as Redis sets See merge request gitlab-org/gitlab-ce!30476
| * Cache branch and tag names as Redis setsNick Thomas2019-08-161-4/+8
| | | | | | | | | | | | This allows us to check inclusion for the *_exists? methods without downloading the full list of branch names, which is over 100KiB in size for gitlab-ce at the moment.
* | Merge branch '39-count-unique-users-for-more-accurate-smau-reporting' into ↵Nick Thomas2019-08-191-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 'master' Allow UsageData.count to use count_by: See merge request gitlab-org/gitlab-ce!30770
| * | New GroupMember.of_ldap_type scope39-count-unique-users-for-more-accurate-smau-reportingAsh McKenzie2019-07-181-1/+1
| | |
* | | Expire project caches once per push instead of once per refStan Hu2019-08-161-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `ProjectCacheWorker` would be scheduled once per ref, which would generate unnecessary I/O and load on Sidekiq, especially if many tags or branches were pushed at once. `ProjectCacheWorker` would expire three items: 1. Repository size: This only needs to be updated once per push. 2. Commit count: This only needs to be updated if the default branch is updated. 3. Project method caches: This only needs to be updated if the default branch changes, but only if certain files change (e.g. README, CHANGELOG, etc.). Because the third item requires looking at the actual changes in the commit deltas, we schedule one `ProjectCacheWorker` to handle the first two cases, and schedule a separate `ProjectCacheWorker` for the third case if it is needed. As a result, this brings down the number of `ProjectCacheWorker` jobs from N to 2. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52046
* | | Merge branch 'sh-fix-arel-deprecation-join' into 'master'Mayra Cabrera2019-08-161-2/+2
|\ \ \ | | | | | | | | | | | | | | | | Fix Arel deprecation warning in clusters_hierarchy See merge request gitlab-org/gitlab-ce!31916
| * | | Fix Arel deprecation warning in clusters_hierarchysh-fix-arel-deprecation-joinStan Hu2019-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in https://github.com/rails/rails/pull/29619, this removes this warning message: ``` Delegating join_sources to arel is deprecated and will be removed in Rails 6.0. (called from project_clusters_base_query at app/models/clusters/clusters_hierarchy.rb:62) ``` Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/61451
* | | | Merge branch 'mc/feature/pipeline-tracking-config-ce' into 'master'Kamil Trzciński2019-08-161-0/+4
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Add `needs:` CI config option CE Closes gitlab-ee#12334 See merge request gitlab-org/gitlab-ce!31346
| * | | Port changes from EEmc/feature/pipeline-tracking-config-ceMatija Čupić2019-08-041-0/+4
| | | | | | | | | | | | | | | | | | | | Ports changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/12343
* | | | Merge branch ↵Grzegorz Bizon2019-08-161-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '47003-user-onboarding-replace-current-email-confirmation-flow-with-a-soft-email-confirmation-flow' into 'master' Soft email confirmation flow Closes #47003 See merge request gitlab-org/gitlab-ce!31245
| * | | | Set Devise's allow_unconfirmed_access_forAlex Buijs2019-08-081-0/+7
| | | | | | | | | | | | | | | | | | | | to 30 days
* | | | | Merge branch 'enable-dag-support-by-default' into 'master'Kamil Trzciński2019-08-161-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | Enable DAG support by default Closes #65457 See merge request gitlab-org/gitlab-ce!31814
| * | | | Enable DAG support by defaultenable-dag-support-by-defaultKamil Trzciński2019-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This toggles the ci_dag_support flag to be on by default. This relies on ci_dag_limit_needs to be present to reduce amount of inter-dependencies between jobs
* | | | | Migrations for Cycle Analytics backendAdam Hegyi2019-08-153-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change lays the foundation for customizable cycle analytics stages. The main reason for the change is to extract the event definitions to separate objects (start_event, end_event) so that it could be easily customized later on.
* | | | | Only read rebase status from the modelNick Thomas2019-08-151-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to 12.1, rebase status was looked up directly from Gitaly. In https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14417 , a DB column was added to track the status instead. However, we couldn't stop looking at the gitaly status immediately, since some rebases may been running across the upgrade. Now that we're in 12.3, it is safe to remove the direct-to-gitaly lookup. This also happens to fix a 500 error that is seen when viewing an MR for a fork where the source project has been removed. We still look at the Gitaly status in the service, just in case Gitaly and Sidekiq get out of sync - I assume this is possible, and it's a relatively cheap check. Since we atomically check and set `merge_requests.rebase_jid`, we should never enqueue two `RebaseWorker` jobs in parallel.
* | | | | Allow disabling group/project email notificationsBrett Walker2019-08-154-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds UI to configure in group and project settings - Removes notification configuration for users when disabled at group or project level
* | | | | Make use of Gitlab::KubernetesJoão Cunha2019-08-143-10/+14
| | | | | | | | | | | | | | | | | | | | - refactor Knative and Prometheus
* | | | | Migrates Snowplow backend from EE to CEJeremy Jackson2019-08-142-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | This introduces several changes, but these are all just ported from the EE project.
* | | | | Merge remote-tracking branch ↵John T Skarbek2019-08-141-0/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'dev/security-2873-restrict-slash-commands-to-users-who-can-log-in'