summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'zj-calculate-checksum-mandator' into 'master'Nick Thomas2018-05-181-48/+24
|\ | | | | | | | | | | | | Calculating repository checksums executed by Gitaly Closes gitaly#1105 and #46293 See merge request gitlab-org/gitlab-ce!18907
| * Calculating repository checksums executed by GitalyZeger-Jan van de Weg2018-05-181-48/+24
| | | | | | | | | | | | | | | | OPT_OUT status has been removed, and alternative implementation removed. Also checks if the repository exists before executing the checksum RPC to guard against NotFound errors. Closes gitlab-org/gitaly#1105
* | Merge branch 'memoize-database-version' into 'master'Rémy Coutable2018-05-181-0/+14
|\ \ | | | | | | | | | | | | Memoize Gitlab::Database.version See merge request gitlab-org/gitlab-ce!19021
| * | Memoize Gitlab::Database.versionmemoize-database-versionYorick Peterse2018-05-171-0/+14
| | | | | | | | | | | | | | | This removes the need for running a database query every time we want to check the database version.
* | | Merge branch 'feature/gb/add-regexp-variables-expression' into 'master'Kamil Trzciński2018-05-189-48/+296
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add support for variables expression regexp syntax Closes #43601 See merge request gitlab-org/gitlab-ce!18902
| * | | Simplify untrusted regexp factory methodGrzegorz Bizon2018-05-183-12/+10
| | | |
| * | | Update variables expressions statement specsGrzegorz Bizon2018-05-171-1/+1
| | | |
| * | | Add variables expression pattern validation supportGrzegorz Bizon2018-05-172-1/+16
| | | |
| * | | Add anti-corruption layer above expressions pattern matchingGrzegorz Bizon2018-05-171-0/+28
| | | |
| * | | Add extended /regexp/ scheme support to untrusted regexpGrzegorz Bizon2018-05-171-1/+48
| | | |
| * | | Make variables expression pattern case-sensitivity explicitGrzegorz Bizon2018-05-152-0/+14
| | | |
| * | | Use parameterized RSpec to improve variables expressions specsGrzegorz Bizon2018-05-151-43/+44
| | | |
| * | | Add support for pattern matching in variables expressionsGrzegorz Bizon2018-05-153-4/+18
| | | |
| * | | Reorganize exceptions in pipeline expressions moduleGrzegorz Bizon2018-05-153-7/+7
| | | |
| * | | Merge branch 'master' into feature/gb/add-regexp-variables-expressionGrzegorz Bizon2018-05-1538-362/+1140
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (76 commits) Conflicts: lib/gitlab/untrusted_regexp.rb
| * | | | Add pattern matching variables expression lexemeGrzegorz Bizon2018-05-141-0/+57
| | | | |
| * | | | Raise variables statement exception if pattern is invalidGrzegorz Bizon2018-05-143-4/+11
| | | | |
| * | | | Do not raise if variable expression can not be evaluatedGrzegorz Bizon2018-05-141-2/+14
| | | | |
| * | | | Implement variables expression untrusted pattern lexemeGrzegorz Bizon2018-05-111-0/+55
| | | | |
| * | | | Improve fast specs helper to autoload the libraryGrzegorz Bizon2018-05-111-9/+3
| | | | |
* | | | | Merge branch 'fix/gb/not-allow-to-trigger-skipped-manual-actions' into 'master'Kamil Trzciński2018-05-181-0/+40
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not allow to trigger manual actions that were skipped Closes #42589 See merge request gitlab-org/gitlab-ce!18985
| * | | | | Do not allow to trigger manual actions that were skippedGrzegorz Bizon2018-05-161-0/+40
| | |/ / / | |/| | |
* | | | | Merge branch 'ccr/regexp_anchor' into 'master'Kamil Trzciński2018-05-181-0/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add anchor for incoming email regex, closes 44989 See merge request gitlab-org/gitlab-ce!18917
| * | | | | Add anchor for incoming email regex, closes 44989ccr/regexp_anchorChantal Rollison2018-05-111-0/+4
| | | | | |
* | | | | | Resolve "Expand API: Render an arbitrary Markdown document"blackst0ne2018-05-181-0/+112
| | | | | |
* | | | | | Add Keyboard shortcuts for "Kubernetes" and "Environments"Lukas Eipert2018-05-181-1/+40
| | | | | |
* | | | | | Move API group deletion to SidekiqStan Hu2018-05-182-6/+11
| |_|_|/ / |/| | | |
* | | | | Merge branch '46193-fix-big-estimate' into 'master'Rémy Coutable2018-05-171-0/+13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Estimating a large amount results in a server error 500" Closes #46193 See merge request gitlab-org/gitlab-ce!18964
| * | | | | Fixes 500 error on /estimate BIG_VALUEJacopo2018-05-171-0/+13
| | | | | |
* | | | | | Merge branch '46381-dropdown-mr-widget' into 'master'Annabel Gray2018-05-172-47/+51
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Dropdown actions in mini pipeline graph in mr widget don't work" Closes #46381 See merge request gitlab-org/gitlab-ce!18976
| * \ \ \ \ \ Merge branch 'master' into 46381-dropdown-mr-widget46381-dropdown-mr-widgetFilipa Lacerda2018-05-1722-192/+380
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (40 commits) Add changelog Update quick_start_guide.md Resolve "Opening Project with invite but without accepting leads to 404 error page" Respect the inheritance chain between Ci::Build and CommitStatus Remove unneccessary imports fixed copy to cliboard button in embedded snippets Fix Error 500 viewing admin page due to statement timeouts Grant privileges after database is created Only setup db in the first checkout! Project Sidebar: Split CI/CD into CI/CD and Operations Fix GPM content types for Doorkeeper Workhorse to send raw diff and patch for commits Refactor out duplication in runner_policy.rb Remove unnecessary runner.is_shared? checks in api because they are handled by policy Allow admin to assign shared runner to project through API Change policy list_runner_jobs -> read_runner Rename User#ci_authorized_runners -> ci_owned_runners Improve efficiency of authorized_runner policy query Use can? policies for lib/api/runners.rb Allow group runners to be viewed/edited in API ...
| * | | | | | | Reloads pipeline table when dropdown action is clicked and closes the ↵Filipa Lacerda2018-05-162-36/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dropdown in the MR widget
| * | | | | | | [ci skip] Merge branch 'master' into 46381-dropdown-mr-widgetFilipa Lacerda2018-05-1610-155/+302
| |\ \ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (31 commits) Remove docker pull prefix from registry clipboard feature Document the 3h timeout for GitLab.com shared Runners Fix bug with long strings in issue boards Fix setting Gitlab metrics content types Add documentation for bulk editing of issues and merge requests Remove authentication for readonly endpoints in issues API Improve testing best practices guidelines Add a unique and not null constraint on the project_features.project_id column fix typos Frontend Guide, development_process.md Add index on runner_type for ci_runners Update docs describing `fast_spec_helper` best practices Display help text below auto devops domain with nip.io domain name (#45561) Add CHANGELOG Does not log failed sign-in attempts when database is in read-only mode Simplified priority, performance impact should be severity Ref contains oid check done by Gitaly code example formatting more typos typo in `endpoint` clarify that the function export should be default ...
| * | | | | | | Handles action icons requests in a contained way and shows a loading icon to ↵Filipa Lacerda2018-05-152-41/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the user
* | | | | | | | Fix: Use case in-sensitive ordering by name for groupsHarish Ved2018-05-171-0/+108
| | | | | | | |
* | | | | | | | Merge branch '6020-extract-ee-specific-controller-lines' into 'master'Robert Speicher2018-05-171-0/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [CE] Resolve "Extract EE specific files/lines for some controllers" See merge request gitlab-org/gitlab-ce!18994
| * | | | | | | | Introduce a new Keys::DestroyService serviceRémy Coutable2018-05-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | | | | Merge branch 'pipelines-index-performance' into 'master'Grzegorz Bizon2018-05-175-8/+144
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Improve performance of Projects::PipelinesController#index See merge request gitlab-org/gitlab-ce!18427
| * | | | | | | | Exclude coverage data from the pipelines pageYorick Peterse2018-05-172-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When displaying a project's pipelines (Projects::PipelinesController#index) we now exclude the coverage data. This data was not used by the frontend, yet getting it would require one SQL query per pipeline. These queries in turn could be quite expensive on GitLab.com.
| * | | | | | | | Preload pipeline data for project pipelinesYorick Peterse2018-05-173-4/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | Limit the number of pipelines to countYorick Peterse2018-05-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When displaying the project pipelines dashboard we display a few tabs for different pipeline states. For every such tab we count the number of pipelines that belong to it. For large projects such as GitLab CE this means having to count over 80 000 rows, which can easily take between 70 and 100 milliseconds per query. To improve this we apply a technique we already use for search results: we limit the number of rows to count. The current limit is 1000, which means that if more than 1000 rows are present for a state we will show "1000+" instead of the exact number. The SQL queries used for this perform much better than a regular COUNT, even when a project has a lot of pipelines. Prior to these changes we would end up running a query like this: SELECT COUNT(*) FROM ci_pipelines WHERE project_id = 13083 AND status IN ('success', 'failed', 'canceled') This would produce a plan along the lines of the following: Aggregate (cost=3147.55..3147.56 rows=1 width=8) (actual time=501.413..501.413 rows=1 loops=1) Buffers: shared hit=17116 read=861 dirtied=2 -> Index Only Scan using index_ci_pipelines_on_project_id_and_ref_and_status_and_id on ci_pipelines (cost=0.56..2984.14 rows=65364 width=0) (actual time=0.095..490.263 rows=80388 loops=1) Index Cond: (project_id = 13083) Filter: ((status)::text = ANY ('{success,failed,canceled}'::text[])) Rows Removed by Filter: 2894 Heap Fetches: 353 Buffers: shared hit=17116 read=861 dirtied=2 Planning time: 1.409 ms Execution time: 501.519 ms Using the LIMIT count technique we instead run the following query: SELECT COUNT(*) FROM ( SELECT 1 FROM ci_pipelines WHERE project_id = 13083 AND status IN ('success', 'failed', 'canceled') LIMIT 1001 ) for_count This query produces the following plan: Aggregate (cost=58.77..58.78 rows=1 width=8) (actual time=1.726..1.727 rows=1 loops=1) Buffers: shared hit=169 read=15 -> Limit (cost=0.56..46.25 rows=1001 width=4) (actual time=0.164..1.570 rows=1001 loops=1) Buffers: shared hit=169 read=15 -> Index Only Scan using index_ci_pipelines_on_project_id_and_ref_and_status_and_id on ci_pipelines (cost=0.56..2984.14 rows=65364 width=4) (actual time=0.162..1.426 rows=1001 loops=1) Index Cond: (project_id = 13083) Filter: ((status)::text = ANY ('{success,failed,canceled}'::text[])) Rows Removed by Filter: 9 Heap Fetches: 10 Buffers: shared hit=169 read=15 Planning time: 1.832 ms Execution time: 1.821 ms While this query still uses a Filter for the "status" field the number of rows that it may end up filtering (at most 1001) is small enough that an additional index does not appear to be necessary at this time. See https://gitlab.com/gitlab-org/gitlab-ce/issues/43132#note_68659234 for more information.
* | | | | | | | | Merge branch '46177-fix-present-on-generic-commit-status' into 'master'Grzegorz Bizon2018-05-174-1/+28
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "NoMethodError: undefined method `present' for #<GenericCommitStatus:0x00007f6eacf34a40>" Closes #46177 See merge request gitlab-org/gitlab-ce!18979
| * | | | | | | | Respect the inheritance chain between Ci::Build and CommitStatus46177-fix-present-on-generic-commit-statusMayra Cabrera2018-05-164-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also moves the assertions were they belong
| * | | | | | | | Makes CommitStatus and GenericCommitStatus respond to presentableMayra Cabrera2018-05-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-173-13/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error page"
* | | | | | | | | Merge branch 'zj-workhorse-commit-patch-diff' into 'master'Grzegorz Bizon2018-05-173-43/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workhorse to send raw diff and patch for commits Closes gitaly#1196 See merge request gitlab-org/gitlab-ce!18974
| * | | | | | | | | Workhorse to send raw diff and patch for commitsZeger-Jan van de Weg2018-05-163-43/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this change, this was done through unicorn. In theory this could time out. Workhorse has been sending these raw patches and diffs for a long time and is stable in doing so. Added bonus is the fact that `Commit#to_patch` can be removed. `Commit#to_diff` too, which closes https://gitlab.com/gitlab-org/gitaly/issues/324 Closes https://gitlab.com/gitlab-org/gitaly/issues/1196
* | | | | | | | | | Merge branch 'jprovazn-remote-upload-destroy' into 'master'Kamil Trzciński2018-05-165-4/+59
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete remote uploads Closes #45425 See merge request gitlab-org/gitlab-ce!18698
| * | | | | | | | | | Delete remote uploadsJan Provaznik2018-05-165-4/+59
| | |_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-164-70/+83
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API support + Improved policies for group runners Closes #45894 and #38979 See merge request gitlab-org/gitlab-ce!18851