Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2015-11-09Track the amount of times views are renderedYorick Peterse
2015-11-09Fixed Hash key style in Sherlock::Query specYorick Peterse
2015-11-09Added specs and source documentation for SherlockYorick Peterse
2015-11-09Merge branch 'fix-commits-manual-merge' into 'master' Douwe Maan
Fix bug where manually merged branches in a MR would end up with an empty diff This bug manifested in 8.1 with the refactoring of `RefreshService`. Here's what happens: 1. User create a new branch `foo`. 2. User creates a merge request for `foo`. 3. User merges `foo` into `master` by hand. 4. `RefreshService` reloads the merge request. Since `master` is equivalent to `foo`, this results in an empty diff. 5. `RefreshService` then closes the MR. This wasn't an issue when you use the normal "Accept Merge Request" flow because the act of clicking the button closes the merge request, so step 4 never happens. Closes #3314 See merge request !1758
2015-11-09Fix testsKamil Trzcinski
2015-11-06Add spec for manual merge of merge requestStan Hu
2015-11-05CI details cleanupKamil Trzcinski
- Add page titles to CI settings. - Fix CI admin navigation. - Remove duplicated scope. - Use monospace font for commit sha. - Add page title and header title to build page. - Proper authorization for cancel/retry builds. - Use gitlab pagination theme for builds and group members. - Don't paginate builds widget on build page. - Add badges to commit page Changes/Builds tabs. - Add "Builds" to commit Builds tab page title. - Add and use Ci::Build#retryable? method. - Add CI::Build#retried? method. - Allow all failed commit builds to be retried. - Proper authorization for cancel/retry all builds. - Remove unused param. - Use time_ago_with_tooltip where appropriate. - Tweak builds index text - Remove duplication between builds/build and commit_statuses/commit_status. - Use POST rather than GET for canceling and retrying builds. - Remove redundant URL helpers. - Add build ID to build page. - Link branch name on build page. - Move commit/:sha/ci to commit/:sha/builds.
2015-11-05 Allow groups to appear in the search results if the group owner allows itValery Sizov
2015-11-04Merge branch 'rs-git-bin-path' into 'master' Douwe Maan
Replace all usages of `git` command with configurable binary path Closes #3311 See merge request !1742
2015-11-04Merge branch 'create-project-performance' into 'master' Yorick Peterse
Improve performance of creating projects See merge request !1650
2015-11-04Merge branch 'remove-duplicate-orders' into 'master' Yorick Peterse
Remove duplicate orders This changes the default order from `created_at DESC, id DESC` to just `id DESC` as this achieves the same results without the overhead of having to sort data twice (we've seen queries go from 200ms to just a few ms by removing the double sort). cc @jacobvosmaer @dzaporozhets @rspeicher @DouweM See merge request !1735
2015-11-04Replace all usages of `git` command with configurable binary pathRobert Speicher
Closes #3311
2015-11-03Merge branch 'drop-old-builds' into 'master' Kamil Trzciński
Cleanup stuck CI builds Fixes #3143 /cc @dzaporozhets @jacobvosmaer See merge request !1655
2015-11-03Merge branch 'web_hook_repo_changes'Valery Sizov
2015-11-03Merge branch 'only-syntax' into 'master' Kamil Trzciński
Extend yml syntax for only and except to support specifying repository path This allows to limit execution of jobs to specific repository. For example: ```yaml job: only: - branches@gitlab-org/gitlab-ce except: - master@gitlab-org/gitlab-ce ``` The above will run `job` for all branches on `gitlab-org/gitlab-ce`, except master. @dzaporozhets @JobV @vsizov Please review. See merge request !1720
2015-11-03Cleanup stuck CI builds dailyKamil Trzcinski
2015-11-03Fix code that depends on incorrect inflector behaviorDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-03Fixed User sorting specsYorick Peterse
The descriptions were not accurate and one particular spec seemingly expected the wrong User row to be returned.
2015-11-03Added benchmark for User.allYorick Peterse
This benchmark exists to test if ordering has any noticeable impact in the test environment.
2015-11-03Merge branch 'olhado/gitlab-ce-commit-search'Dmitriy Zaporozhets
2015-11-03Add added, modified and removed properties to commit object in webhookValery Sizov
2015-11-03Fix testsKamil Trzcinski
2015-11-02Merge branch 'api_file_touched_at' into 'master' Dmitriy Zaporozhets
Add ability to fetch the commit ID of the last commit that actually touched a file https://dev.gitlab.org/gitlab/gitlabhq/issues/2564 See merge request !1718
2015-11-02Refactor search by commits messageDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-02Add ability to fetch the commit ID of the last commit that actually touched ↵Valery Sizov
a file
2015-11-02Extend yml syntax for only and except to support specifying repository pathKamil Trzcinski
2015-11-02Merge branch 'backup-improvements' into 'master' Kamil Trzciński
Reduce disk IO and space usage during backups This is based on improvements made to the GitLab CI 8.0 backup script. - Avoid creating many small intermediate files while backing up builds and uploads by using tar and light gzip compression - Use same backup/restore code for uploads and builds - Only store a compressed intermediate DB dump See merge request !1520
2015-11-02Merge branch 'rs-dev-issue-2613' into 'master' Douwe Maan
Add custom protocol whitelisting to SanitizationFilter Addresses internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2613 We allow any protocol for autolinks: irc://irc.freenode.net/git But manual Markdown links with the same protocol get sanitized: `[This will not be clickable](irc://irc.freenode.net/git)`: [This will not be clickable](irc://irc.freenode.net/git) To get around this we have to first allow *all* protocols, and then manually clean dangerous (i.e., `javascript:`) protocols. See merge request !1496
2015-10-30Adjusted ips/sec for find_by_any_email benchmarksYorick Peterse
While these benchmarks run at roughly 1500 i/sec setting the threshold to 1000 leaves some room for deviations (e.g. due to different DB setups).
2015-10-30Improve performance of User.find_by_any_emailYorick Peterse
This query used to rely on a JOIN, effectively producing the following SQL: SELECT users.* FROM users LEFT OUTER JOIN emails ON emails.user_id = users.id WHERE (users.email = X OR emails.email = X) LIMIT 1; The use of a JOIN means having to scan over all Emails and users, join them together and then filter out the rows that don't match the criteria (though this step may be taken into account already when joining). In the new setup this query instead uses a sub-query, producing the following SQL: SELECT * FROM users WHERE id IN (select user_id FROM emails WHERE email = X) OR email = X LIMIT 1; This query has the benefit that it: 1. Doesn't have to JOIN any rows 2. Only has to operate on a relatively small set of rows from the "emails" table. Since most users will only have a handful of Emails associated (certainly not hundreds or even thousands) the size of the set returned by the sub-query is small enough that it should not become problematic. Performance of the old versus new version can be measured using the following benchmark: # Save this in ./bench.rb require 'benchmark/ips' email = 'yorick@gitlab.com' def User.find_by_any_email_old(email) user_table = arel_table email_table = Email.arel_table query = user_table. project(user_table[Arel.star]). join(email_table, Arel::Nodes::OuterJoin). on(user_table[:id].eq(email_table[:user_id])). where(user_table[:email].eq(email).or(email_table[:email].eq(email))) find_by_sql(query.to_sql).first end Benchmark.ips do |bench| bench.report 'original' do User.find_by_any_email_old(email) end bench.report 'optimized' do User.find_by_any_email(email) end bench.compare! end Running this locally using "bundle exec rails r bench.rb" produces the following output: Calculating ------------------------------------- original 1.000 i/100ms optimized 93.000 i/100ms ------------------------------------------------- original 11.103 (± 0.0%) i/s - 56.000 optimized 948.713 (± 5.3%) i/s - 4.743k Comparison: optimized: 948.7 i/s original: 11.1 i/s - 85.45x slower In other words, the new setup is 85x faster compared to the old setup, at least when running this benchmark locally. For GitLab.com these improvements result in User.find_by_any_email taking only ~170 ms to run, instead of around 800 ms. While this is "only" an improvement of about 4.5 times (instead of 85x) it's still significantly better than before. Fixes #3242
2015-10-29Added benchmark for Projects::CreateServiceYorick Peterse
This benchmark currently runs at ~0.6 iterations per second and is unlikely to perform any better any time soon.
2015-10-29Actually converted code to following suggestions.Michael Chmielewski
2015-10-29Fixed method to use git log via Popen as recommended, and made output match ↵Michael Chmielewski
test (and thus system) expectations.
2015-10-29Trying to incorporate suggestions from comments on Merge Request 1661Michael Chmielewski
2015-10-29Trailing new lines at ends of files are important.Michael Chmielewski
2015-10-29Make subject of spec line up on one line to satisfy rubocop requirementsMike Chmielewski
2015-10-29Add support for searching commit log messagesJonathan Schoeffling
Include the log messages of recent commits in project-level search results, providing functionality similar to 'git log --grep'. Update repository model rspec tests to validate the output of Repository#commits_with_log_matching.
2015-10-28Remove deprecated CI events from project settings pageDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-26Fix CI badgeKamil Trzcinski
The previous code relied on having on ref stored in commit, however the ref was moved to the build.
2015-10-25Merge branch 'dirceu/gitlab-ce-fix-project-search-with-unmatched-parentheses'Douwe Maan
2015-10-23Merge branch 'fix-wiki-clone-over-http' into 'master' Robert Speicher
Fix cloning Wiki repositories via HTTP Cloning a project Wiki over HTTP would end up cloning the main repository since the .wiki extension was being stripped. Closes #3106 See merge request !1676
2015-10-23Merge branch 'comments_fix' into 'master' Dmitriy Zaporozhets
Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork https://dev.gitlab.org/gitlab/gitlabhq/issues/2535 See merge request !1675
2015-10-23Merge pull request #9762 from ↵Stan Hu
huacnlee/fix/api-helpers-bad-autoload-name-for-master Fix API::APIHelpers -> API::Helpers again for master
2015-10-23Fix API::APIHelpers -> API::Helpers;Jason Lee
Rails Autoload find file to require is use , APIHelpers -> api_helpers.rb, not helpers.rb;
2015-10-23Add spec for cloning Wiki over HTTPStan Hu
2015-10-22Fix: Inability to reply to code comments in the MR view, if the MR comes ↵Valery Sizov
from a fork
2015-10-22Merge branch 'project-path-case-sensitivity' into 'master' Robert Speicher
Prefer project with exact path to differently cased one when both exist. Fixes #3113. See merge request !1649
2015-10-22Require jobs to be namedKamil Trzcinski
2015-10-22Only postgres does case sensitive comparesDouwe Maan
2015-10-21Fix issue #3055 (project search with unmatched parentheses)Dirceu Pereira Tiegs