Commit Graph
812 Commits
Author SHA1 Message Date
Stan Hu e34c621ea1 Bump fog to 1.36.0
Closes #4231
2016-01-11 08:41:11 -08:00
Robert Speicher 0f2e4198ec Add versions to omniauth_crowd and omniauth-azure-oauth2
Also sorts them alphabetically, because OCD.
2016-01-10 20:43:41 -05:00
Robert Speicher 59305715e9 Remove stamp gem
Closes #5908
2016-01-07 16:28:33 -05:00
Jacob Schatz 8f6ca70055 fixes ajax issue with issue spec 2016-01-07 12:27:01 -05:00
Jacob Vosmaer 41b8a238ce Merge branch 'master' of github.com:gitlabhq/gitlabhq 2016-01-07 12:56:18 +01:00
Janis Meybohm da53fcba2d Enable Microsoft Azure OAuth2 support 2016-01-06 14:30:43 +01:00
Dmitriy Zaporozhets a2ba239fb4 Merge branch 'rs-bump-bootstrap-sass' into 'master'
Bump bootstrap-sass to ~> 3.3.0

Resolves bootlint error:

`bootlint:  W013  Bootstrap version might be outdated. Latest version is at least 3.3.6 ; saw what appears to be usage of Bootstrap 3.3.5`

See merge request !2275
2016-01-04 10:19:31 +00:00
Robert Speicher 2417f55467 Bump d3_rails to ~> 3.5.0 2016-01-01 21:34:49 -05:00
Robert Speicher 762210db6d Bump cal-heatmap-rails to ~> 3.5.0 2016-01-01 21:29:21 -05:00
Robert Speicher 93ef008500 Bump bootstrap-sass to ~> 3.3.0 2016-01-01 21:11:39 -05:00
Yorick Peterse 6d5202e2b6 Updated allocations Gem to version 1.0.3 2015-12-31 12:27:23 +01:00
Dmitriy Zaporozhets 540eb0a9af Merge branch 'influxdb' into 'master'
Storing of application metrics in InfluxDB

This adds support for tracking metrics in InfluxDB, which in turn can be visualized using Grafana. For more information see #2936.

See merge request !2042
2015-12-28 13:42:15 +00:00
Dmitriy Zaporozhets 202010e33f Merge branch 'add-recaptcha-support' into 'master'
Add support for Google reCAPTCHA in user registration to prevent spammers

To do:

- [x] Failing reCAPTCHA test causes all the fields to be lost
- ~~[ ] Improve styling of reCAPTCHA box~~ (not possible)
- ~~[ ] Put settings in `application_settings` (?)~~

![image](/uploads/d38ca89820d3c0066fb8aeb645fd77f0/image.png)

![image](/uploads/6b050749963691b023d076682abcf736/image.png)

Page when you fail CAPTCHA:

![image](/uploads/bc4846f0a5144985bc41dfa75eeab4c1/image.png)


See merge request !2216
2015-12-28 11:55:21 +00:00
Robert Speicher 7a20c6da91 Bump brakeman to ~> 3.1.0 2015-12-27 21:19:01 -05:00
Stan Hu 9f7d379c2a Add support for Google reCAPTCHA in user registration to prevent spammers 2015-12-27 09:04:11 -08:00
Robert Speicher fbca7d72d0 Bump underscore-rails to ~> 1.8.0
Addresses #2857
2015-12-23 14:05:45 -05:00
Dmitriy Zaporozhets c53742b14d Merge branch 'rs-update-jquery' into 'master'
Bump jquery-rails to ~> 4.0.0, jquery-ui-rails to ~> 5.0.0

Closes #2859 

See merge request !2183
2015-12-23 12:05:48 +00:00
Robert Speicher 66aaaf1fc1 Bump sass-rails to ~> 5.0.0 2015-12-22 17:04:41 -05:00
Robert Speicher 26fa1524f7 Bump jquery-rails to ~> 4.0.0, jquery-ui-rails to ~> 5.0.0 2015-12-22 16:19:02 -05:00
Robert Speicher 36026fb97b Merge branch 'rs-bump-nokogiri' into 'master'
Explicitly require Nokogiri 1.6.7.1 due to security issue

```
Name: nokogiri
Version: 1.6.7
Advisory: CVE-2015-5312
Criticality: High
URL: https://groups.google.com/forum/#!topic/ruby-security-ann/aSbgDiwb24s
Title: Nokogiri gem contains several vulnerabilities in libxml2
Solution: upgrade to >= 1.6.7.1
```

See merge request !2154
2015-12-22 03:16:08 +00:00
Douwe Maan 9832e60ffb Merge branch 'tduehr/gitlab-ce-cas-support' 2015-12-21 17:38:37 +01:00
Robert Speicher e5e4405747 Explicitly require Nokogiri 1.6.7.1 due to security issue
Name: nokogiri
Version: 1.6.7
Advisory: CVE-2015-5312
Criticality: High
URL:
https://groups.google.com/forum/#!topic/ruby-security-ann/aSbgDiwb24s
Title: Nokogiri gem contains several vulnerabilities in libxml2
Solution: upgrade to >= 1.6.7.1
2015-12-18 13:20:17 -05:00
Stan Hu f33cb184f9 Bump Rack Attack to v4.3.1 for security fix
https://github.com/kickstarter/rack-attack/releases/tag/v4.3.1
2015-12-18 10:10:02 -08:00
Yorick Peterse f181f05e8a Track object counts using the "allocations" Gem
This allows us to track the counts of actual classes instead of "T_XXX"
nodes. This is only enabled on CRuby as it uses CRuby specific APIs.
2015-12-17 17:25:48 +01:00
Yorick Peterse bcee44ad33 Instrument all ActiveRecord model methods
This works by searching the raw source code for any references to
commonly used ActiveRecord methods. While not bulletproof it saves us
from having to list hundreds of methods by hand. It also ensures that
(most) newly added methods are instrumented automatically.

This _only_ instruments models defined in app/models, should a model
reside somewhere else (e.g. somewhere in lib/) it _won't_ be
instrumented.
2015-12-17 17:25:48 +01:00
Yorick Peterse 141e946c3d Storing of application metrics in InfluxDB
This adds the ability to write application metrics (e.g. SQL timings) to
InfluxDB. These metrics can in turn be visualized using Grafana, or
really anything else that can read from InfluxDB. These metrics can be
used to track application performance over time, between different Ruby
versions, different GitLab versions, etc.

== Transaction Metrics

Currently the following is tracked on a per transaction basis (a
transaction is a Rails request or a single Sidekiq job):

* Timings per query along with the raw (obfuscated) SQL and information
  about what file the query originated from.
* Timings per view along with the path of the view and information about
  what file triggered the rendering process.
* The duration of a request itself along with the controller/worker
  class and method name.
* The duration of any instrumented method calls (more below).

== Sampled Metrics

Certain metrics can't be directly associated with a transaction. For
example, a process' total memory usage is unrelated to any running
transactions. While a transaction can result in the memory usage going
up there's no accurate way to determine what transaction is to blame,
this becomes especially problematic in multi-threaded environments.

To solve this problem there's a separate thread that takes samples at a
fixed interval. This thread (using the class Gitlab::Metrics::Sampler)
currently tracks the following:

* The process' total memory usage.
* The number of file descriptors opened by the process.
* The amount of Ruby objects (using ObjectSpace.count_objects).
* GC statistics such as timings, heap slots, etc.

The default/current interval is 15 seconds, any smaller interval might
put too much pressure on InfluxDB (especially when running dozens of
processes).

== Method Instrumentation

While currently not yet used methods can be instrumented to track how
long they take to run. Unlike the likes of New Relic this doesn't
require modifying the source code (e.g. including modules), it all
happens from the outside. For example, to track `User.by_login` we'd add
the following code somewhere in an initializer:

    Gitlab::Metrics::Instrumentation.
      instrument_method(User, :by_login)

to instead instrument an instance method:

    Gitlab::Metrics::Instrumentation.
      instrument_instance_method(User, :save)

Instrumentation for either all public model methods or a few crucial
ones will be added in the near future, I simply haven't gotten to doing
so just yet.

== Configuration

By default metrics are disabled. This means users don't have to bother
setting anything up if they don't want to. Metrics can be enabled by
editing one's gitlab.yml configuration file (see
config/gitlab.yml.example for example settings).

== Writing Data To InfluxDB

Because InfluxDB is still a fairly young product I expect the worse.
Data loss, unexpected reboots, the database not responding, you name it.
Because of this data is _not_ written to InfluxDB directly, instead it's
queued and processed by Sidekiq. This ensures that users won't notice
anything when InfluxDB is giving trouble.

The metrics worker can be started in a standalone manner as following:

    bundle exec sidekiq -q metrics

The corresponding class is called MetricsWorker.
2015-12-17 17:25:48 +01:00
Rubén Dávila a4e0c7c7d6 Upgrade Poltergeist to 1.8.1. #4131 2015-12-17 01:01:08 -05:00
Dmitriy Zaporozhets 76642d7a80 Merge branch 'feature/remove-celluloid' into 'master'
Update rerun to remove celluloid as dependency

After sidekiq 4 migration, we no longer need celluloid. `rerun` recent version also removed it from its dependency, so by getting this MR merged, we can solve #3797 

See merge request !2088
2015-12-16 18:24:25 +00:00
tduehr 8e3f1fa629 add CAS authentication support 2015-12-14 21:43:41 -06:00
Gabriel Mazetto 0b2c5003e6 Updated Rubocop to latest version 2015-12-14 17:18:32 -02:00
Gabriel Mazetto 08e67983be Update rerun to remove celluloid as dependency 2015-12-13 01:20:38 -02:00
Douwe Maan 22999a6fa6 Revert "Merge branch 'remove-redcloth' into 'master' "
This reverts commit e426c027b0, reversing
changes made to c3676aa156.
2015-12-11 16:16:07 +01:00
Valery Sizov 73942b15e7 Merge branch 'rs-update-gitlab_emoji' into 'master'
Bump gitlab_emoji to ~> 0.2.0

A new version of this gem was released October 29th
but was never bumped in GitLab.

See merge request !1994
2015-12-11 07:43:59 +00:00
Dmitriy Zaporozhets 3a82302fcb Merge branch 'bump-devise-3.5.3' into 'master'
Bump devise to 3.5.3 to fix reset token expiring after account creation

Also fixes an incorrect redirect after login with relative URL root:

Closes https://github.com/gitlabhq/gitlabhq/issues/8228

Closes #2750

See merge request !2056
2015-12-11 01:37:56 +00:00
Stan Hu 7f1b60cc66 Bump devise to 3.5.3 to fix reset token expiring after account creation
Also fixes an incorrect redirect after login with relative URL root:

Closes https://github.com/gitlabhq/gitlabhq/issues/8228

Closes #2750
2015-12-10 11:37:37 -08:00
Gabriel Mazetto 3e5b24d46a Upgraded Sidekiq to 4.x 2015-12-10 17:18:03 -02:00
Douwe Maan 905090dbe9 Remove RedCloth and no longer allow bundle-audit to fail 2015-12-09 11:18:21 +01:00
Valery Sizov 792f2bbe0b Merge branch 'bump-gollum-version' into 'master'
Bump gollum-lib to 4.1.0 and fix dependency mismatch with rouge

Closes #3767

See merge request !2017
2015-12-08 14:53:05 +00:00
Douwe Maan 51ed5225ad Merge branch 'serve_lfs_object' into 'master'
Serve LFS object

Depends on gitlab-org/gitlab_git!57

See merge request !1976
2015-12-08 14:19:52 +00:00
Stan Hu f36fe92fcb Bump gollum-lib to 4.1.0 and fix dependency mismatch with rouge
Closes #3767
2015-12-08 04:43:17 -08:00
Valery Sizov 2e270c0705 add explicit reference to rouge 1.10.1 2015-12-08 09:05:02 +02:00
Dmitriy Zaporozhets 1da71fa9ed Merge branch 'feature/sidekiq-cron' into 'master'
Migrate from Sidetiq to Sidekiq-cron

Migrate from Sidetiq to Sidekiq-cron
Updated Sidekiq to 3.5.x

This will solve #2355

See merge request !1982
2015-12-07 18:53:59 +00:00
Marin Jankovski bf17609e2a Rename blob helper, bump version of gitlab_git to 7.2.21. 2015-12-07 15:56:38 +01:00
Robert Speicher 6ee43ada3a Bump gitlab_emoji to ~> 0.2.0 2015-12-05 17:49:32 -05:00
Stan Hu d800a949d2 Fix Error 500 when creating global milestones with Unicode characters
Two issues:

1. The constraints in the resources were incorrect. Here's what it was before:
```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

In this case, id is actually the title of the milestone, which can be anything at the moment.

After:

```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[^\/]+/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

2. `parameterize` would strip all Unicode characters, leaving a blank string. Rails would report something like:

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"groups/milestones", :group_id=>#<Group id: 48, name: "ops-dev", path: "ops-dev", owner_id: nil, created_at: "2015-11-15 08:55:30", updated_at: "2015-12-02 06:23:26", type: "Group", description: "", avatar: "sha1.c71e73d51af1865c1bbbf6208e10044d46c9bb93.png", public: false>, :id=>"", :title=>"肯定不是中文的问题"} missing required keys: [:id]):

This change uses the babosa library to create a better slug, which surprisingly
isn't actually used by the global milestone controllers. Instead, they use the
title passed as a query string for some reason.

Closes https://github.com/gitlabhq/gitlabhq/issues/9881

Fix constraints
2015-12-05 00:04:44 -08:00
Gabriel Mazetto 496870ddec Migrate from Sidetiq to Sidekiq-cron
Updated Sidekiq to 3.5.x
2015-12-04 11:29:45 -02:00
Valery Sizov 54b74aa998 fix Celluloid warnings 2015-12-03 10:49:02 +02:00
Valery Sizov e0131c5d07 Merge branch 'rails_update_to_4_2' into 'master'
Rails update to 4.2.4

https://gitlab.com/gitlab-org/gitlab-ce/issues/2694

See merge request !1902
2015-11-30 16:49:09 +00:00
Valery Sizov e92ceb7b57 fix specs 2015-11-30 16:12:31 +02:00
Robert Speicher 344cb89718 Bump jquery-turbolinks to ~> 2.1.0
See #2857
2015-11-27 16:34:59 -05:00