Commit Graph
551 Commits
Author SHA1 Message Date
Jacob Vosmaer 977fdbe830 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into cache-clear 2016-02-18 19:51:58 +01:00
Jacob Vosmaer 9805fe1914 Use SCAN during 'rake cache:clear'
This allows 'rake cache:clear' to delete millions of keys without
choking. It requires Redis 2.8.0 or newer but we needed that already
anyway.
2016-02-18 16:55:19 +01:00
Achilleas Pipinellis e5f9c4460f Remove remaining sqlite method call 2016-02-17 20:34:54 +02:00
Achilleas Pipinellis f8036ec910 Remove sqlite check in raketask 2016-02-10 16:54:15 +02:00
Robert Speicher e8785ded1e Prevent StateMachine warnings from outputting during a cron task
[ci skip]

Closes #5931
2016-01-15 17:47:56 -05:00
Robert Speicher a43fd5ce6d Disable colorization if STDOUT is not a tty 2016-01-12 21:34:23 -05:00
Stan Hu e57b506222 Suggest prefacing find command with sudo when base permissions are wrong
Closes #5872
2016-01-05 05:30:01 -08:00
Robert Speicher 28a8d0b5db Merge branch 'add_user_repo_integrity_rake_task' into 'master'
Add user repository integrity check rake task

Corrupt repositories and stuck lock files can cause weird issues in
GitLab. Often we know which user is having these problems and then we
have to go hunt down which repository is causing it. Several times
recently that involved me running queries in the rails console to get
an array of projects and then writing a quick Ruby script to loop
through and run `git fsck`. This last time I also had to check for the
existence of `config.lock` and ref lock files. 

This rake task will eliminate all of those steps and allow an admin to
simply specify a username.

I also added the lock file checks to the existing `gitlab:repo:check`
task which goes through all projects. 

See merge request !2080
2015-12-15 18:36:28 +00:00
Drew Blessing f8bf6c4b2c [ci skip] Add user repository integrity check rake task 2015-12-14 15:27:14 -06:00
Kamil Trzciński c810234357 Merge branch 'ci-project-migrate' into 'master'
Ci Project migrate

- This doesn't migrate: allow_git_fetch, coverage_regex, timeout. Since this are project configuration settings I would propose to migrate them to `.gitlab-ci.yml`.
- This requires offline migrations.
- It simplifies database models making all CI objects to be attached to: Project.
- It removes Ci::Project, but makes /ci/projects working by adding method: Project.find_by_ci_id for backward compatibility (badges, triggers).
- We should add default `timeout` to Application Settings.
- It misses specs.
- It is based on ci-services-migrate for now.
- It removes CI events.
- It removes administrator CI projects overview.
- It removes CI application settings.

In 8.4 or 8.5 we can remove redundant tables and columns.


See merge request !1987
2015-12-14 10:35:40 +00:00
Stan Hu 9c5d8079a3 Bump Redis requirement to 2.8 for Sidekiq 4 requirements
Closes #3649

[ci skip]
2015-12-12 07:51:50 -08:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Douwe Maan 6c6fb1d8bb Split up spec:other even more 2015-12-09 11:56:23 +01:00
Douwe Maan 7a5e77c0a0 Fix rspec tag syntax 2015-12-09 11:09:25 +01:00
Douwe Maan ae0b901731 Split up specs more 2015-12-09 10:51:01 +01:00
Douwe Maan 9ebdee0967 Split up feature specs more 2015-12-09 10:50:43 +01:00
Stan Hu 1d410ac96a Update project repository size and commit count during import:repos task
Closes #3848
2015-12-08 09:08:22 -08:00
Douwe Maan 033947de90 Merge branch 'sync-all-repos' into 'master'
Sync all repos

Scripts and documentation for moving repos, used on gitlab.com.

See merge request !1439
2015-12-08 16:13:59 +00:00
Jacob Vosmaer 23f383ef69 Detect project and namespace changes in list:repos 2015-12-08 16:06:06 +01:00
Jacob Vosmaer 6d2be0212c Merge branch 'master' into sync-all-repos 2015-12-08 12:35:54 +01:00
Zeger-Jan van de Weg 3da32ef7d8 Merge branch 'master' into rake-tasks-git 2015-12-07 12:06:20 +01:00
Robert Speicher ec002e8026 Remove usage of Colored 2015-11-24 19:20:23 -05:00
Zeger-Jan van de Weg 2f127cb86b Merge branch 'master' into rake-tasks-git 2015-11-24 14:59:31 +01:00
Marin Jankovski 3cc2b48a82 Backup LFS objects same as any upload. 2015-11-19 10:43:45 +01:00
Dmitriy Zaporozhets 4747412a49 Set higher flay value to avoid unnecessary refactoring for now
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 11:18:01 +01:00
Dmitriy Zaporozhets cd513034e6 Set less strict flay option for now
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 13:01:34 +01:00
Dmitriy Zaporozhets d343d9d8c2 Add grape routing print
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-12 16:26:23 +01:00
Dmitriy Zaporozhets 12b35c6fe8 Merge branch 'flay' into 'master'
Add flay: tool to find duplicate code

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !1789
2015-11-11 16:21:35 +00:00
Dmitriy Zaporozhets 7bca4cabc2 Merge branch 'flog' into 'master'
Add method complexity check to CI

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !1783
2015-11-11 15:29:19 +00:00
Dmitriy Zaporozhets 98c954ee81 Add flay: tool to find duplicate code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-11 16:29:00 +01:00
Dmitriy Zaporozhets 6748dd2fd0 Allow flog failure for now
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-11 15:30:23 +01:00
Zeger-Jan van de Weg 9f548dffc3 Merge branch 'master' into rake-tasks-git 2015-11-11 13:22:00 +01:00
Dmitriy Zaporozhets 58429d9b26 Add method complexity check to CI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-10 18:34:05 +01:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Robert Speicher d09d62b6b8 Replace all usages of git command with configurable binary path
Closes #3311
2015-11-03 17:11:09 -05:00
Mike Chmielewski afdb53baec Added @commits to list of tags. 2015-10-28 22:34:39 -04:00
Kamil Trzcinski b7b0010f7b Remove CI migration task 2015-10-21 12:13:09 +02:00
Benny Schimmer d02a467d64 Fix regex in redis version check 2015-10-19 22:14:22 +02:00
Yorick Peterse 72f428c7d2 Improve performance of User.by_login
Performance is improved in two steps:

1. On PostgreSQL an expression index is used for checking lower(email)
   and lower(username).
2. The check to determine if we're searching for a username or Email is
   moved to Ruby. Thanks to @haynes for suggesting and writing the
   initial implementation of this.

Moving the check to Ruby makes this method an additional 1.5 times
faster compared to doing the check in the SQL query.

With performance being improved I've now also tweaked the amount of
iterations required by the User.by_login benchmark. This method now runs
between 900 and 1000 iterations per second.
2015-10-15 11:58:25 +02:00
Zeger-Jan van de WegandZeger-Jan van de Weg 8db063b579 Scalable way of requesting all repos 2015-10-14 19:11:09 +02:00
Zeger-Jan van de Weg 54e6c0045b Added three rake tasks for repository maintainance
Tasks added:
gitlab:git:repack
gitlab:git:gc
gitlab:git:prune
2015-10-14 19:11:09 +02:00
Douwe Maan 712d17684b Make Reply by email easier to configure 2015-10-13 13:10:49 +02:00
Jacob Vosmaer 6e1ec3b9af Merge branch 'rs-2fa-task' into 'master'
Add task to disable 2FA for all users

Addresses #2971 

See merge request !1532
2015-10-09 08:04:34 +00:00
Robert Speicher cd46f4c367 Add output and confirmation to gitlab:two_factor:disable_for_all_users 2015-10-08 23:19:56 -04:00
Yorick Peterse c8f18fc562 Added dedicated Rake task for setting up Postgres
This ensures any PostgreSQL specific schema changes (e.g. expression
indexes) are created when setting up the database.
2015-10-08 14:35:36 +02:00
Robert Speicher c3d9c55b23 Add gitlab:two_factor:disable_for_all_users task 2015-10-07 15:46:18 -04:00
Yorick Peterse 8a78c4ea06 Exclude benchmarks from the spec Rake task 2015-10-05 18:01:28 +02:00
Yorick Peterse 19893a1c10 Basic setup for an RSpec based benchmark suite
This benchmark suite uses benchmark-ips
(https://github.com/evanphx/benchmark-ips) behind the scenes. Specs can
be turned into benchmark specs by setting "benchmark" to "true" in the
top-level describe block like so:

    describe SomeClass, benchmark: true do

    end

Writing benchmarks can be done using custom RSpec matchers, for example:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        it 'should run 1000 iterations per second' do
          maru = described_class.new

          expect { maru.jump_in_box }.to iterate_per_second(1000)
        end
      end
    end

By default the "iterate_per_second" expectation requires a standard
deviation under 30% (this is just an arbitrary default for now). You can
change this by chaining "with_maximum_stddev" on the expectation:

    expect { maru.jump_in_box }.to iterate_per_second(1000)
      .with_maximum_stddev(10)

This will change the expectation to require a maximum deviation of 10%.

Alternatively you can use the it block style to write specs:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        subject { -> { described_class.new } }

        it { is_expected.to iterate_per_second(1000) }
      end
    end

Because "iterate_per_second" operates on a block, opposed to a static
value, the "subject" method must return a Proc. This looks a bit goofy
but I have been unable to find a nice way around this.
2015-10-02 17:00:23 +02:00
Douwe Maan 084e35527c Merge branch 'orphaned-repo-cleanup' into 'master'
Improve repo cleanup task

I accidentally wrote a new script, not seeing we already had one.
But the old one did not do enough (it only handled global namespace orhpans) so I figured I should just drop in the new script.

See merge request !1298
2015-09-29 07:35:59 +00:00
Jacob Vosmaer 7a8a892efd Add "rake gitlab:list_repos" task 2015-09-25 17:12:41 +02:00