summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Fix 500 errors with legacy appearance logosStan Hu2019-01-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | Prior to GitLab 9.0, attachments were not tracked the `uploads` table, so it was possible that the appearance logos were just stored in the database as a string and mounted via CarrierWave. https://gitlab.com/gitlab-org/gitlab-ce/issues/29240 implemented in GitLab 10.3 was supposed to cover populating the `uploads` table for all attachments, including all the logos from appearances. However, it's possible that didn't work for logos or the `uploads` entry was orphaned. GitLab instances that had a customized logo with no associated `uploads` entry would see Error 500s. The only way to fix this is to delete the `logo` column from the `appearances` table and re-upload the attachment. This change makes things more robust by falling back to the original behavior if the upload is not available. This is a CE backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9277. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/9357
* Add domain field into Clusters::ClusterMayra Cabrera2019-01-221-1/+2
| | | | | | | This is the 1st step for moving Auto DevOps domain into cluster settings, whether is project or group. Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/52363
* Merge branch '56636-hashed-storage-afterrenameservice' into 'master'Douglas Barbosa Alexandre2019-01-222-6/+7
|\ | | | | | | | | | | | | Hashed Storage: `AfterRenameService` was not renaming Pages or Uploads folder on legacy storage Closes #56636 See merge request gitlab-org/gitlab-ce!24526
| * Refactored AfterRenameService to reduce couplingGabriel Mazetto2019-01-222-6/+7
| | | | | | | | | | | | | | | | | | | | | | We still rely on the Dirty API for project rename (before/after) values, but we don't access the dirty api from the service class anymore. The previous value is now part of the initialization, which makes it easier to test and the behavior is clearer. The same was done with the `rename_repo` on the Storage classes, we now provide before and after values as part of the method signature.
* | Update GitLab Runner Helm Chart to 0.1.45Tomasz Maczukin2019-01-221-1/+1
| |
* | Merge branch '53714-inconsistent-text-color-for-labels' into 'master'Rémy Coutable2019-01-221-0/+1
|\ \ | | | | | | | | | | | | | | | | | | Resolve "Inconsistent text color for labels" Closes #53714 See merge request gitlab-org/gitlab-ce!23873
| * | Fix inconsistent label foreground color53714-inconsistent-text-color-for-labelsNathan Friend2019-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | In different parts of the application, the same label was being rendered with a different foreground color. This was due to the "textColor" JSON property not being generated by the backend. This commit adds this property to JSON representation of labels.
* | | Merge branch '56371-don-t-check-confidential-issues-for-spam' into 'master'Douglas Barbosa Alexandre2019-01-211-1/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Resolve "Don't check confidential issues for spam" Closes #56371 See merge request gitlab-org/gitlab-ce!24453
| * | Don't check confidential issues for spamSean McGivern2019-01-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Spam checks are meant for content that could be indexed by search engines. Confidential issues aren't indexed by search engines, so we don't need to do spam checks for them. We do need to check for spam when an issue changes from confidential to public, even if nothing else changed.
* | | Merge branch 'api-nested-group-permission' into 'master'Nick Thomas2019-01-181-0/+4
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Return the maximum group access level in the projects API Closes #43684 See merge request gitlab-org/gitlab-ce!24403
| * | Return max group access level in the projects APIAlejandro Rodríguez2019-01-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if a project is inside a nested group and a user doesn't have specific permissions for that group but does have permissions on a parent group the `GET /projects/:id` API call will return the following permissions: ```json permissions: { project_access: null, group_access: null } ``` It could also happen that the group specific permissions are of lower level than the ones the user has in parent groups. This patch makes it so that the permission returned for `group_access` is the highest from amongst the hierarchy, which is (ostensibly) the information that the API user is interested in for that field.
* | | Fix runner eternal loop when update job resultShinya Maeda2019-01-181-1/+8
| | | | | | | | | | | | | | | | | | Add spec Add changelog
* | | Merge branch '55544-port-upgrade-command' into 'master'Kamil Trzciński2019-01-182-6/+25
|\ \ \ | | | | | | | | | | | | | | | | Port generic Helm upgrade functionality to CE See merge request gitlab-org/gitlab-ce!23924
| * | | Refactor some methods in Prometheus modelThong Kuah2019-01-182-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - #update_errored? method def is redundant, already defined from state machine - #update_in_progress? moved to ApplicationStatus - #ready_status becomes a constant. Previously it was extended in ee/ so maybe that was why it's a instance method
| * | | Port generic upgrade functionality to CE55544-port-upgrade-commandThong Kuah2019-01-151-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port from EE generic upgrade related functionality used to upgrade Helm applications Remove memoization which could be incorrect It looks like we are memoizing without regard to the method's argument so this could result in an incorrect upgrade_command Remove `const_get` indirection now we are no longer in EE
* | | | Merge branch '26375-markdown-footnotes-not-working' into 'master'Lin Jen-Shin2019-01-171-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Markdown footnotes not working Closes #26375 See merge request gitlab-org/gitlab-ce!24168
| * | | | Bumping the CACHE_COMMONMARK_VERSION26375-markdown-footnotes-not-workingBrett Walker2019-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Since the rendering of footnotes is changed, the cached html need to be updated
* | | | | Merge branch '47988-improve-milestone-queries-with-subq' into 'master'Andreas Brandl2019-01-171-4/+3
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Improve MilestonesFinder to accept project and group relations Closes #47988 See merge request gitlab-org/gitlab-ce!24325
| * | | | Fix MilestonesFinder to pass relations to scopeHeinrich Lee Yu2019-01-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of querying relations into ids we just pass them to the model scope because the scope supports it now. Also changes other calls to `Milestone.for_projects_and_groups`
* | | | | Merge branch 'refactor-checking-personal-project-limits' into 'master'Nick Thomas2019-01-161-10/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Refactor checking personal project limits See merge request gitlab-org/gitlab-ce!24396
| * | | | | Refactor checking personal project limitsYorick Peterse2019-01-161-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors the code used for checking if a user has exceeded the personal projects limit. As part of this refactor the method has been renamed from Project#check_limit to "check_personal_projects_limit", as this name makes it much more clear what the purpose of the method is. Standalone unit tests have also been added, as before we only had a single generic validation test that did not cover all cases. The old implementation of the refactored method also included a `rescue` statement. This code would only run when a project creator was not set. The error that would be added wasn't super useful, especially since there would already be errors for the creator not being present. As none of the other code in the "check_personal_projects_limit" raises, it has been removed.
* | | | | | Merge branch 'refactor-after-create-default-branch' into 'master'Nick Thomas2019-01-161-18/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor Project#after_create_default_branch See merge request gitlab-org/gitlab-ce!24329
| * | | | | | Refactor code for protecting default branchesYorick Peterse2019-01-161-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors some of the logic used for protecting default branches, in particular Project#after_create_default_branch. The logic for this method is moved into a separate service class. Ideally we'd get rid of Project#after_create_default_branch entirely, but unfortunately Project#after_import depends on it. This means it has to stick around until we also refactor Project#after_import. For branch protection levels we introduce Gitlab::Access::BranchProtection, which provides a small wrapper around Integer based branch protection levels. Using this class removes the need for having to constantly refer to Gitlab::Access::PROTECTION_* constants.
* | | | | | | Merge branch 'ac-pages-subgroups' into 'master'Nick Thomas2019-01-161-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Gitlab-Pages for subgroups See merge request gitlab-org/gitlab-ce!23505
| * | | | | | | Enable Gitlab-Pages for subgroupsAlessio Caiazza2019-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitLab Pages supports projects hosted under a subgroup, but not subgroup websites. That means that only the highest-level group supports i.e.: You created a group for your engineering department called `engineering`, a subgroup for all your documentation websites called `docs`,and a project within this subgroup is called `workflows`. Your project URL is `https://gitlab.com/engineering/docs/workflows/`. Once you enable GitLab Pages for this project, the site will live under `https://engineering.gitlab.io/docs/workflows`.
* | | | | | | | chore(rubocop): fix Style/TrivialAccessors issuesSemyon Pupkov2019-01-161-5/+3
| | | | | | | |
* | | | | | | | Merge branch 'sh-suppress-duplicate-remote-mirror-notifications' into 'master'Douwe Maan2019-01-151-2/+10
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only send one notification for failed remote mirror Closes #56222 See merge request gitlab-org/gitlab-ce!24381
| * | | | | | | Only send one notification for failed remote mirrorStan Hu2019-01-151-2/+10
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retries in Sidekiq and in the remote mirror scheduler can cause repeated attempts in quick succession if the sync fails. Each failure will then send an e-mail to all project maintainers, which can spam users unnecessarily. Modify the logic to send one notification the first time the mirror fails by setting `error_notification_sent` to `true` and reset the flag after a successful sync. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56222
* | | | | | | Add clear_credentials method to ProjectImportDataStan Hu2019-01-141-0/+4
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | This backports changes made in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9134.
* | | | | | Merge branch 'zj-ensure-link-pool-repo-gc' into 'master'Lin Jen-Shin2019-01-141-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure pool participants are linked before GC Closes gitaly#1354 See merge request gitlab-org/gitlab-ce!24230
| * | | | | | Ensure pool participants are linked before GCZeger-Jan van de Weg2019-01-141-0/+4
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In theory the case could happen that the initial linking of the pool fails and so do all the retries that Sidekiq performs. This could lead to data loss. To prevent that case, linking is done before Gits GC too. This makes sure that case doesn't happen.
* | | | | | Merge branch 'osw-fix-quick-suggestion-application-being-reverted' into 'master'Douwe Maan2019-01-142-11/+23
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust applied suggestion reverting previous changes Closes #56017 See merge request gitlab-org/gitlab-ce!24250
| * | | | | Adjust applied suggestion reverting previous changesOswaldo Ferreira2019-01-112-11/+23
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Avoid suggestions being applied on the same file from reverting previous changes 2. Gracefully use and handle file changes error when updating the file (though, it does not totally solves the sync problem for multiple suggestion applications at once)
* | | | | Merge branch 'bump-ingress-chart-112' into 'master'Dmitriy Zaporozhets2019-01-141-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | Bump nginx-ingress chart to 1.1.2 See merge request gitlab-org/gitlab-ce!24203
| * | | | Bump nginx-ingress chart to 1.1.2Thong Kuah2019-01-101-1/+1
| | |_|/ | |/| |
* | | | Fix deprecation: Passing an argument to force an association to reload is ↵Jasper Maes2019-01-111-2/+2
| |_|/ |/| | | | | | | | now deprecated
* | | Merge branch 'remove-get-builds-method' into 'master'Grzegorz Bizon2019-01-111-4/+0
|\ \ \ | | | | | | | | | | | | | | | | Remove get_build method for find_by_id See merge request gitlab-org/gitlab-ce!24271
| * | | Remove get_build method for find_by_idSteve Azzopardi2019-01-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | The original intention of `get_build` was as a workaround not to violate `CodeReuse/ActiveRecord`. `find_by_id` does the exact same thing but does not violate the rubocop rule.
* | | | Merge branch 'fix-udpate-head-pipeline-method' into 'master'Grzegorz Bizon2019-01-111-3/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix unexpected exception by failure of finding an actual head pipeline Closes #56113 See merge request gitlab-org/gitlab-ce!24257
| * | | | Fix unexpected exception by failed to find an actual head pipelineShinya Maeda2019-01-101-3/+4
| | |/ / | |/| | | | | | | | | | Add changelog
* | | | Merge branch 'zj-nillify-pool-repo-when-leaving' into 'master'Douwe Maan2019-01-112-2/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Nullify pool_repository when a project leaves See merge request gitlab-org/gitlab-ce!24225
| * | | | Nullify pool_repository when a project leavesZeger-Jan van de Weg2019-01-112-2/+6
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Previously the nullification wasn't done, as the only caller would later destroy the model all together. In https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9070 this change was made. This commit is basically a backport before that MR is merged.
* | | | Fix default visibility_level for new projectsFabian Schneider2019-01-111-1/+1
| | | |
* | | | Merge branch '53431-fix-upcoming-milestone-filter-for-groups' into 'master'Sean McGivern2019-01-111-13/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add group milestones in upcoming filter Closes #53431 See merge request gitlab-org/gitlab-ce!23098
| * | | | Refactor Milestone.for_projects_and_groupsHeinrich Lee Yu2018-12-311-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Refactored to use Rails 5 ActiveRecord `or` so that it can handle ids, objects, array of objects, or relations properly.
| * | | | Add group milestones in upcoming filterHeinrich Lee Yu2018-12-311-8/+20
| | | | |
* | | | | Merge branch 'knative-show-page' into 'master'Mike Greiling2019-01-111-2/+18
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Initial Serverless Functions detailed view See merge request gitlab-org/gitlab-ce!23863
| * | | | | Initial Serverless Functions detailed viewChris Baumbauer2019-01-101-2/+18
| | |/ / / | |/| | |
* | | | | Use revision instead of build number for TC query.Willi Nesensohn2019-01-101-4/+2
| | | | |
* | | | | Merge branch ↵Kamil Trzciński2019-01-101-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'add-uniqueness-validation-to-url-column-in-releases-link-model' into 'master' Add uniqueness validation to url column in Releases::Link model Closes #55929 See merge request gitlab-org/gitlab-ce!24223