Commit Graph

195 Commits

Author SHA1 Message Date
Aleksei Lipniagov e2e878bdd8 Make `bin/web_puma` consider RAILS_ENV 2019-08-01 17:47:52 +03:00
Thong Kuah 96f8a282c6 Fix secpick pushing to stable branch 2019-07-30 10:51:29 +00:00
Heinrich Lee Yu aeb67dd489 Upgrade to Rails 5.2
Updates changed method names and fixes spec failures
2019-07-12 10:15:31 +08:00
Qingyu Zhao b7ea4bd853 Enable puma by default in GDK
Two changes:
1. Move bin/web to bin/web_unicorn(removed PUMA switching logic)
Introduce new shadow script bin/web. Now we have 3 scripts working
together: bin/web, bin/web_puma, bin/web_unicorn

  In bin/web, it checks ENV['USE_WEB_SERVER']:
    - if value is 'puma' or value is not set, call bin/web_puma
    - if value is 'unicorn', call bin/web_unicorn
    - report error if other values given

2. Gitlab rails allow ENV setting to override timeout
    - ENV['GITLAB_RAILS_RACK_TIMEOUT'] for service_timeout
    - ENV['GITLAB_RAILS_WAIT_TIMEOUT'] for wait_timeout
2019-07-09 23:31:32 +10:00
Nick Thomas 9e783be668
bin/background_jobs: use pgroups 2019-02-28 21:58:31 +00:00
Robert Speicher 701303a5db Merge branch 'ac-secpick-template' into 'master'
Select Security Release template with secpick

See merge request gitlab-org/gitlab-ce!25246
2019-02-14 19:15:49 +00:00
Alessio Caiazza 3f100ee9ce Select Security Release template with secpick 2019-02-14 15:11:51 +01:00
Pavel Shutsin bba8dc7d67 Simplify bin/secpick git commands 2019-02-14 09:24:30 +00:00
Yorick Peterse 67ca0be004
Fix incorrect stable branch name for templates
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24962 the
stable branches were incorrectly changed to `stable-X-Y`. This commit
fixes this so we correctly use `X-Y-stable`.
2019-02-06 16:32:10 +01:00
Yorick Peterse 0d05c58116
Remove requirement to target security branches
This removes the requirement and any mention of targeting security
branches when working on security releases. The release process
documentation changes for these CE changes can be found in merge request
https://gitlab.com/gitlab-org/release/docs/merge_requests/97.

The proposal to remove security branches was approved in
https://gitlab.com/gitlab-org/release/framework/issues/165#note_138139016.
2019-02-06 14:14:55 +01:00
Marin Jankovski e4db1a615b
Create security release MR template
Improve existing issue templates for security releases
2019-01-28 12:51:37 +01:00
Tiago Botelho 83106427c8
Opens specified text editor when creating a new changelog entry
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-14 18:11:05 +01:00
Grzegorz Bizon 1a2b9e3190 Fix Rubocop offenses in bin/secpick script 2019-01-07 13:38:31 +01:00
Grzegorz Bizon ab714baf0e Show a valid new merge request URL in EE case 2019-01-07 13:38:23 +01:00
Grzegorz Bizon fde4eb7331 Improve `bin/secpick` script and add more options
This adds additional options that make it easier to use this script:

1. It adds `--dry-run` option that only displays Git commands that are
going to be executed.
2. It adds `--remote` option that makes it possible to override Git
remote name.
2019-01-03 13:15:05 +01:00
James Lopez 9ba303bfed
Update secpick script 2018-12-18 10:21:29 +01:00
Jasper Maes 44fef4fe4c Remove rails 4 support in CI, Gemfiles, bin/ and config/ 2018-12-14 19:36:22 +01:00
Jan Provaznik 48b59620c1 Make rails5 defailt in bin/* scripts 2018-11-14 12:41:16 +01:00
Jan Provaznik 547dc7ac60 Switch to Rails 5 by default
* updates Gemfile
* uses Rails 5 unless explicitly disabled
2018-11-14 12:38:30 +01:00
Robert Speicher 679c0048a8 Merge branch 'an-multithreading' into 'master'
Puma in GDK and rack server lifecycle event abstractions

Closes #52762

See merge request gitlab-org/gitlab-ce!22372
2018-10-25 22:29:00 +00:00
Andrew Newdigate 1065f8ce7a Add experimental support for Puma
This allows us (and others) to test drive Puma without it affecting all
users. Puma can be enabled by setting the environment variable
"EXPERIMENTAL_PUMA" to a non empty value.
2018-10-25 17:50:15 +01:00
James Lopez 4585df83b9 Fix secpick to use EE and guess branch name 2018-10-24 17:20:03 +00:00
William George 1b153d497b Make getting a user by the username case insensitive 2018-10-18 09:06:44 +00:00
Zeger-Jan van de Weg 30b4ce940d
Remove Git circuit breaker
Was introduced in the time that GitLab still used NFS, which is not
required anymore in most cases. By removing this, the API it calls will
return empty responses. This interface has to be removed in the next
major release, expected to be 12.0.
2018-10-10 09:08:18 +02:00
Marcel Amirault eb640eded7 Correct Gitlab Capitalization in code files 2018-09-21 12:05:37 +00:00
Marcel Amirault 6876c7afa8 Fix grammar (setup to set-up) in code comments, spec, views, etc. 2018-09-17 09:17:33 +00:00
Michael Kozono 2e8fe26b9b Fix `bin/secpick` rainbow gem error, and security branch prefixing 2018-08-15 07:27:59 +00:00
Stan Hu df54458a93 Truncate filenames created by bin/changelog to 140 characters 2018-07-11 10:15:22 -07:00
Jacob Vosmaer (GitLab) dcdcbfa40b Improve shelling out in bin/changelog 2018-06-25 21:32:00 +00:00
Rémy Coutable a78b1b27b8 Merge branch 'blackst0ne-remove-spinach' into 'master'
Remove Spinach

Closes #23036

See merge request gitlab-org/gitlab-ce!18869
2018-05-15 09:43:55 +00:00
James Lopez 02e7962ad4 Update secpick 2018-05-14 07:57:53 +00:00
James Lopez a758352bb1 Update secpick 2018-05-14 07:55:25 +00:00
blackst0ne d2b8dc7d5c Remove bin/spinach 2018-05-14 18:53:57 +11:00
James Lopez f3ddb9f462 Update secpick to use security branches 2018-05-14 07:46:04 +00:00
James Lopez 22e198dae1 add initial dev task template for working on a security issue 2018-04-17 16:50:16 +00:00
blackst0ne 1a455f3d5c [Rails5] Fix running spinach tests
1. Add support for `RAILS5=1|true` for the `bin/spinach` command.
2. Synchronize used spinach versions both for rails4 and rails5.

For rails5 it was accidently used spinach 0.10.1 instead of 0.8.10.
That brought some problems on running spinach tests.

Example of failure message:

NoMethodError: undefined method `line' for #<Spinach::Scenario:0x000000000c86ba80>
Did you mean?  lines
  /builds/gitlab-org/gitlab-ce/features/support/env.rb:52:in `before_scenario_run'
2018-04-10 22:18:37 +11:00
blackst0ne 126b7c0f73 [Rails5] Allow using `RAILS5` env with rspec 2018-04-03 10:01:34 +11:00
blackst0ne 36bedfb7f3 [Rails5] Update files by `rails app:update` 2018-03-22 09:37:57 +11:00
Rémy Coutable 91f03a7ab2 Generate EE changelog under ee/changelogs/unreleased/
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-02-20 16:12:48 +01:00
Lin Jen-Shin e7115a3e9c Remove bin/upgrade.rb as we don't seem to refer it 2018-01-26 19:42:48 +08:00
Lin Jen-Shin 99784d7797 We need Rails in order to use Gitlab.config anyway 2018-01-26 19:42:48 +08:00
Sean McGivern 45d6a2b398 Add bin/profile-url tool and docs 2018-01-19 14:59:05 +00:00
Bob Van Landuyt f1ae1e39ce Move the circuitbreaker check out in a separate process
Moving the check out of the general requests, makes sure we don't have
any slowdown in the regular requests.

To keep the process performing this checks small, the check is still
performed inside a unicorn. But that is called from a process running
on the same server.

Because the checks are now done outside normal request, we can have a
simpler failure strategy:

The check is now performed in the background every
`circuitbreaker_check_interval`. Failures are logged in redis. The
failures are reset when the check succeeds. Per check we will try
`circuitbreaker_access_retries` times within
`circuitbreaker_storage_timeout` seconds.

When the number of failures exceeds
`circuitbreaker_failure_count_threshold`, we will block access to the
storage.

After `failure_reset_time` of no checks, we will clear the stored
failures. This could happen when the process that performs the checks
is not running.
2017-12-08 09:11:39 +01:00
Zeger-Jan van de Weg 2622a6de59
Add Performance category to the changelog
Resolves gitlab-org/gitlab-ce#36417
2017-10-13 12:45:56 +02:00
Robert Speicher 65ad11b46b Merge branch '21949-add-type-to-changelog' into 'master'
Let's start labeling our CHANGELOG entries

Closes #21949

See merge request !11579
2017-08-10 21:56:57 +00:00
Rémy Coutable 0a3f4dfc82
Don't require stackprof in Gemfile
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 10:10:33 +02:00
Jacopo eb2b895a20 Let's start labeling our CHANGELOG entries
Added the type attribute to a CHANGELOG entry. When you create a new
entry the software asks for the category of the change and sets the
associated type in the file.
2017-07-22 11:19:56 +02:00
Takuya Noguchi 158fc8150e Remove bin/ci/upgrade.rb as not working all 2017-06-24 00:19:04 +09:00
Jacob Vosmaer 275b7797c1 Add gitaly source installation instructions 2017-03-21 14:55:41 +01:00
Mike Greiling 0e4aaa06d3 remove remaining vestiges of teaspoon test runner 2017-01-10 12:30:41 -06:00
Adam Niedzielski 1c489296fd Remove trailing whitespace when generating changelog entry 2016-12-09 12:25:29 +01:00
Robert Speicher 614fcfc4df Simplify `branch_name` in bin/changelog
The `--short` option has existed since at least 1.8.1:
https://git-scm.com/docs/git-symbolic-ref/1.8.1
2016-12-02 18:31:57 +08:00
Nick Thomas 5e05f9c5c2 Add StackProf to the Gemfile, along with a utility to get a profile for a spec 2016-11-29 14:14:34 +00:00
Robert Speicher 2f3e710150 Update help banner for bin/changelog
[ci skip]
2016-11-03 12:55:32 +00:00
Robert Speicher 895673733a Add a `--force` option to bin/changelog 2016-11-02 22:15:20 +00:00
Robert Speicher 5acb3230ef Add specs for ChangelogOptionParser in bin/changelog 2016-10-31 14:56:20 +00:00
Robert Speicher 03b932df19 Add a bin/changelog script 2016-10-31 14:56:19 +00:00
Yorick Peterse 97731760d7
Re-organize queues to use for Sidekiq
Dumping too many jobs in the same queue (e.g. the "default" queue) is a
dangerous setup. Jobs that take a long time to process can effectively
block any other work from being performed given there are enough of
these jobs.

Furthermore it becomes harder to monitor the jobs as a single queue
could contain jobs for different workers. In such a setup the only
reliable way of getting counts per job is to iterate over all jobs in a
queue, which is a rather time consuming process.

By using separate queues for various workers we have better control over
throughput, we can add weight to queues, and we can monitor queues
better. Some workers still use the same queue whenever their work is
related. For example, the various CI pipeline workers use the same
"pipeline" queue.

This commit includes a Rails migration that moves Sidekiq jobs from the
old queues to the new ones. This migration also takes care of doing the
inverse if ever needed. This does require downtime as otherwise new jobs
could be scheduled in the old queues after this migration completes.

This commit also includes an RSpec test that blacklists the use of the
"default" queue and ensures cron workers use the "cronjob" queue.

Fixes gitlab-org/gitlab-ce#23370
2016-10-21 18:17:07 +02:00
Kamil Trzcinski 7b523eb1a1 Use ENABLE_SPRING to use it by default 2016-06-17 16:54:55 +02:00
Jacob Vosmaer 8a6776caa9 Use 'exec' in Unicorn and Sidekiq launch scripts
When running Unicorn or Sidekiq in the foreground this change removes
an intermediate /bin/sh process. This makes process supervision in the
GitLab Development Kit more reliable.

This change does not affect Omnibus-GitLab (because there we do not
use these launch scripts). Installations from source do use the launch
scripts but for the standard GitLab init script this change will not
make a difference.

Custom installations using Upstart or Systemd may be affected however,
because under certain configurations these systems count exactly how
many forks happen during process startup, and we are reducing that
number by one here.
2016-04-28 12:11:08 +02:00
Robert Speicher fdc8b05ab1 Re-generate Spring binstubs for updated version of Spring
Prevents output like this:

    Array values in the parameter are deprecated. Please use a String or nil.
    An Array was passed in from bin/rspec:3:in `load'
2016-04-22 16:00:56 -04:00
Yorick Peterse a54af831ba
Use rake db:reset instead of db:setup
Using db:reset ensures existing tables are first dropped. This in turn
ensures that we can drop tables regardless of any foreign key
constraints. While CE currently doesn't have any foreign keys EE defines
the following relation:

    remote_mirrors.project_id -> projects.id

MySQL will complain whenever you try to drop the "projects" table first
even when using "DROP TABLE ... CASCADE".
2016-04-14 15:53:54 +02:00
Jacob Vosmaer d28332cc9e Direct sidekiq boot output to log file
This behavior got lost in the previous commit.
2016-01-15 11:12:49 +01:00
Jacob Vosmaer 66f28577ad Improve bin/ launchers 2016-01-14 15:08:15 +01:00
Jacob Vosmaer f3ca92a062 Add 'resume' capability to parallel-rsync-repos 2015-12-08 15:08:22 +01:00
Jacob Vosmaer 6d2be0212c Merge branch 'master' into sync-all-repos 2015-12-08 12:35:54 +01:00
Valery Sizov 9ce8c867ee Fix mailer queue 2015-12-03 15:10:41 +02:00
Valery Sizov 40ff1318d2 Rails update to 4.2.4 2015-11-25 18:18:44 +02:00
Jacob Vosmaer 6479b821eb Add RSYNC variable to parallel-rsync-repos 2015-10-05 18:02:12 +02:00
Jacob Vosmaer 5bcd0efe3e Add parallel-rsync-repos script and start docs 2015-09-25 18:32:02 +02:00
Dmitriy Zaporozhets 0b5d627cd4 Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g 2015-09-09 14:56:02 +02:00
Jacob Vosmaer 1081a322f1 Properly daemonize the mail_room process
The old invocation only worked by accident because we have a '&'
somewhere in the init script for expediency. When ran from a terminal,
the mail_room daemon process ended up in the session of the terminal.
This commit adds a small wrapper that tries to do the textbook
daemonization steps (double fork, setsid etc.) while also taking
care that the pidfile is written before the 'start' process exits.
2015-08-27 16:35:00 +02:00
Douwe Maan 046b283127 Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
Douwe Maan c50e5e68c7 Fix bin/mail_room. 2015-08-19 14:27:47 -07:00
Douwe Maan f3b57ce677 Update init scripts. 2015-08-19 13:58:07 -07:00
Robert Speicher 682d4b6a86 Remove Guard
None of the GitLab B.V. developers were using it.
2015-06-03 20:45:53 -04:00
Robert Speicher 11af51613d Fix bin/rails binstub 2015-05-20 19:52:08 -04:00
Robert Speicher 3601ebda79 Update spring, re-run binstubs 2015-05-20 18:39:33 -04:00
Douwe Maan 85b29f99f0 Make sure Sidekiq picks up archive_repo queue in production. 2015-04-01 14:36:17 +02:00
Jeroen van Baarsen 1446af25b1 Added binstub for guard
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-03-18 19:35:38 +01:00
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Cyril Rohr 5af05e3d3c Use new way of defining services on packager.io 2015-01-18 17:55:48 +00:00
Marin Jankovski 976eb7a955 Revert "Delete mailer queue" 2014-09-10 15:28:58 +02:00
Jacob Vosmaer 59d2f6db75 Wrap arguments for `[ -z` in double quotes 2014-09-08 14:28:42 +02:00
Jacob Vosmaer 494d15cfde Merge pull request #7258 from presto53/fix_init_scripts_interpreter
change bash to sh in web, background_jobs scripts
2014-09-08 14:22:53 +02:00
Pavel Novitskiy 7dd0646e0d fix bash-ism 2014-07-04 15:46:44 +04:00
Pavel Novitskiy b37247ac31 change bash to sh 2014-07-04 11:45:20 +04:00
ling.su 9c2b046454 Delete mailer queue because we don't use sidekiq_mailer gem and now the mailer queue doesn't exist any more. 2014-07-04 10:51:44 +08:00
Jacob Vosmaer 8e2752f459 Be more selective when killing stray Sidekiqs
Avoid the background_jobs script killing every process with 'sidekiq' in
its argument string (e.g. 'rake gitlab:sidekiq start') by also catching
the number (2) in 'sidekiq 2.14'.
2014-06-12 15:32:47 +02:00
Marin Jankovski 2341cefd6f Move from script to bin directory. 2014-05-27 17:14:41 +02:00
Cyril Rohr 402361afff Setup default gitlab.yml with possibility to override default url via environment variable.
This only applies to packaging with https://pkgr.io.
2014-05-06 11:34:17 +01:00
Cyril Rohr b1d68b6e9b Add .pkgr.yml file for automated packaging on https://pkgr.io 2014-05-06 11:34:17 +01:00
Jeroen van Baarsen 055937c417 Added executable file permission to binstubs 2014-02-20 12:56:22 +01:00
Jeroen van Baarsen 99dc9c6fc9 Inserted spring in the binstubs
Now possible to run:
`bin/rails`
`bin/rspec`
`bin/spinach`
`bin/rake`
2014-02-16 11:22:03 +01:00
Jeroen van Baarsen c35036c091 Rails uses bin folder we forgot to create it when upgrading 2014-02-15 21:03:10 +01:00