summaryrefslogtreecommitdiff
path: root/spec/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix Gitlab::Database.bulk_insert for non-UTF-8 data34324-gitlab-db-seed-is-brokenSean McGivern2017-06-261-0/+4
|
* Merge branch 'zj-faster-charts-page' into 'master'Grzegorz Bizon2017-06-261-5/+5
|\ | | | | | | | | | | | | Improve performance for pipeline charts Closes #32407 See merge request !12378
| * Remove references to build in pipeline chartsZ.J. van de Weg2017-06-231-5/+5
| | | | | | | | | | | | | | Being the good boyscouts, but mainly because of [the comment in the review](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12378#note_33302115) the words used for classes and variables are changed to not use builds anymore.
* | Merge branch 'dm-requirements-txt-tilde' into 'master'Grzegorz Bizon2017-06-231-0/+4
|\ \ | | | | | | | | | | | | | | | | | | Don't match tilde and exclamation mark as part of requirements.txt package name Closes #34166 See merge request !12431
| * | Don't match tilde and exclamation mark as part of requirements.txt package namedm-requirements-txt-tildeDouwe Maan2017-06-231-0/+4
| | |
* | | Merge branch 'tc-refactor-projects-finder-init-collection' into 'master'Douwe Maan2017-06-231-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add User#full_private_access? to check if user has access to all private groups & projects Closes #31745 See merge request !12373
| * | | Add User#full_private_access? to check if user has Private accesstc-refactor-projects-finder-init-collectionToon Claes2017-06-231-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In CE only the admin has access to all private groups & projects. In EE also an auditor can have full private access. To overcome merge conflicts, or accidental incorrect access rights, abstract this out in `User#full_private_access?`. `User#admin?` now only should be used for admin-only features. For private access-related features `User#full_private_access?` should be used. Backported from gitlab-org/gitlab-ee!2199
* | | Merge branch 'fix/gb/improve-updating-column-in-batches-helper' into 'master'Yorick Peterse2017-06-235-27/+47
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Improve `update_column_in_batches` migration helper Closes #34064 See merge request !12350
| * | Fix Rubocop offense in migration helpers specsfix/gb/improve-updating-column-in-batches-helperGrzegorz Bizon2017-06-221-1/+1
| | |
| * | Merge branch 'master' into fix/gb/improve-updating-column-in-batches-helperGrzegorz Bizon2017-06-2283-1005/+1012
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (56 commits) File view buttons Don't reset the session when the example failed, because we need capybara-screenshot to have access to it Resolve "MR comment + system note highlight don't have the same width" Add feature spec for dashboard state filter tabs Wording of Mysql support. a new feature checklist and more elaborate documentation requirements Filter archived project in API v3 only if param present Revert to using links instead of buttons in Issuable Index tabs. Do not run the codeclimate job on docs-only changes Only show gray footer space if environment actions exist Migrate Gitlab::Git::Blob.find to Gitaly Backport filtered search lazy token consistent state fix Add a comment explaining how the branch clean up happens Fix Github::Representation::PullRequest#source_branch_exists? Add CHANGELOG Fix GitHub importer performance on branch existence check Rebuild the dynamic path before validating it Rename stage ref migration specs to match a class name Enable Style/DotPosition Rubocop :cop: Revert "Merge branch 'winh-merge-request-related-issues' into 'master'" ... Conflicts: db/post_migrate/20170526185921_migrate_build_stage_reference.rb
| * | Disable transaction in specs for some migrationsGrzegorz Bizon2017-06-221-1/+1
| | |
| * | Fix specs for database migration helpers with transactionsGrzegorz Bizon2017-06-221-2/+8
| | |
| * | Fix migration specs that can not run within transactionGrzegorz Bizon2017-06-213-3/+3
| | |
| * | Raise if updating columns in batches within a transactionGrzegorz Bizon2017-06-211-21/+35
| | |
* | | Merge branch 'fix/properly-encode-gitaly-diffs' into 'master'Robert Speicher2017-06-221-0/+8
|\ \ \ | | | | | | | | | | | | | | | | Encode Gitaly diff patches properly See merge request !12368
| * | | Encode Gitaly diff patches properlyfix/properly-encode-gitaly-diffsAhmad Sherif2017-06-221-0/+8
| | | |
* | | | Merge remote-tracking branch 'upstream/master' into ↵28717-additional-metrics-review-branchPawel Chojnacki2017-06-22111-1049/+1439
|\ \ \ \ | | |_|/ | |/| | | | | | 28717-additional-metrics-review-branch
| * | | Merge branch 'feature/migrate-blob-find-to-gitaly' into 'master'Robert Speicher2017-06-222-2/+11
| |\ \ \ | | |/ / | |/| | | | | | | | | | Migrate Gitlab::Git::Blob.find to Gitaly See merge request !12104
| | * | Migrate Gitlab::Git::Blob.find to Gitalyfeature/migrate-blob-find-to-gitalyAhmad Sherif2017-06-212-2/+11
| | |/
| * | Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-2182-1003/+1001
| |/
| * Replace invalid chars while seeding environmentsZeger-Jan van de Weg2017-06-211-0/+12
| |
| * Merge branch 'gitaly-auth-token' into 'master'Sean McGivern2017-06-214-11/+15
| |\ | | | | | | | | | | | | Pass Gitaly token on Ruby gRPC requests See merge request !12228
| | * Send gitaly token to workhorse when neededJacob Vosmaer2017-06-201-1/+5
| | |
| | * Pass Gitaly token on Ruby gRPC requestsJacob Vosmaer2017-06-193-10/+10
| | |
| * | Merge branch 'bugfix/html-email-brackets' into 'master'Douwe Maan2017-06-201-0/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | unwrap links without an href Closes #27645 See merge request !9045
| | * | add a spec for no-href link parsinghttp://jneen.net/2017-06-191-0/+4
| | | |
| * | | Merge branch 'refactor-projects-finder-init-collection' into 'master'Rémy Coutable2017-06-201-0/+31
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor ProjectsFinder#init_collection and GroupProjectsFinder#init_collection Closes #33632 See merge request !12135
| | * | | Refactor ProjectsFinder#init_collectionYorick Peterse2017-06-161-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes ProjectsFinder#init_collection so it no longer relies on a UNION. For example, to get starred projects of a user we used to run: SELECT projects.* FROM projects WHERE projects.pending_delete = 'f' AND ( projects.id IN ( SELECT projects.id FROM projects INNER JOIN users_star_projects ON users_star_projects.project_id = projects.id INNER JOIN project_authorizations ON projects.id = project_authorizations.project_id WHERE projects.pending_delete = 'f' AND project_authorizations.user_id = 1 AND users_star_projects.user_id = 1 UNION SELECT projects.id FROM projects INNER JOIN users_star_projects ON users_star_projects.project_id = projects.id WHERE projects.visibility_level IN (20, 10) AND users_star_projects.user_id = 1 ) ) ORDER BY projects.id DESC; With these changes the above query is turned into the following instead: SELECT projects.* FROM projects INNER JOIN users_star_projects ON users_star_projects.project_id = projects.id WHERE projects.pending_delete = 'f' AND ( EXISTS ( SELECT 1 FROM project_authorizations WHERE project_authorizations.user_id = 1 AND (project_id = projects.id) ) OR projects.visibility_level IN (20,10) ) AND users_star_projects.user_id = 1 ORDER BY projects.id DESC; This query in turn produces a better execution plan and takes less time, though the difference is only a few milliseconds (this however depends on the amount of data involved and additional conditions that may be added).
| * | | | Merge branch '33823_do_not_enable_defaults_when_metrics_folder_is_missing' ↵Sean McGivern2017-06-201-0/+30
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Do not enable prometheus metrics when metrics folder is missing See merge request !12263
| | * | | | Do not enable prometheus metrics when data folder is not present.Pawel Chojnacki2017-06-191-0/+30
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | + Set defaults correctly only for when not in production or staging + set ENV['prometheus_multiproc_dir'] in config/boot.rb instead of config.ru Test prometheus metrics unmemoized
| * | | | Merge branch 'sh-refactor-current-settings' into 'master'Robert Speicher2017-06-192-0/+63
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | If migrations are pending, make CurrentSettings use existing values and populate missing columns with defaults See merge request !12253
| | * | | If migrations are pending, make CurrentSettings use existing values and ↵sh-refactor-current-settingsStan Hu2017-06-192-0/+63
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | populate missing columns with defaults master was failing because `ApplicationSetting.create_from_defaults` attempted to write to a column that did not exist in the database. This occurred in a `rake db:migrate` task, which was unable to perform the migration that would have added the missing column in the first place. In 9.3 RC2, we also had a bug where password sign-ins were disabled because there were many pending migrations. The problem occurred because `fake_application_settings` was being returned with an OpenStruct that did not include the predicate method `signup_enabled?`. As a result, the value would erroneously return `nil` instead of `true`. This commit uses the values of the defaults to mimic this behavior. This commit also refactors some of the logic to be clearer.
| * | | Merge branch 'moved-submodules' into 'master'Rémy Coutable2017-06-192-4/+32
| |\ \ \ | | | | | | | | | | | | | | | | | | | | repository: index submodules by path See merge request !10798
| | * | | repository: index submodules by pathDavid Turner2017-06-162-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submodules have a name in the configuration, but this name is simply the path at which the submodule was initially checked in (by default -- the name is totally arbitrary). If a submodule is moved, it retains its original name, but its path changes. Since we discover submodules inside trees, we have their path but not necessarily their name. Make the submodules() function return the submodule hash indexed by path rather than name, so that renamed submodules can be looked up. Signed-off-by: David Turner <novalis@novalis.org>
| * | | | Add “Project moved” error to Git-over-SSHMichael Kozono2017-06-163-15/+106
| | |/ / | |/| |
| * | | Merge branch 'merge-request-diffs-table' into 'master'Douwe Maan2017-06-167-12/+108
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Add table for files in merge request diffs See merge request !12047
| | * | | Add table for files in merge request diffsSean McGivern2017-06-167-12/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an ID-less table containing one row per file, per merge request diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised currently, with the advantage that we can easily query the attributes of this new table. It does not migrate existing data, so we have fallback code when the legacy st_diffs column is present instead. For a merge request diff to be valid, it should have at most one of: * Rows in this new table, with the correct merge_request_diff_id. * A non-NULL st_diffs column. It may have neither, if the diff is empty.
| * | | | Merge branch 'tc-fix-group-finder-subgrouping' into 'master'Douwe Maan2017-06-161-0/+24
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Show private subgroups if member of parent group Closes #32135 See merge request !11764
| | * | | Subgroups page should show groups authorized through inheritanceToon Claes2017-06-151-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a user is authorized to a group, they are also authorized to see all the ancestor groups and descendant groups. When a user is authorized to a project, they are authorized to see all the ancestor groups too. Closes #32135 See merge request !11764
| * | | | Merge branch '27070-rename-slash-commands-to-quick-actions' into 'master'Sean McGivern2017-06-1614-19/+19
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | Rename "Slash commands" to "Quick actions" Closes #27070 See merge request !11811
| | * | | Rename "Slash commands" to "Quick actions"Eric Eastwood2017-06-1514-19/+19
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070 Deprecate "chat commands" in favor of "slash commands" We looked for things like: - `slash commmand` - `slash_command` - `slash-command` - `SlashCommand`
* | | | Memoize only yaml loading methodPawel Chojnacki2017-06-161-5/+0
| | | |
* | | | Merge remote-tracking branch 'upstream/master' into ↵Pawel Chojnacki2017-06-1676-489/+2165
|\ \ \ \ | |/ / / | | | | | | | | 28717-additional-metrics-review-branch
| * | | Merge branch 'deprecate-gitaly-path' into 'master'Sean McGivern2017-06-153-8/+14
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Stop using deprecated `path` field on Gitaly messages See merge request !12112
| | * | | Stop using deprecated `path` field on Gitaly messagesAlejandro Rodríguez2017-06-143-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | This revealed an error in our configuration generation in gitlab:gitaly:install rake task. The fix is included
| * | | | Merge branch 'dm-fix-parser-cache' into 'master'Sean McGivern2017-06-151-1/+1
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | Don't return nil for missing objects from parser cache See merge request !12168
| | * | | Don't return nil for missing objects from parser cachedm-fix-parser-cacheDouwe Maan2017-06-141-1/+1
| | | | |
| * | | | Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-1446-137/+430
| |/ / /
| * | | Merge branch 'dm-diff-viewers' into 'master'Sean McGivern2017-06-141-0/+301
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | Implement diff viewers Closes #30501 and #19931 See merge request !11777
| | * | Implement diff viewersDouwe Maan2017-06-141-0/+301
| | | |