| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't send (fake) email during dev bootstrap
This allows you to do:
rake dev:setup BOOTSTRAP=1
and prevent dozens of letter_opener email popups in your browser.
In the latest GDK we automatically set BOOTSTRAP=1 during `make`.
[ci skip]
See merge request !2447
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows you to do:
rake dev:setup BOOTSTRAP=1
and prevent dozens of letter_opener emai popups in your browser.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Import GitHub wiki into GitLab
Closes #2834
GitHub doesn’t apply any constraints to theirs wiki slug allowing chars like ,, :, *, etc, we need to remove our constraints or some wiki pages will not be available after they are imported.
Some wikis use the Gollum's tags to link its internal/external resources like: images, urls, wiki pages, etc. So, to avoid that wiki links/images displays completely broken after they were imported, we added a new `WikiPipeline`, that for now will parse only simple links, and image tags.
##### Before `WikiPipeline`:
![Screenshot_2016-01-11_20.14.48](/uploads/46fd5dbb5acfc70aa8ecca3050b675e4/Screenshot_2016-01-11_20.14.48.png)
##### After `WikiPipeline`:
![Screenshot_2016-01-11_20.15.56](/uploads/b1d94aa852f385f867a7868c358b4257/Screenshot_2016-01-11_20.15.56.png)
See merge request !2324
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since GitHub doesn’t apply these constraints to theirs wiki slug
allowing characters like `,`, `:`, `*`, etc, we need to relax our
constraints or some wiki pages will not be available after they were
imported.
For an example the Devise project have a wiki page with the following
slug: “How To: Add sign_in, sign_out, and sign_up links to your layout
template”
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unsubscribe from thread through link in email footer
Closes #3437
![Screenshot_from_2015-12-11_15-35-06](/uploads/cfb3d8737d4757f527995411f103d0ce/Screenshot_from_2015-12-11_15-35-06.png)
![Screenshot_from_2015-12-11_15-35-56](/uploads/9b7121be7ce4b05e5995ca6d38c5bea4/Screenshot_from_2015-12-11_15-35-56.png)
See merge request !2068
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Added also a `Gitlab::Ci::Build::Artifacts::Metadata::ParserError`
exception class.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This reverts nesting artifacts controller in builds module.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes #3046
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix #9963 reference_filter "Encoding::CompatibilityError" bug with some complex URL;
https://github.com/gitlabhq/gitlabhq/pull/9964
@DouweM
See merge request !2383
|
| | |/
| |/|
| | |
| | | |
ref: https://github.com/ruby/ruby/commit/238b979f1789f95262a267d8df6239806f2859cc
|
|/ /
| |
| |
| | |
This reverts commit ae7de2f8510d6d4b69120f168122e26d69dda256.
|
| |
| |
| |
| | |
See https://git.io/vztMu and http://stackoverflow.com/a/17571242/223897
|
| | |
|
|\ \
| |/ |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix problem with projects ending with .keys #3076
Closes #3076
Move route `:username.keys` below project's routes. This allow project's to handle names ending with `.keys`
See merge request !1883
|
| | | |
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ / |
|
| |/ |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| | |
This isn't hugely useful and mostly wastes InfluxDB space. We can re-add
this whenever needed (but only once we really need it).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This particular setup had 3 problems:
1. Storing SQL queries as tags is very inefficient as InfluxDB ends up
indexing every query (and they can get pretty large). Storing these
as values instead means we can't always display the SQL as easily.
2. We already instrument ActiveRecord query methods, thus we already
have timing information about database queries.
3. SQL obfuscation is difficult to get right and I'd rather not expose
sensitive data by accident.
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Remove unused config/schedule.rb file
[ci skip]
See merge request !2249
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
**Why is this needed?**
Not really needed, but having code that is not used around is confusing, so lets
remove it
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
|
| |/
| |
| |
| |
| | |
* GITLAB_EMAIL_FROM
* GITLAB_EMAIL_DISPLAY_NAME
* GITLAB_EMAIL_REPLY_TO
|
| | |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move InfluxDB settings to ApplicationSetting
This moves the settings from the YAML files to the database.
cc @sytses
See merge request !2228
|
| | | |
|
| | | |
|
| |\ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
Restart settings are moved too.
See merge request !2226
|
| | | |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This ensures we don't end up wasting resources by tracking method calls
that only take a few microseconds. By default the threshold is 10
milliseconds but this can be changed using the gitlab.yml configuration
file.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The use of ActiveSupport would slow down instrumented method calls by
about 180x due to:
1. ActiveSupport itself not being the fastest thing on the planet
2. caller_locations() having quite some overhead
The use of caller_locations() has been removed because it's not _that_
useful since we already know the full namespace of receivers and the
names of the called methods.
The use of ActiveSupport has been replaced with some custom code that's
generated using eval() (which can be quite a bit faster than using
define_method).
This new setup results in instrumented methods only being about 35-40x
slower (compared to non instrumented methods).
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Environment variables in the app
Fixes #3717 and #3519
## Why environment variables?
We need environmental variables, they are an expected way to configure apps https://medium.com/@kelseyhightower/12-fractured-apps-1080c73d481c#.ntrdiyu4c
This causes many tools and to tutorials to make it easy to set environmental variables and harder to supply a configuration file.
So even though we agree they are not ideal https://support.cloud.engineyard.com/hc/en-us/articles/205407508-Environment-Variables-and-Why-You-Shouldn-t-Use-Them the market has spoken.
## Why for GitLab the application and not for the Omnibus packages?
Environmental variables are also needed by people that do not run our Omnibus packages, for example natively bundled apps (Debian apt-get) and idiomatic Docker packages (Mesos, Kubernetes, etc.).
Of course it should work great with Omnibus packages too so any advise is welcome in that regard.
There is an MR https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/575/diffs to be able to set any variable in gitlab.rb via environmental variables. I think both that and this MR should be merged to solve the configuration problem for both Omnibus and non-Omnibus installations. When both are merged the documentation should be crosslinked.
## Why uppercase?
Need to be all cap according to Google Shell guideline:
"Constants and Environment Variable Names => All caps, separated with underscores, declared at the top of the file."
https://google.github.io/styleguide/shell.xml#Constants_and_Environment_Variable_Names
Or as explained on http://stackoverflow.com/a/673940/613240
Keeping to this convention, you can rest assured that you don't need to know every environment variable used by UNIX tools or shells in order to avoid overwriting them. If it's your variable, lowercase it. If you export it, uppercase it.
/cc @JobV @DouweM @marin @jacobvosmaer @ayufan @pravi
See merge request !2215
|