Commit Graph
605 Commits
Author SHA1 Message Date
Achilleas PipinellisandRémy Coutable bca48a0a85 Merge branch 'feature/import-export-docs' into 'master'
import/export docs

Added documentation for and closes https://gitlab.com/gitlab-org/gitlab-ce/issues/3050

Also added a couple of rake tasks that might be useful.

See merge request !4732

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-22 15:46:55 +02:00
Jacob SchatzandRobert Speicher 355310ba98 Merge branch '17521-gitlab-ci-yml-templates' into 'master'
GitLab CI Yaml template dropdown

## What does this MR do?
Make it possible to select a dropdown for an easy start with GitLab CI.

## What are the relevant issue numbers?
Closes #17521

## TODO
- [ ] Backend
  - [x] CHANGELOG item
  - [x] Fix rubocop failure
  - [x] API Support
  - [x] New tests
  - [x] Add disclaimer to the top of the gitlab-ci.yml
- [ ] Frontend
  - [x] New tests

See merge request !4411
2016-06-21 12:17:47 -04:00
Stan Hu bf92ea687f Properly quote table name in Rake task for MySQL and PostgreSQL compatibility
!4318 broke the gitlab:db:drop_tables functionality for PostgreSQL.

Closes #15259
2016-06-09 15:06:19 -07:00
Stan Hu 4fbb284cfd Merge branch 'fix_issue_15259' into 'master'
Fix bug with SQL syntax error during backup restoration

## What does this MR do?
It properly escapes the table name in the `DROP TABLE IF EXISTS ...` statement used during restore of a backup.

## Are there points in the code the reviewer needs to double check?
Please check compatibility with PostgreSQL

## Why was this MR needed?
Fix an issue with backups can not be restored if MySQL is used as database for GitLab.

## What are the relevant issue numbers?
#15259 

## Screenshots (if relevant)
-

See merge request !4318
2016-06-09 21:44:10 +00:00
Connor Shea efb7da68e6 Fix missed colorize methods. 2016-06-06 15:32:36 -06:00
Connor Shea 903946c78a Replace colorize gem with rainbow.
Colorize is a gem licensed under the GPLv2, so we can’t use it in GitLab without relicensing GitLab under the terms of the GPL. Rainbow is licensed under the MIT license and does the exact same thing as Colorize, so Rainbow was added in place of Colorize.

The syntax is slightly different for Rainbow vs. Colorize, and was updated in accordance.

The gem is still a dependency of Spinach, so it’s included in the development/test environments, but won’t be packaged with the actual product, and therefore doesn’t require we relicense the product.

An attempt at relicensing Colorize was made, but didn’t succeed as the library owner never responded.

Rainbow library: https://github.com/sickill/rainbow
Relevant issue regarding licensing in GitLab's gems: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3775
2016-06-03 10:37:09 -06:00
Daniel Beyer 97aecdeade Fix bug with SQL syntax error during backup restoration
closes #15259
2016-05-27 13:35:12 +02:00
DJ Mountney 1a7326ba9a Switch the gitlab:db:configure task to use tables.any? instead of looking specifically for the schema_migrations table 2016-05-25 10:47:09 -07:00
DJ Mountney 24632d2150 Update hash syntax and add changelog for the gitlab:db:configure rake task 2016-05-25 10:44:22 -07:00
DJ Mountney c6e7d826b2 Add a gitlab:db:configure rake task to handle conditionally seeding or migrating the database. 2016-05-25 10:44:22 -07:00
Douwe Maan 019a3c781e Merge branch 'fix-registry-backups' into 'master'
Fix backups if registry is disabled

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17749

See merge request !4263
2016-05-25 09:28:22 +00:00
Robert Speicher 43d9e06b68 Add rubocop-rspec
Almost all cops are starting as disabled until we can fix their
violations.
2016-05-23 15:59:32 -04:00
Kamil Trzcinski 12bd781031 Fix backups if registry is disabled 2016-05-23 14:18:39 -05:00
Zeger-Jan van de WegandAlfredo Sumaran 79620c501d Update API and fetching task 2016-05-20 15:58:36 -05:00
Zeger-Jan van de WegandAlfredo Sumaran e166a8022a Backend for a gitignores dropdown 2016-05-20 15:58:36 -05:00
JazzandLudovic Perrine 8eb1748ab2 Fixed advice on invalid permissions on upload path 2016-05-19 16:53:47 +02:00
Kamil Trzcinski 143cd58c39 Added backup of container registry 2016-05-16 17:25:38 -05:00
Yorick Peterse f96c34ec45 Merge branch 'remove-annotate-gem' into 'master'
Remove the annotate gem and delete old annotations

In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382 

/cc @yorickpeterse 

See merge request !4099
2016-05-10 09:08:30 +00:00
Jeroen van Baarsen 22db5e14f2 Remove the annotate rake task 2016-05-10 07:36:44 +02:00
Robert Speicher f27fd27413 Merge branch 'cascade_drop' into 'master'
Add if exists to drop command

Add `IF EXISTS` as a precaution. Related to gitlab-org/gitlab-ce!4020

See merge request !4100
2016-05-09 18:17:57 +00:00
Drew Blessing 10d4d5842b Add if exists to drop command 2016-05-09 12:20:18 -05:00
Douwe Maan 45ef8d5eda Merge branch 'annotate-models' into 'master'
Update annotations on models



See merge request !3962
2016-05-06 11:15:04 +00:00
Zeger-Jan van de Weg 8278b763d9 Auto annotate models on migration
[ci skip]
2016-05-06 09:07:35 +02:00
Drew Blessing 50d18a1e1d Rake drop tables with cascade 2016-05-03 09:29:15 -05: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
Robert Speicher 6f4b4fd901 Merge branch 'fix_emojis_not_showing_in_autocomplete' into 'master'
Fix emoji aliases not showing in autocomplete

closes #14948 

See merge request !3595
2016-04-12 17:38:21 +00:00
Arinde Eniola 1d1ca8b9c2 fix emoji aliases not showing in autocomplete 2016-04-09 13:29:37 +01:00
Jacob Vosmaer cf669551f6 Put CACHE_NAMESPACE in the Gitlab::Redis module 2016-04-07 15:42:07 +02:00
Jacob Vosmaer 0163e27631 Add Gitlab::Redis connection pool 2016-04-04 17:00:09 +02:00
Dmitriy Zaporozhets fa9d140f00 Merge branch 'precompile-emoji-urls' into 'master'
Pre-calculate Emoji digests

cc @dzaporozhets @rspeicher 

@marin Do you happen to know if we allow users to configure asset hosts anywhere in Omnibus and such? I've not been able to find any reference to "asset_host" so it seems we don't allow this (which is a good thing as this simplifies the code).

See merge request !3458
2016-03-30 18:23:13 +00:00
Yorick Peterse 5830d80b8d Pre-calculate Emoji digests
By pre-calculating the digests we can manually construct the emoji URLs,
removing the need for using Rails' asset URL helpers. The reason we
don't want to use these helpers for Emojis is two-fold:

1. Rails' image_url() method is slow, really slow. For one it _might_
   have to calculate digests but it also performs a lot of other
   intensive operations (judging by the source code and based on
   measuring timings).

2. We have a lot of Emoji which coupled with the above can result in it
   taking minutes to load Emoji autocomplete data.

Using this pre-calculation setup generating the digests takes around 7
seconds (including the time it takes to start Rails/Rake), and only
around 600 milliseconds to load _all_ the autocomplete data of a project
(measured locally).

This commit _does_ change the Emoji URLs from absolute to relative URLs
as these are much easier to generate.

To update the Emoji data simply run:

    rake gemojione:digests

Then commit any changes.

Fixes gitlab-org/gitlab-ce#14009
2016-03-30 19:29:17 +02:00
Rémy Coutable 9f218fc184 Improve and finish the fallback to the In-Reply-To and References header for the reply-by-email feature
A few things to note:
- The IncomingEmail feature is now enabled even without a
  correctly-formatted sub-address
- Message-ID for new thread mail are kept the same so that subsequent
  notifications to this thread are grouped in the thread by the email
  service that receives the notification
  (i.e. In-Reply-To of the answer == Message-ID of the first thread message)
- To maximize our chance to be able to retrieve the reply key, we look
  for it in the In-Reply-To header and the References header
- The pattern for the fallback reply message id is "reply-[key]@[gitlab_host]"
- Improve docs thanks to Axil
2016-03-25 13:05:15 +01:00
Drew Blessing 5516b6c47f Reload the schema before restoring a database backup 2016-03-21 21:16:34 -05:00
connorshea e106597e31 Follow the CSS Style Guide rules for unitless zero values.
Updated Emoji Rake task to conform to style guide.

Discussed in #14299.

[ci skip]
2016-03-16 19:23:23 -06:00
Douwe Maan ecfa6cd75b Merge branch 'master' into git-2-7-3 2016-03-15 23:24:06 +01:00
Douwe Maan 7ae573c75a Bump Git version requirement to 2.7.3 2016-03-15 23:22:05 +01:00
connorshea 8d8b457ceb Add SCSS Lint, CSSComb config file, run SCSS Lint in GitLab CI, add documentation for SCSS Style Guide.
See !3069 for more information.
2016-03-14 20:33:54 -06:00
Douwe Maan 5a84e8381a Merge branch 'remove-benchmark-suite' into 'master'
Removed benchmark suite and its documentation

Related issue: gitlab-org/gitlab-ce#13718

See merge request !3137
2016-03-11 15:06:37 +00:00
ashleys 4cd9a5208c web hooks to webhooks 2016-03-10 14:48:29 -05:00
Yorick Peterse d69dff5b4b Removed benchmark suite and its documentation
The rationale for this can be found in
https://gitlab.com/gitlab-org/gitlab-ce/issues/13718 but in short the
benchmark suite no longer serves a good purpose now that we have proper
production monitoring in place.

Fixes gitlab-org/gitlab-ce#13718
2016-03-10 11:15:43 +01:00
Jacob Vosmaer 570f428b89 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into redis-config-parser 2016-03-10 09:45:38 +01:00
Dmitriy Zaporozhets fdfcc1ac0d Merge branch 'rs-sprite-task' into 'master'
Add a `gemojione:sprite` Rake task

This task will generate a standard and Retina sprite of all of the
current Gemojione Emojis, with the accompanying SCSS map.

It will not appear in `rake -T` output, and the dependent gems are not
included in the Gemfile by default, because this task will only be
needed occasionally.

See merge request !3130
2016-03-09 19:32:08 +00:00
Robert Speicher e443c7c6d8 Add a gemojione:sprite Rake task
This task will generate a standard and Retina sprite of all of the
current Gemojione Emojis, with the accompanying SCSS map.

It will not appear in `rake -T` output, and the dependent gems are not
included in the Gemfile by default, because this task will only be
needed occasionally.

[ci skip]
2016-03-09 12:44:48 -05:00
Jacob Vosmaer 3eb7ea49fe Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into redis-config-parser 2016-03-09 16:20:35 +01:00
Jacob Vosmaer c46e6eff10 Parse config/resque.yml in one place only 2016-03-09 15:16:46 +01:00
Kamil Trzcinski af43401602 Retry spinach tests 2016-03-09 14:22:32 +01:00
Peter Suschlik 6f837df08e Reduce progress bar noise during brakeman run 2016-03-04 22:12:25 +00:00
Douwe Maan 8ec49e47ec Merge branch 'mail-room-config-without-rails' into 'master'
Don't load all of GitLab in mail_room

Fixes #12731

cc @jacobvosmaer 

See merge request !3005
2016-03-02 10:43:57 +00:00
Douwe Maan e1baa48584 Fix gitlab:incoming_email:check task. 2016-02-29 11:04:40 +01:00
Jacob Vosmaer a310901280 Batch size >1000 does not pay off
We did a small experiment to see how a full scan of the Redis keys on
gitlab.com speeds up as we increase the batch size. The values on the
right are time in seconds for a full scan (no delete operations).

count: 10);      284.500529021
count: 100);      86.21216934
count: 1_000);    60.931676195
count: 10_000);   60.96355610
count: 100_000);  62.378172541

It looks like 1,000 is a good number.
2016-02-25 13:50:08 +01:00