summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge branch 'pipelines-index-performance' into 'master'Grzegorz Bizon2018-05-172-2/+39
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve performance of Projects::PipelinesController#index See merge request gitlab-org/gitlab-ce!18427
| * | | | | | | Preload pipeline data for project pipelinesYorick Peterse2018-05-172-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When displaying the pipelines of a project we now preload the following data: 1. Authors of the commits that belong to these pipelines 2. The number of warnings per pipeline, which is used by Ci::Pipeline#has_warnings? == Commit Authors Previously this data was queried for every Commit separately, leading to 20 SQL queries being executed in the worst case. With an average of 3 to 5 milliseconds per SQL query this could result in 100 milliseconds being spent in _just_ getting Commit authors. To preload this data Commit#author now uses BatchLoader (through Commit#lazy_author), and a separate module Gitlab::Ci::Pipeline::Preloader is used to ensure all authors are loaded before they are used. == Number of warnings This changes Ci::Pipeline#has_warnings? so it supports preloading of the number of warnings per pipeline. This removes the need for executing a COUNT(*) query for every pipeline just to see if it has any warnings or not.
* | | | | | | | Merge branch '46177-fix-present-on-generic-commit-status' into 'master'Grzegorz Bizon2018-05-171-0/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "NoMethodError: undefined method `present' for #<GenericCommitStatus:0x00007f6eacf34a40>" Closes #46177 See merge request gitlab-org/gitlab-ce!18979
| * | | | | | | Makes CommitStatus and GenericCommitStatus respond to presentableMayra Cabrera2018-05-151-0/+1
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods Includes Presentable module into CommitStatus. This fixes presenter methods being called on those classes. Closes #46177
* | | | | | | Resolve "Opening Project with invite but without accepting leads to 404 ↵🙈 jacopo beschi 🙉2018-05-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | error page"
* | | | | | | Merge branch 'jprovazn-remote-upload-destroy' into 'master'Kamil Trzciński2018-05-165-7/+43
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete remote uploads Closes #45425 See merge request gitlab-org/gitlab-ce!18698
| * | | | | | | Fixed typoJan Provaznik2018-05-161-1/+1
| | | | | | | |
| * | | | | | | Changed order of includeJan Provaznik2018-05-164-4/+4
| | | | | | | |
| * | | | | | | Use find_in_batches instead of destroy_allJan Provaznik2018-05-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | destroy_all loads all records at once
| * | | | | | | Delete remote uploadsJan Provaznik2018-05-165-7/+41
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObjectStore uploader requires presence of associated `uploads` record when deleting the upload file (through the carrierwave's after_commit hook) because we keep info whether file is LOCAL or REMOTE in `upload` object. For this reason we can not destroy uploads as "dependent: :destroy" hook because these would be deleted too soon. Instead we rely on carrierwave's hook to destroy `uploads` in after_commit hook. But in before_destroy hook we still have to delete not-mounted uploads (which don't use carrierwave's destroy hook). This has to be done in before_Destroy instead of after_commit because `FileUpload` requires existence of model's object on destroy action. This is not ideal state of things, in a next step we should investigate how to unify model dependencies so we can use same workflow for all uploads. Related to #45425
* | | | | | | Merge branch '46010-allow-managing-group-runners-via-api' into 'master'Kamil Trzciński2018-05-162-5/+17
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API support + Improved policies for group runners Closes #45894 and #38979 See merge request gitlab-org/gitlab-ce!18851
| * | | | | | Rename User#ci_authorized_runners -> ci_owned_runnersDylan Griffith2018-05-161-2/+2
| | | | | | |
| * | | | | | Allow group runners to be viewed/edited in APIDylan Griffith2018-05-162-3/+15
| |/ / / / /
* | | | | | Merge branch 'osw-fix-boards-list-header-color' into 'master'Robert Speicher2018-05-161-1/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust board lists header text color Closes #36983 See merge request gitlab-org/gitlab-ce!18955
| * | | | | Adjust board lists header text colorosw-fix-boards-list-header-colorOswaldo Ferreira2018-05-141-1/+2
| | |/ / / | |/| | | | | | | | | | | | | Adjusts regression fixed by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18786/. We were not returning the label text color correctly on the backend.
* | | | | Merge branch '45584-add-nip-io-domain-suggestion-in-auto-devops' into 'master'Grzegorz Bizon2018-05-151-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Add nip.io domain suggestion in the Kubernetes cluster details view" Closes #45584 See merge request gitlab-org/gitlab-ce!18496
| * | | | | Display help text below auto devops domain with nip.io domain name (#45561)45584-add-nip-io-domain-suggestion-in-auto-devopsDylan Griffith2018-05-151-0/+1
| |/ / / /
* | | | | Does not log failed sign-in attempts when database is in read-only modeDouglas Barbosa Alexandre2018-05-141-0/+3
|/ / / /
* | | | Merge branch 'blackst0ne-rails5-fix-spec-models-ci-pipeline_spec-rb' into ↵Kamil Trzciński2018-05-141-1/+11
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Resolve "[Rails5] Fix spec/models/ci/pipeline_spec.rb" Closes #46229 See merge request gitlab-org/gitlab-ce!18906
| * | | [Rails5] Fix Ci::Pipeline validator for sourceblackst0ne-rails5-fix-spec-models-ci-pipeline_spec-rbblackst0ne2018-05-121-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rails 5 enum returns value instead of key. For this case, the `NilClass` is returned instead of `unknown` which breaks validation of the `source` attribute. This commit adds a custom validatior that returns the correct result for both rails4 and rails5.
* | | | Merge branch 'bvl-restrict-api-git-for-terms' into 'master'Douwe Maan2018-05-111-0/+5
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Block access to API & git when terms are enforced Closes #45849 See merge request gitlab-org/gitlab-ce!18816
| * | | Block access to API & git when terms are enforcedBob Van Landuyt2018-05-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | When terms are enforced, but the user has not accepted the terms access to the API & git is rejected with a message directing the user to the web app to accept the terms.
* | | | Merge branch 'dz-add-2fa-filter' into 'master'Douwe Maan2018-05-112-3/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Add 2FA filter to group members page See merge request gitlab-org/gitlab-ce!18483
| * | | | Add 2FA filter to group members pageDmitriy Zaporozhets2018-05-102-3/+18
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | * Show 2fa badge on a group members page * Make group members page UI consistent with project members page * Fix ambiguous sql in User.with/without_two_factor methods Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | Merge branch 'blackst0ne-rails5-fix-route-source-can-t-be-blank' into 'master'Douwe Maan2018-05-111-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "[Rails5] Fix `Route source can't be blank`" Closes #46228 See merge request gitlab-org/gitlab-ce!18890
| * | | | [Rails5] Fix `Route source can't be blank`blackst0ne-rails5-fix-route-source-can-t-be-blankblackst0ne2018-05-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rails 5.0 automatic inverse does not work for polymorphic relathionships. It was fixed in Rails 5.2: https://github.com/rails/rails/pull/28808 Until that the `inverse_of: :source` argument should be set explicitly.
* | | | | Merge branch 'correct-runner-type-when-assigning-shared-to-project' into ↵Kamil Trzciński2018-05-111-1/+7
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | 'master' Ensure runner_type is updated correctly when assigning shared runner to project See merge request gitlab-org/gitlab-ce!18874
| * | | | Ensure Ci::Runner#assign_to errors for group runnerscorrect-runner-type-when-assigning-shared-to-projectDylan Griffith2018-05-101-0/+2
| | | | |
| * | | | Ensure runner_type is updated correctly when assigning shared runner to projectDylan Griffith2018-05-101-1/+5
| | | | |
* | | | | only issue a warning if column doesn't existBrett Walker2018-05-101-1/+2
| |_|/ / |/| | |
* | | | Merge branch '45442-updates-updated-at-to-issue-on-time-spent' into 'master'Douwe Maan2018-05-101-0/+6
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Resolve "Update `updated_at` on an issue when label or time spent was added" Closes #45442 See merge request gitlab-org/gitlab-ce!18757
| * | | Updates updated_at on issue when using /spend quick actionJacopo2018-05-091-0/+6
| | |/ | |/|
* | | Merge branch 'dm-repository-xcode-project' into 'master'Robert Speicher2018-05-091-2/+8
|\ \ \ | |_|/ |/| | | | | | | | Add Repository#xcode_project? method See merge request gitlab-org/gitlab-ce!18854
| * | Add Repository#xcode_project? methodDouwe Maan2018-05-091-2/+8
| | |
* | | Add validation Ci::Runner runner_type must be presentDylan Griffith2018-05-091-0/+1
|/ /
* | Set `runner_type` for cluster/applicationKamil Trzciński2018-05-091-1/+9
|/
* Merge branch 'dm-ensure-import-state-persisted' into 'master'Grzegorz Bizon2018-05-081-2/+8
|\ | | | | | | | | Don't create import_state until project is persisted See merge request gitlab-org/gitlab-ce!18803
| * Don't create import_state until project is persistedDouwe Maan2018-05-081-2/+8
| |
* | Update commit status from external CI services less aggressivelyNick Thomas2018-05-081-7/+10
|/
* Backport: Keep ShaAttribute from halting startup when we can’t connect to ↵Brett Walker2018-05-081-7/+22
| | | | a database
* Merge branch 'dm-project-factory-import-state' into 'master'Robert Speicher2018-05-071-18/+18
|\ | | | | | | | | | | | | Fix project factory `import_*` traits Closes gitlab-ee#5904 See merge request gitlab-org/gitlab-ce!18780
| * Force creation of new import_state when setting an import state fieldDouwe Maan2018-05-071-18/+18
| |
* | Merge branch '43557-osw-present-merge-sha-commit' into 'master'Robert Speicher2018-05-071-0/+4
|\ \ | | | | | | | | | | | | | | | | | | Resolve "Display merge commit SHA in merge widget after merge" Closes #43557 See merge request gitlab-org/gitlab-ce!18722
| * | Display merge commit SHA in merge widget after mergeOswaldo Ferreira2018-05-071-0/+4
| | |
* | | Merge branch '5480-epic-notifications-ce' into 'master'Douwe Maan2018-05-072-6/+2
|\ \ \ | | | | | | | | | | | | | | | | Backport 5480-epic-notifications from EE See merge request gitlab-org/gitlab-ce!18724
| * | | Backport 5480-epic-notifications from EEMario de la Ossa2018-05-072-6/+2
| | |/ | |/|
* | | Resolve "Inform users of up to $500 offer for GCP account"Dennis Tang2018-05-071-1/+2
| | |
* | | Merge branch 'ccr/weight_1481' into 'master'Douwe Maan2018-05-071-1/+5
|\ \ \ | | | | | | | | | | | | | | | | Backport of 1481-changing-weight-values-should-trigger-system-notes See merge request gitlab-org/gitlab-ce!18699
| * | | Backport of 1481-changing-weight-values-should-trigger-system-notesChantal Rollison2018-05-031-1/+5
| | | |
* | | | Merge branch 'add-git-commit-message-predefined-variable' into 'master'Grzegorz Bizon2018-05-071-4/+27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add CI_COMMIT_MESSAGE, CI_COMMIT_TITLE and CI_COMMIT_DESCRIPTION predefined variables Closes #20400 See merge request gitlab-org/gitlab-ce!18672